! last updated : 2021/10/29 13:58:18 ! ! A test prgram checking MPI and fortran envrionment. ! Sample ! mpifort mpicheck.f90 ! mpirun -n 3 ./a.out program main use mpi implicit none integer,save :: ierr,myrank,npe integer,save :: status(MPI_STATUS_SIZE) integer,save :: MPI_LLONG_INTEGER call mpi_init(ierr) call mpi_comm_rank(MPI_COMM_WORLD, myrank, ierr) print *, 'my rank = ', myrank if (myrank == 0) then call mpi_comm_size(MPI_COMM_WORLD, npe, ierr) print *, 'number of cores', npe endif call mpi_finalize(ierr) end program main