From 16f67b5bb1b6c8a37022f2a422ef5ae862ead956 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 10 Jul 2016 21:21:43 -0500 Subject: Setup environment for Intel Parallel Studio Set up the environment for the Intel compilers and tools. This commit does the following: - Unset variables that were incorrect from the auto guess prefix inspections. - Add a RemovePath environment_modifications_formats for dotkit. - Set the module environment variables appropriate for the different variants. - Change the component logic so that the '+all' variant works. It was getting split by letter and leaving COMPONENTS empty. - Added a variant checking function. - Added NONRPM_DB_DIR to the silent.cfg so that the product database goes to the installation directory. - With the product database in prefix the code to remove the product database file from the home directory is no longer needed and was removed. - Reformat the 'tools' variant description. There are probably more variables needed for the '+tools' for the 'professional' product version but I do not have access to that. --- .../packages/intel-parallel-studio/package.py | 139 +++++++++++++++++++-- var/spack/repos/builtin/packages/intel/package.py | 44 +++++-- 2 files changed, 168 insertions(+), 15 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 493ca16417..068306985f 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -42,15 +42,26 @@ class IntelParallelStudio(IntelInstaller): variant('daal', default=True, description="Install the Intel DAAL libraries") variant('ipp', default=True, description="Install the Intel IPP libraries") - variant('tools', default=True, description="""Install the Intel Advisor,\ -VTune Amplifier, and Inspector tools""") + variant('tools', default=True, description="Install the Intel Advisor, " + "VTune Amplifier, and Inspector tools") provides('mpi', when='@cluster:+mpi') provides('mkl', when='+mkl') provides('daal', when='+daal') provides('ipp', when='+ipp') + def check_variants(self, spec): + error_message = '\t{variant} can not be turned off if "+all" is set' + + errors = [error_message.format(variant=x) + for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools') + if ('~' + x) in self.spec] + if errors: + errors = ['incompatible variants given'] + errors + raise InstallError('\n'.join(errors)) + def install(self, spec, prefix): + self.check_variants(spec) base_components = "ALL" # when in doubt, install everything mpi_components = "" @@ -58,9 +69,7 @@ VTune Amplifier, and Inspector tools""") daal_components = "" ipp_components = "" - if spec.satisfies('+all'): - base_components = "ALL" - else: + if not spec.satisfies('+all'): all_components = get_all_components() regex = '(comp|openmp|intel-tbb|icc|ifort|psxe|icsxe-pset)' base_components = \ @@ -77,8 +86,8 @@ VTune Amplifier, and Inspector tools""") regex = '(gdb|vtune|inspector|advisor)' tool_components = \ filter_pick(all_components, re.compile(regex).search) + components = base_components - components = base_components if not spec.satisfies('+all'): if spec.satisfies('+mpi') and 'cluster' in str(spec.version): components += mpi_components @@ -92,7 +101,10 @@ VTune Amplifier, and Inspector tools""") spec.satisfies('@professional')): components += tool_components - self.intel_components = ';'.join(components) + if spec.satisfies('+all'): + self.intel_components = 'ALL' + else: + self.intel_components = ';'.join(components) IntelInstaller.install(self, spec, prefix) absbindir = os.path.dirname(os.path.realpath(os.path.join( @@ -142,3 +154,116 @@ VTune Amplifier, and Inspector tools""") os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) + + def setup_environment(self, spack_env, run_env): + major_ver = self.version[1] + + # Remove paths that were guessed but are incorrect for this package. + run_env.remove_path('LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('CPATH', + join_path(self.prefix, 'include')) + + # Add the default set of variables + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'tbb', 'include')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'tbb','lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb','lib', 'mic')) + + if self.spec.satisfies('+all'): + run_env.prepend_path('PATH', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), + 'gdb', 'intel64_mic', 'bin')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), + 'libipt', 'intel64', 'lib')) + run_env.set('GDBSERVER_MIC', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), 'gdb', + 'targets', 'mic', 'bin', 'gdbserver')) + run_env.set('GDB_CROSS', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), + 'gdb', 'intel64_mic', 'bin', 'gdb-mic')) + run_env.set('MPM_LAUNCHER', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), 'mpm', + 'mic', + 'bin', 'start_mpm.sh')) + run_env.set('INTEL_PYTHONHOME', + join_path(self.prefix, + 'debugger_{0}'.format(major_ver), 'python', + 'intel64')) + + if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')) and \ + self.spec.satisfies('@cluster'): + run_env.prepend_path('PATH', + join_path(self.prefix, 'mpi', 'intel64', 'bin')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'mpi', 'intel64', 'lib')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'mpi', 'intel64', 'lib')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'mpi', 'mic', 'lib')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'mpi', 'mic', 'lib')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'mpi', 'mic', 'lib')) + run_env.set('I_MPI_ROOT', join_path(self.prefix, 'mpi')) + + if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'): + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'mkl', 'lib', 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'mkl', 'lib', 'intel64')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'mkl', 'include')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'mkl','lib', 'mic')) + run_env.set('MKLROOT', join_path(self.prefix, 'mkl')) + + if self.spec.satisfies('+all') or self.spec.satisfies('+daal'): + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'daal', 'lib', + 'intel64_lin')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'daal', 'lib', + 'intel64_lin')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'daal', 'include')) + run_env.prepend_path('CLASSPATH', + join_path(self.prefix, 'daal', 'lib', + 'daal.jar')) + run_env.set('DAALROOT', join_path(self.prefix, 'daal')) + + if self.spec.satisfies('+all') or self.spec.satisfies('+ipp'): + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'ipp', 'lib', 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'ipp', 'lib', 'intel64')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'ipp', 'include')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'ipp','lib', 'mic')) + run_env.set('IPPROOT', join_path(self.prefix, 'ipp')) + diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py index 56d9fabddf..7988926e6d 100644 --- a/var/spack/repos/builtin/packages/intel/package.py +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -49,13 +49,6 @@ class IntelInstaller(Package): def install(self, spec, prefix): - # Remove the installation DB, otherwise it will try to install into - # location of other Intel builds - if os.path.exists(os.path.join(os.environ["HOME"], "intel", - "intel_sdp_products.db")): - os.remove(os.path.join(os.environ["HOME"], "intel", - "intel_sdp_products.db")) - if not hasattr(self, "intel_prefix"): self.intel_prefix = self.prefix @@ -66,12 +59,14 @@ ACCEPT_EULA=accept PSET_MODE=install CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes PSET_INSTALL_DIR=%s +NONRPM_DB_DIR=%s ACTIVATION_LICENSE_FILE=%s ACTIVATION_TYPE=license_file PHONEHOME_SEND_USAGE_DATA=no CONTINUE_WITH_OPTIONAL_ERROR=yes COMPONENTS=%s -""" % (self.intel_prefix, self.global_license_file, self.intel_components)) +""" % (self.intel_prefix, self.intel_prefix, self.global_license_file, + self.intel_components)) install_script = Executable("./install.sh") install_script('--silent', silent_config_filename) @@ -123,3 +118,36 @@ class Intel(IntelInstaller): os.symlink(os.path.join(self.prefix.man, "common", "man1"), os.path.join(self.prefix.man, "man1")) + + def setup_environment(self, spack_env, run_env): + + # Remove paths that were guessed but are incorrect for this package. + run_env.remove_path('LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib')) + run_env.remove_path('CPATH', + join_path(self.prefix, 'include')) + + # Add the default set of variables + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'intel64')) + run_env.prepend_path('LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb', 'lib', + 'intel64', 'gcc4.4')) + run_env.prepend_path('CPATH', + join_path(self.prefix, 'tbb', 'include')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'lib', 'mic')) + run_env.prepend_path('MIC_LIBRARY_PATH', + join_path(self.prefix, 'tbb','lib', 'mic')) + run_env.prepend_path('MIC_LD_LIBRARY_PATH', + join_path(self.prefix, 'tbb','lib', 'mic')) + -- cgit v1.2.3-70-g09d2 From 5e5e36a6596e13c60330b674adf1237fc06f512d Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sun, 10 Jul 2016 21:59:46 -0500 Subject: Fix flake8 errors. --- .../packages/intel-parallel-studio/package.py | 30 +++++++++++++--------- var/spack/repos/builtin/packages/intel/package.py | 11 ++++---- 2 files changed, 23 insertions(+), 18 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 068306985f..223b0ce666 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -184,9 +184,9 @@ class IntelParallelStudio(IntelInstaller): run_env.prepend_path('MIC_LD_LIBRARY_PATH', join_path(self.prefix, 'lib', 'mic')) run_env.prepend_path('MIC_LIBRARY_PATH', - join_path(self.prefix, 'tbb','lib', 'mic')) + join_path(self.prefix, 'tbb', 'lib', 'mic')) run_env.prepend_path('MIC_LD_LIBRARY_PATH', - join_path(self.prefix, 'tbb','lib', 'mic')) + join_path(self.prefix, 'tbb', 'lib', 'mic')) if self.spec.satisfies('+all'): run_env.prepend_path('PATH', @@ -218,11 +218,14 @@ class IntelParallelStudio(IntelInstaller): if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')) and \ self.spec.satisfies('@cluster'): run_env.prepend_path('PATH', - join_path(self.prefix, 'mpi', 'intel64', 'bin')) + join_path(self.prefix, 'mpi', 'intel64', + 'bin')) run_env.prepend_path('LD_LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'intel64', 'lib')) + join_path(self.prefix, 'mpi', 'intel64', + 'lib')) run_env.prepend_path('LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'intel64', 'lib')) + join_path(self.prefix, 'mpi', 'intel64', + 'lib')) run_env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix, 'mpi', 'mic', 'lib')) run_env.prepend_path('MIC_LIBRARY_PATH', @@ -233,13 +236,15 @@ class IntelParallelStudio(IntelInstaller): if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'): run_env.prepend_path('LD_LIBRARY_PATH', - join_path(self.prefix, 'mkl', 'lib', 'intel64')) + join_path(self.prefix, 'mkl', 'lib', + 'intel64')) run_env.prepend_path('LIBRARY_PATH', - join_path(self.prefix, 'mkl', 'lib', 'intel64')) + join_path(self.prefix, 'mkl', 'lib', + 'intel64')) run_env.prepend_path('CPATH', join_path(self.prefix, 'mkl', 'include')) run_env.prepend_path('MIC_LD_LIBRARY_PATH', - join_path(self.prefix, 'mkl','lib', 'mic')) + join_path(self.prefix, 'mkl', 'lib', 'mic')) run_env.set('MKLROOT', join_path(self.prefix, 'mkl')) if self.spec.satisfies('+all') or self.spec.satisfies('+daal'): @@ -258,12 +263,13 @@ class IntelParallelStudio(IntelInstaller): if self.spec.satisfies('+all') or self.spec.satisfies('+ipp'): run_env.prepend_path('LD_LIBRARY_PATH', - join_path(self.prefix, 'ipp', 'lib', 'intel64')) + join_path(self.prefix, 'ipp', 'lib', + 'intel64')) run_env.prepend_path('LIBRARY_PATH', - join_path(self.prefix, 'ipp', 'lib', 'intel64')) + join_path(self.prefix, 'ipp', 'lib', + 'intel64')) run_env.prepend_path('CPATH', join_path(self.prefix, 'ipp', 'include')) run_env.prepend_path('MIC_LD_LIBRARY_PATH', - join_path(self.prefix, 'ipp','lib', 'mic')) + join_path(self.prefix, 'ipp', 'lib', 'mic')) run_env.set('IPPROOT', join_path(self.prefix, 'ipp')) - diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py index 7988926e6d..d171411946 100644 --- a/var/spack/repos/builtin/packages/intel/package.py +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -66,7 +66,7 @@ PHONEHOME_SEND_USAGE_DATA=no CONTINUE_WITH_OPTIONAL_ERROR=yes COMPONENTS=%s """ % (self.intel_prefix, self.intel_prefix, self.global_license_file, - self.intel_components)) + self.intel_components)) install_script = Executable("./install.sh") install_script('--silent', silent_config_filename) @@ -106,8 +106,8 @@ class Intel(IntelInstaller): self.prefix.lib, "intel64", "libimf.a")))[0] # symlink or copy? - os.symlink(self.global_license_file, os.path.join(absbindir, - "license.lic")) + os.symlink(self.global_license_file, + os.path.join(absbindir, "license.lic")) if spec.satisfies('+rpath'): for compiler_command in ["icc", "icpc", "ifort"]: @@ -147,7 +147,6 @@ class Intel(IntelInstaller): run_env.prepend_path('MIC_LD_LIBRARY_PATH', join_path(self.prefix, 'lib', 'mic')) run_env.prepend_path('MIC_LIBRARY_PATH', - join_path(self.prefix, 'tbb','lib', 'mic')) + join_path(self.prefix, 'tbb', 'lib', 'mic')) run_env.prepend_path('MIC_LD_LIBRARY_PATH', - join_path(self.prefix, 'tbb','lib', 'mic')) - + join_path(self.prefix, 'tbb', 'lib', 'mic')) -- cgit v1.2.3-70-g09d2 From 0be4c7dfbdfd1c84a8d2ed97cdb649fdf4e84ed7 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Tue, 12 Jul 2016 07:37:36 -0500 Subject: Changes as discussed in PR review - removed unneeded entry for `debugger/gdb/intel64_mic` - set `+mpi` directory name to impi --- .../builtin/packages/intel-parallel-studio/package.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 223b0ce666..57f03d247f 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -189,10 +189,6 @@ class IntelParallelStudio(IntelInstaller): join_path(self.prefix, 'tbb', 'lib', 'mic')) if self.spec.satisfies('+all'): - run_env.prepend_path('PATH', - join_path(self.prefix, - 'debugger_{0}'.format(major_ver), - 'gdb', 'intel64_mic', 'bin')) run_env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix, 'debugger_{0}'.format(major_ver), @@ -218,21 +214,21 @@ class IntelParallelStudio(IntelInstaller): if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')) and \ self.spec.satisfies('@cluster'): run_env.prepend_path('PATH', - join_path(self.prefix, 'mpi', 'intel64', + join_path(self.prefix, 'impi', 'intel64', 'bin')) run_env.prepend_path('LD_LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'intel64', + join_path(self.prefix, 'impi', 'intel64', 'lib')) run_env.prepend_path('LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'intel64', + join_path(self.prefix, 'impi', 'intel64', 'lib')) run_env.prepend_path('LD_LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'mic', 'lib')) + join_path(self.prefix, 'impi', 'mic', 'lib')) run_env.prepend_path('MIC_LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'mic', 'lib')) + join_path(self.prefix, 'impi', 'mic', 'lib')) run_env.prepend_path('MIC_LD_LIBRARY_PATH', - join_path(self.prefix, 'mpi', 'mic', 'lib')) - run_env.set('I_MPI_ROOT', join_path(self.prefix, 'mpi')) + join_path(self.prefix, 'impi', 'mic', 'lib')) + run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi')) if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'): run_env.prepend_path('LD_LIBRARY_PATH', -- cgit v1.2.3-70-g09d2 From ead1b93f75c3eddcf3f5c6b72ad4dc3ee6e34ee6 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Wed, 13 Jul 2016 16:46:43 -0500 Subject: 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. --- .../packages/intel-parallel-studio/package.py | 48 ++++++++++------------ 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index 57f03d247f..fb98b2473c 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -53,12 +53,13 @@ class IntelParallelStudio(IntelInstaller): def check_variants(self, spec): error_message = '\t{variant} can not be turned off if "+all" is set' - errors = [error_message.format(variant=x) - for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools') - if ('~' + x) in self.spec] - if errors: - errors = ['incompatible variants given'] + errors - raise InstallError('\n'.join(errors)) + if self.spec.satisfies('+all'): + errors = [error_message.format(variant=x) + for x in ('mpi', 'mkl', 'daal', 'ipp', 'tools') + if ('~' + x) in self.spec] + if errors: + errors = ['incompatible variants given'] + errors + raise InstallError('\n'.join(errors)) def install(self, spec, prefix): self.check_variants(spec) @@ -89,7 +90,7 @@ class IntelParallelStudio(IntelInstaller): components = base_components if not spec.satisfies('+all'): - if spec.satisfies('+mpi') and 'cluster' in str(spec.version): + if spec.satisfies('+mpi'): components += mpi_components if spec.satisfies('+mkl'): components += mkl_components @@ -128,8 +129,11 @@ class IntelParallelStudio(IntelInstaller): if (spec.satisfies('+all') or spec.satisfies('+mpi')) and \ spec.satisfies('@cluster'): - os.symlink(self.global_license_file, os.path.join( - self.prefix, "itac_latest", "license.lic")) + for ifile in os.listdir(os.path.join(self.prefix, "itac")): + 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'): wrappers = ["mpif77", "mpif77", "mpif90", "mpif90", "mpigcc", "mpigcc", "mpigxx", "mpigxx", @@ -156,6 +160,8 @@ class IntelParallelStudio(IntelInstaller): os.path.join(self.prefix.man, "man1")) def setup_environment(self, spack_env, run_env): + # TODO: Determine variables needed for the professional edition. + major_ver = self.version[1] # Remove paths that were guessed but are incorrect for this package. @@ -211,23 +217,13 @@ class IntelParallelStudio(IntelInstaller): 'debugger_{0}'.format(major_ver), 'python', 'intel64')) - if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')) and \ - self.spec.satisfies('@cluster'): - run_env.prepend_path('PATH', - join_path(self.prefix, 'impi', 'intel64', - 'bin')) - run_env.prepend_path('LD_LIBRARY_PATH', - join_path(self.prefix, 'impi', 'intel64', - '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')) + if (self.spec.satisfies('+all') or self.spec.satisfies('+mpi')): + # Only I_MPI_ROOT is set here because setting the various PATH + # variables will potentially be in conflict with other MPI + # environment modules. The I_MPI_ROOT environment variable can be + # used as a base to set necessary PATH variables for using Intel + # MPI. It is also possible to set the variables in the modules.yaml + # file if Intel MPI is the dominant, or only, MPI on a system. run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi')) if self.spec.satisfies('+all') or self.spec.satisfies('+mkl'): -- cgit v1.2.3-70-g09d2