Re: OpenMPI Fortran: 'Error reading module mpi' and unexpected but silent termination
- From: Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx>
- Date: Tue, 30 Oct 2007 20:54:01 GMT
On 2007-10-30, Koen Poppe <MyFirstName.MyLastName@xxxxxxxxxxxxxxxxxxx> wrote:
Hello,
I'm encountering very strange behaviour with the very basic MPI/Fortran
program listed at the end of the message on a system running KUbuntu and
with the following compilers:
- gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
- GNU-Fortran compiler, 4.3.0 20071002 (experimental)
- OpenMPI 1.1-2.3
Koen,
As I am guiding you with your master's thesis, let me add some additional
comments to your post.
First of all: apparently something went wrong while you were copy-pasting
your program... I've cleaned up the formatting a bit. Here it is:
---> cut here <---------------------------
program test_mpi
implicit none
!use mpi
include 'mpif.h'
integer :: rank, nb, ierr
print *,"right before mpi_init"
call mpi_init( ierr )
print *, "right before mpi_comm_rank"
call mpi_comm_rank(MPI_COMM_WORLD, rank, ierr)
print *,"Hello, I'm processor ", rank
print *,"right before mpi_finalize"
call mpi_finalize(ierr)
end program test_mpi
-------> end cut <-----------------------
So now what exactly is our problem...
If we try to compile this using
bartv@kortrijk:~/mpi_test$ mpif90 test_mpi.f90
Then we get the errors:
/tmp/cc0CK30o.o: In function `MAIN__':
test_mpi.f90:(.text+0x88): undefined reference to `mpi_init_'
test_mpi.f90:(.text+0x105): undefined reference to `mpi_comm_rank_'
test_mpi.f90:(.text+0x1f6): undefined reference to `mpi_finalize_'
collect2: ld returned 1 exit status
Apparently, as we have found, these undefined references can be solved
by adding the -fsecond-underscore option to the mpif90 wrapper command:
bartv@kortrijk:~/mpi_test$ mpif90 test_mpi.f90 -fsecond-underscore
bartv@kortrijk:~/mpi_test$
Which seems to compile fine. However, you are right. When we try to
run the program using the command
bartv@kortrijk:~/mpi_test$ mpirun -np 4 a.out
we only get the output:
right before mpi_init
right before mpi_init
right before mpi_init
right before mpi_init
so it seems like the program stops at the mpi_init subroutine and never
gets passed that.
We are hoping that somebody in this group can give us some advice on why
the program seems to stop at the mpi_init command. All help welcome.
Thanks,
Bart
PS: for the record: we are trying this on a Kubuntu system using
bartv@kortrijk:~/mpi_test$ mpif90 --version | head -1
GNU Fortran (GCC) 4.3.0 20071002 (experimental) [trunk revision 128946]
and OpenMPI as our MPI-library:
bartv@kortrijk:~/mpi_test$ dpkg --list | grep openmpi
ii openmpi-bin 1.1-2.3 high performance message passing library
ii openmpi-common 1.1-2.3 high performance message passing library
ii openmpi-dev 1.1-2.3 high performance message passing library
ii openmpi-libs0 1.1-2.3 high performance message passing library
.
- References:
- Prev by Date: Re: OpenMPI Fortran: 'Error reading module mpi' and unexpected but silent termination
- Next by Date: Re: OpenMPI Fortran: 'Error reading module mpi' and unexpected but silent termination
- Previous by thread: Re: OpenMPI Fortran: 'Error reading module mpi' and unexpected but silent termination
- Next by thread: Newbie – Viewing FORTRAN output data on a Windows PC.
- Index(es):
Relevant Pages
|
|