[mvapich-discuss] Setting default mpicc/mpif77 CFLAGS, FCFLAGS

Jonathan Perkins perkinjo at cse.ohio-state.edu
Tue Feb 10 16:29:26 EST 2015


On Tue, Feb 10, 2015 at 04:20:10PM -0500, Novosielski, Ryan wrote:
> Hi there,
> 
> Is there a way to configure the mpicc/mpif77/etc. commands to use a
> specific set of CLFAGS and FCFLAGS when building software? I have read
> in the Slurm docs that what you want to do is build MPI-aware software
> with Slurm’s PMI linked in, and that the easiest way to do that is set
> the default for the mpi compiler wrappers to do that. I know how to do
> this with OpenMPI and I’m assuming MVAPICH2 has a way also (with
> MPICH2, you appear to use a set of environment variables like
> MPICH2_MPICC_FLAGS, etc.). I am not finding this anywhere in the
> documentation, however — in fact, the build section is very sparse in
> general.

Hi Ryan.  MVAPICH2 does this for you if you select slurm as your process
manager via the --pm=slurm configure option.

http://mvapich.cse.ohio-state.edu/static/media/mvapich/mvapich2-2.1rc1-userguide.html#x1-100004.3.2

For example:
./configure ... --with-pmi=pmi2 --with-pm=slurm ...

If you want to add extra flags to the compiler wrappers using the
following:
MPICH_MPICC_FLAGS
MPICH_MPICPP_FLAGS
MPICH_MPICXX_FLAGS
MPICH_MPIF77_FLAGS
MPICH_MPIFC_FLAGS
MPICH_LDFLAGS
MPICH_LIBS

Hope that helps.

-- 
Jonathan Perkins


More information about the mvapich-discuss mailing list