Add compilers paths for dependents of intel-parallel-studio#2980
Add compilers paths for dependents of intel-parallel-studio#2980DaanVanVugt wants to merge 2 commits intospack:developfrom
Conversation
|
Is this just for Intel MPI or the whole Intel toolchain? |
that's a valid point. We should also make sure Spack's compiler wrappers are used underneath. For in @zzzoom i never used Intel MPI, so does it always have |
|
I can see both mpicc and mpiicc in my IPSXE 2016u4 mpi/bin64 directory, dunno how long it has been like that for. |
|
@lee218llnl if I am not mistaken, you contributed |
|
@Exteris @zzzoom it looks like we can use
So maybe one just need to add together with standard wrapper names (i.e. |
|
@davydden it looks like you answered your own question. By default the mpicc, mpicxx, mpif, etc. scripts will use the GNU compilers unless you set the I_MPI_* variables. Note you should also add: spack_env.set('I_MPI_FC', spack_fc) |
|
@lee218llnl thanks for confirming. @Exteris would you mind to update the PR accordingly? |
|
Updated. |
| # file if Intel MPI is the dominant, or only, MPI on a system. | ||
| run_env.set('I_MPI_ROOT', join_path(self.prefix, 'impi')) | ||
| # Set mpi environment variables | ||
| spack_env.set('I_MPI_CC', spack_cc) |
There was a problem hiding this comment.
I am not sure but in openmpi these things are done in def setup_dependent_environment(self, spack_env, run_env, dependent_spec):. see the docs http://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=setup_dependent_environment
setup_environment appears to be mostly modules related http://spack.readthedocs.io/en/latest/module_file_support.html?highlight=setup_environment
There was a problem hiding this comment.
You are probably right, I'll alter it.
What is the function signature? In the docs I see both:
def setup_dependent_environment(self, module, spec, dep_spec):
"""Dependencies of Qt find it using the QTDIR environment variable."""
os.environ['QTDIR'] = self.prefixThe arguments to this function are:
module: the module of the dependent package, where global properties can be assigned.
spec: the spec of the dependency package (the one the function is called on).
dep_spec: the spec of the dependent package (i.e. dep_spec depends on spec).
and
def setup_dependent_environment(self, spack_env, run_env, extension_spec):The difference in names confuses me.
There was a problem hiding this comment.
i would take the same one which is used in openmpi:
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
There was a problem hiding this comment.
I fixed the inconsistencies in the documentation in #3351. You should use:
setup_dependent_environment(self, spack_env, run_env, dependent_spec):|
@Exteris what's the status of this PR? would you mind fixing the minor issue related to |
|
@weijianwen: I think you could update this PR slightly to fix your issue. |
|
@Exteris ping. |
| elif os.path.isdir(join_path(self.prefix, 'bin64')): | ||
| bindir = join_path(self.prefix, 'bin64') | ||
| else: | ||
| raise "No suitable bindir found" |
There was a problem hiding this comment.
in another PR, @adamjstewart said that this should probably be raise RuntimeError('No suitable bindir found')
|
superseded by #3905 |
Fixes #2978