Compilation of an MPI application

Choice of the compiler environment

SCore is includes multiple mpi imprimentation. And SCore user can multiple compiler for each mpi imprimentation. Then SCore use wrapper for MPI compile command (for example mpicc(1)) to choice MPI implementation and compiler by command line arguments or environment variable.

The wrapper use following arguments only, the rest argument will be used by the each MPI implements commands:

Choice of MPI implementation

You can specify MPI implementation by -mpi option or SCORE_MPI encvironment variable. Currently, you can use mpich-1.2.5 or yampi. If you cannot specify the implementation, mpich-1.2.5 is used.

If one MPI implementation has multiple SCore interface, -device is used to specify the interface. But this option is not used on the current SCore version.

Choice of the compilers

You can specify compiler by -cpmpiler option or SCORE_BUILD_COMPILERS environment variable.

If there are diffirent version of the compiler, you can specify the compiler commands by -compiler_path option or SCORE_COMPILERS environment variable.

Compile command

The compiler command for each language as follows:
LanguageCommand
Cmpicc
C++mpic++
Fortran 77mpif77
Fortran 90mpif90

Compilation of a sample application

alltoall.c is an MPI application that measure the performance of the MPI_Alltoall function. The application is written in C. Use mpicc to compile the application as the follows:
% mpicc -O2 -o alltoall alltoall.c

See also

Running an MPI application

mpic++(1), mpicc(1), mpif77(1), mpirun(1) scrun(1)

How to use optional compilers