--- title: ' Cray MPI Library' taxonomy: category: - docs external_links: process: true no_follow: true target: _blank mode: active --- [toc] ## Environment Settings{#enviroment} ### Software Version and System Requirements{#version} Version | System A | System B | System C | Notes -------- | ------------ | -------- | -------- | ----------- 7.7.12 | + | ― | ― | Installed in April 2020 7.7.10 | + | ― | ― | Installed in October 2019 7.7.6 | + (default) | ― | ― | Installed in April 2019 7.7.3 | + | ― | ― | Installed in December 2018 7.7.0 | + | ― | ― | Installed in April 2018 7.6.3 | + | ― | ― | Installed in December 2017 7.6.0 | + | ― | ― | Installed in August 2017 7.5.3 | + | ― | ― | Installed in April 2017 7.5.0 | + | ― | ― | Installed in December 2016 7.4.2 | + | ― | ― | Installed in October 2016 \+ : Available for use ― : Not available for use ### Library Settings{#modules} Version | Modulefile Name ----------------------------------- | ----------------- 7.7.12 | cray-mpich/7.7.12 7.7.10 | cray-mpich/7.7.10 7.7.6 | cray-mpich/7.7.6 7.7.3 | cray-mpich/7.7.3 7.7.0 | cray-mpich/7.7.0 7.6.3 | cray-mpich/7.6.3 7.6.0 | cray-mpich/7.6.0 7.5.3 | cray-mpich/7.5.3 7.5.0 | cray-mpich/7.5.0 7.4.2 | cray-mpich/7.4.2 Our Supercomputer supports the following compilers: [Cray](/compilers/cray), [Intel](/compilers/intel), [PGI](/compilers/pgi), and [GNU](/compilers/gnu). For each compiler’s settings, see each compiler’s page. You can check the current status of compiler settings by using the module command as shown below. ```nohighlight $ module list ``` You can use the Cray MPI Library when you log in to the System A. The default of the library’s version is shown in the listed above. If you unloaded a module file, load the modulefile of the version you need by executing the module command as shown below. If the slash (/) and the version in the modulefile are omitted, the default version listed above will be set. ```nohighlight $ module load cray-mpich ``` If you want to switch between the versions of Cray MPI Library, execute the module command as shown below. ```nohighlight $ module switch cray-mpich/6.3.0 cray-mpich2/5.6.2 ``` For details of the module command, see [Modules](/config/modules). ### Level of Threading Support{#threadsafe} The value for threading support level available in Cray MPI Library is **MPI THREAD_SERIALIZED**. It means that MPI functions can be called from each thread. However, note that the program MUST ensure only one thread makes MPI calls at a time. By setting the following environment variables when executing a job, **MPI_THREAD_MULTIPLE** becomes available as the support level. It means that multiple threads may call with no restrictions. However, note that Cray MPI computing performance will be degraded. ```nohighlight (When using tcsh) setenv MPICH_MAX_THREAD_SAFETY multiple (When using bath) export MPICH_MAX_THREAD_SAFETY=multiple ``` ## How to Compile and Run{#usage} ### How to Compile{#compile} **Compile commands** Language | Command | Operands --------- | ------- | ------------------------------------------- Fortran | ftn | ftn [sequence_of_options] sequence_of_files C | cc | cc [sequence_of_options] sequence_of_files C++ | CC | CC [sequence_of_options] sequence_of_files **Examples of Compiling** ```nohighlight $ ftn -O3 sample_mpi.f90 ``` ### How to Run{#exec} To run a compiled MPI program, use the **tssrun** command in interactive mode and use the **aprun** command in batch mode. In both of interactive mode and batch mode, the number of parallels is specified as argument of the -A option, p. For details, see Examples. **Example(in interactive mode)** ```nohighlight $ tssrun -A p=2 ./a.out ``` ## Examples{#sample} ### Running an MPI Program in Interactive Mode{#tss} For more details of interactive mode, see [Interactive Processing](/run/interactive). * **Running with 8-fold parallelization** ```nohighlight tssrun -A p=8 ./a.out ``` * **Running in combination with thread parallelization(MPI 4-fold parallelization, OpenMP 8-fold parallelization)** ```nohighlight tssrun -A p=4:t=8:c=8 ./a.out ``` ### Running an MPI Program in Batch Mode{#lsf} For more details of batch mode, see [Batch Processing (For System A and E)](/run/systema). Examples below are for System A. * **Running with 8-fold parallelization** ```nohighlight $ cat sample.sh #!/bin/bash #QSUB -q gr19999a #QSUB -ug gr19999 #QSUB -W 5:00 #QSUB -A p=8 aprun -n $QSUB_PROCS ./a.out ``` * **Running in combination with thread parallelization(MPI 4-fold parallelization, OpenMP 8-fold parallelization)** ```nohighlight $ cat sample.sh #!/bin/bash #QSUB -q gr19999a #QSUB -ug gr19999 #QSUB -W 5:00 #QSUB -A p=4:t=8:c=8:m=4G #QSUB -o %J.out aprun -n $QSUB_PROCS -d $QSUB_CPUS -N $QSUB_PPN ./a.out ``` ## Manuals{#manual} * [Getting Started on MPI I/O](https://web.kudpc.kyoto-u.ac.jp/Cray_Manual/S-2490-40.pdf) ## Release Notes{#release_notes} * [Cray MPT 7.0.0](https://web.kudpc.kyoto-u.ac.jp/release/cray/S-9408-1406.pdf) ### 7.6 and later The release notes for cray-mpich 7.6 and later are not provided in book style. Please type `$ module help cray-mpich/<version>` to see the release note for each version.