MPI related changes
- Redid the code for setting the itac symlink for the cluster edition. - Removed the *PATH variables for MPI to avoid a conflict with other MPI environment modules. - Added missing test for `+all` when checking variants.
This commit is contained in:
parent
0be4c7dfbd
commit
ead1b93f75
@ -53,6 +53,7 @@ class IntelParallelStudio(IntelInstaller):
|
|||||||
def check_variants(self, spec):
|
def check_variants(self, spec):
|
||||||
error_message = '\t{variant} can not be turned off if "+all" is set'
|
error_message = '\t{variant} can not be turned off if "+all" is set'
|
||||||
|
|
||||||
|
if self.spec.satisfies('+all'):
|
||||||
errors = [error_message.format(variant=x)
|
errors = [error_message.format(variant=x)
|
||||||
for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools')
|
for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools')
|
||||||
if ('~' + x) in self.spec]
|
if ('~' + x) in self.spec]
|
||||||
@ -89,7 +90,7 @@ def install(self, spec, prefix):
|
|||||||
components = base_components
|
components = base_components
|
||||||
|
|
||||||
if not spec.satisfies('+all'):
|
if not spec.satisfies('+all'):
|
||||||
if spec.satisfies('+mpi') and 'cluster' in str(spec.version):
|
if spec.satisfies('+mpi'):
|
||||||
components += mpi_components
|
components += mpi_components
|
||||||
if spec.satisfies('+mkl'):
|
if spec.satisfies('+mkl'):
|
||||||
components += mkl_components
|
components += mkl_components
|
||||||
@ -128,8 +129,11 @@ def install(self, spec, prefix):
|
|||||||
|
|
||||||
if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
|
if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \
|
||||||
spec.satisfies('@cluster'):
|
spec.satisfies('@cluster'):
|
||||||
os.symlink(self.global_license_file, os.path.join(
|
for ifile in os.listdir(os.path.join(self.prefix, "itac")):
|
||||||
self.prefix, "itac_latest", "license.lic"))
|
if os.path.isdir(os.path.join(self.prefix, "itac", ifile)):
|
||||||
|
os.symlink(self.global_license_file,
|
||||||
|
os.path.join(self.prefix, "itac", ifile,
|
||||||
|
"license.lic"))
|
||||||
if spec.satisfies('~newdtags'):
|
if spec.satisfies('~newdtags'):
|
||||||
wrappers = ["mpif77", "mpif77", "mpif90", "mpif90",
|
wrappers = ["mpif77", "mpif77", "mpif90", "mpif90",
|
||||||
"mpigcc", "mpigcc", "mpigxx", "mpigxx",
|
"mpigcc", "mpigcc", "mpigxx", "mpigxx",
|
||||||
@ -156,6 +160,8 @@ def install(self, spec, prefix):
|
|||||||
os.path.join(self.prefix.man, "man1"))
|
os.path.join(self.prefix.man, "man1"))
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
|
# TODO: Determine variables needed for the professional edition.
|
||||||
|
|
||||||
major_ver = self.version[1]
|
major_ver = self.version[1]
|
||||||
|
|
||||||
# Remove paths that were guessed but are incorrect for this package.
|
# Remove paths that were guessed but are incorrect for this package.
|
||||||
@ -211,23 +217,13 @@ def setup_environment(self, spack_env, run_env):
|
|||||||
'debugger_{0}'.format(major_ver), 'python',
|
'debugger_{0}'.format(major_ver), 'python',
|
||||||
'intel64'))
|
'intel64'))
|
||||||
|
|
||||||
if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')) and \
|
if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')):
|
||||||
self.spec.satisfies('@cluster'):
|
# Only I_MPI_ROOT is set here because setting the various PATH
|
||||||
run_env.prepend_path('PATH',
|
# variables will potentially be in conflict with other MPI
|
||||||
join_path(self.prefix, 'impi', 'intel64',
|
# environment modules. The I_MPI_ROOT environment variable can be
|
||||||
'bin'))
|
# used as a base to set necessary PATH variables for using Intel
|
||||||
run_env.prepend_path('LD_LIBRARY_PATH',
|
# MPI. It is also possible to set the variables in the modules.yaml
|
||||||
join_path(self.prefix, 'impi', 'intel64',
|
# file if Intel MPI is the dominant, or only, MPI on a system.
|
||||||
'lib'))
|
|
||||||
run_env.prepend_path('LIBRARY_PATH',
|
|
||||||
join_path(self.prefix, 'impi', 'intel64',
|
|
||||||
'lib'))
|
|
||||||
run_env.prepend_path('LD_LIBRARY_PATH',
|
|
||||||
join_path(self.prefix, 'impi', 'mic', 'lib'))
|
|
||||||
run_env.prepend_path('MIC_LIBRARY_PATH',
|
|
||||||
join_path(self.prefix, 'impi', 'mic', 'lib'))
|
|
||||||
run_env.prepend_path('MIC_LD_LIBRARY_PATH',
|
|
||||||
join_path(self.prefix, 'impi', 'mic', 'lib'))
|
|
||||||
run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi'))
|
run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi'))
|
||||||
|
|
||||||
if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'):
|
if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'):
|
||||||
|
Loading…
Reference in New Issue
Block a user