Hi. I’ve been having problems with MPI since I’ve updated my operative system to Ubuntu 22.04. I have made a fresh install from zero. After installing ubuntu, I’ve installed gfortran, lapack, mpi, mpich, libopenmpi, and other libraries.
This was some months ago, and I think MPI was working fine at this point, I use some helloworld program to test MPI. This is one of the test codes I use:
program test
include 'mpif.h'
call mpi_init(ierr)
call mpi_comm_rank(mpi_comm_world,iam,ierr)
call mpi_comm_size(mpi_comm_world,nproc,ierr)
print*,'iam=',iam,' nproc=',nproc
call mpi_finalize(ierr)
stop
end
So, I think I’ve checked it, and it worked properly at this point. Then, I’ve realized that I could install the intel fortran compiler for free. I don’t know what I was reading about, but until this point I always used gnu fortran, except when I run my codes from a cluster. As in the cluster I use the intel fortran compiler, and I saw that intel has released the intel fortran compiler for free for non commercial use, I installed the intel fortran compiler, the intel API, and I don’t remember if something else, I think that intel MKL (Math Kernel library) is included in the intel API (which I’m not totally sure what it is, but I installed it anyway).
And I think that after I installed the intel compiler and the libraries the problems with MPI began. What happens is that now when I run the test parallel code, I get something like this:
$ mpirun -n 2 ./testparalel.x
iam= 0 nproc= 1
iam= 0 nproc= 1
This means that instead of creating a single MPI environment with two processors, MPI is running the same program, twice, on two processors (which is not what it is supposed to do).
When working properly it should give something like
$ mpirun -n 2 ./testparalel.x
iam=0 nproc=2
iam=1 nproc=2
Any ideas on how to fix this problem?
Thank you in advance.