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.0 interfaces for C and Fortran include:
Build:
cmake -B build
cmake --build buildRun self-tests:
ctest --test-dir buildPass data between two MPI threads. In this usage, MPI_Recv blocks waiting for MPI_Send
mpirun -np 2 mpi/mpi_passSee OpenMPI docs re: setting PATH and LD_LIBRARY_PATH if CMake has trouble finding OpenMPI for a compiler.