Compiling and Running MPI-IO Programs

If ROMIO is not already included in the MPI implementation, you need to include the file mpio.h for C or mpiof.h for Fortran in your MPI-IO program.

Note that on HP machines running HPUX and on NEC SX-4, you need to compile Fortran programs with mpifort.

With MPICH, HP MPI, or NEC MPI, you can compile MPI-IO programs as
mpicc foo.c
mpifort foo.f

With SGI MPI, you can compile MPI-IO programs as
cc foo.c -lmpi
f77 foo.f -lmpi
f90 foo.f -lmpi

With LAM, you can compile MPI-IO programs as
hcc foo.c -lmpi
hf77 foo.f -lmpi

If you have built ROMIO with some other MPI implementation, you can compile MPI-IO programs by explicitly giving the path to the include file mpio.h or mpiof.h and explicitly specifying the path to the library libmpio.a, which is located in $(ROMIO_HOME)/lib/$(ARCH)/libmpio.a.

Run the program as you would run any MPI program on the machine. If you use mpirun, make sure you use the correct mpirun for the MPI implementation you are using. For example, if you are using MPICH on an SGI machine, make sure that you use MPICH's mpirun and not SGI's mpirun.

Rob Latham 2016-08-01