scivision / fortran-coarray-mpi-examples

Examples of Fortran Coarrays, MPI 3.0 / mpi_f08

Repository from Github https://github.comscivision/fortran-coarray-mpi-examplesRepository from Github https://github.comscivision/fortran-coarray-mpi-examples

Fortran Coarray and MPI Examples

cmake oneapi-linux

A few very basic examples, perhaps use to test Coarray and MPI library functionality. GCC/Gfortran, Intel oneAPI, NAG, Cray, IBM XL and other compilers support Fortran 2008 Coarrays.

Free, popular MPI-3 interfaces for C and Fortran include:

Build and self-test:

cmake --workflow --preset default

This repo also gives an example of a workaround for OpenMPI 4.x and mpiexec race condition with large CPU count by setting TMPDIR to a short path name so as not to exceed 100 characters for UNIX sockets.

Message Passing

Pass data between two MPI threads. In this usage, MPI_Recv blocks waiting for MPI_Send

mpirun -np 2 mpi/mpi_pass

Notes

See OpenMPI docs re: setting PATH and LD_LIBRARY_PATH if CMake has trouble finding OpenMPI for a compiler.

About

Examples of Fortran Coarrays, MPI 3.0 / mpi_f08

License:Apache License 2.0


Languages

Language:CMake 77.3%Language:Fortran 15.8%Language:Meson 4.2%Language:C 2.7%