Closed ChristopherHogan closed 5 years ago
the mpich
package only depends on its runtime requirements. To use the mpi compilers you also need the conda compiler package:
conda install gxx-linux_64
I've been meaning to add mpich-mpicc
, etc. compiler metapackages that would be empty packages depending on mpich and the compilers.
I see. I guess I'll have to update my recipes to use the anaconda compilers. Thanks for the info.
Yes. This is part of the migration to packaged compilers for better portability which completed earlier this month.
If you are making a conda recipe that compiles with mpicc/mpicxx, you would want these in your requirements:
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
- mpich
which should install the right compiler on any platform.
@minrk To clarify, did you mean that if I use {{ compiler('c') }} and host: mpich, then the build environment will use mpicc as cc?
I am asking because I'd like to rebuild our channel against conda-forge's mpich / mpi4py.
Use of mpi compilers would not necessarily be automatic, depending on the build system of the given package. That's just the requirement to get everything compilers available and on PATH. To use the mpi compilers by default, you would need to set the appropriate env in build.sh:
export CC=mpicc
export CXX=mpic++
export FC=mpifort
or pass the appropriate args directly to your build input (e.g. sometimes mpi compiler and C compiler are specified separately in the same build).
Issue: When I create a conda environment with the latest
mpich
package I get an error on Ubuntu 16.04 when trying to runmpic++
ormpicc
:Environment (
conda list
):Details about
conda
and system (conda info
):