Re: OpenMPI Fortran: 'Error reading module mpi' and unexpected but silent termination



On 2007-10-30, Steven G. Kargl <kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

[...]
Yes. This could be the problem. Gfortran 4.3.0 20071002 will
write an MD5 value for the module in the first two lines, and
your mpi.mod is missing the MD5 signature.

OK. We have downgraded our gfortran compiler. We are now using
the packages of our Kubuntu installation (7.10 - Gutsy Gibbon) for
both OpenMPI and gfortran:

bartv@kortrijk:~$ 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
bartv@kortrijk:~$ dpkg --list | grep gfortran
ii gfortran 4.1.2-1ubuntu1 The GNU Fortran 95 compiler
ii gfortran-4.1 4.1.2-0ubuntu4 The GNU Fortran 95 compiler
ii libgfortran1 4.1.2-0ubuntu4 Runtime library for GNU Fortran applications
ii libgfortran1-dev 4.1.2-0ubuntu4 GNU Fortran library development

The testprogram I'm using is the following:


program test_mpi

use mpi

implicit none
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


I get undefined reference errors when I simply compile with mpif90 without
any additional flags:

bartv@kortrijk:~/mpi_test$ mpif90 test_mpi.f90
/tmp/ccNMqzGg.o: In function `MAIN__':
test_mpi.f90:(.text+0x9c): undefined reference to `mpi_init_'
test_mpi.f90:(.text+0x11e): undefined reference to `mpi_comm_rank_'
test_mpi.f90:(.text+0x210): undefined reference to `mpi_finalize_'
collect2: ld returned 1 exit status

So I therefore add the -fsecond-underscore flag and things seem to compile
fine:

bartv@kortrijk:~/mpi_test$ mpif90 test_mpi.f90 -fsecond-underscore
bartv@kortrijk:~/mpi_test$

Now, as I try to run this, the program silently exits somewhere in the
mpi_init subroutine and it doesn't seem to proceed beyond that routine:

bartv@kortrijk:~/mpi_test$ mpirun -np 4 a.out
right before mpi_init
right before mpi_init
right before mpi_init
right before mpi_init
bartv@kortrijk:~/mpi_test$


And this is where we are stuck :-(

Any help appreciated...

Regards,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages

  • Re: OpenMPI Fortran: Error reading module mpi and unexpected but silent termination
    ... your mpi.mod is missing the MD5 signature. ... We have downgraded our gfortran compiler. ... any additional flags: ...
    (comp.lang.fortran)
  • Re: Using user defined type in Fortan 77 subroutines
    ... 60 DDOT = DTEMP ... gfortran -c DNAD.f90 ... when I compile blas.for using ... regardless of whether the standard allows the ...
    (comp.lang.fortran)
  • Re: Difficult example?
    ... > has a bug with its LOGICALtype and kind. ... if there were a gfortran compiler I could download I ... compile and run it, then compile and run the resulting ... You could wipe out all the subroutines except for ...
    (comp.lang.fortran)
  • Re: Can somebody Help me??
    ... compile the code with Portland Group f90 or hpf compiler. ... ifexit ... And, if, as you indicate it's taken by the other compilers it seems there's something wrong w/ the version of gfortran you're using on a very superficial reading. ... but OP does not mind for he uses Portland Group compiler in general and just checks compatiblity with gfortran when needed. ...
    (comp.lang.fortran)
  • Re: gfortran: bug or non-standard syntax?
    ... are changed are almost always the result of accessing an array (writing ... as any software gfortran is neither bugfree nor feature ... warn all -stand f03" when you compile with ifort and check whether you ... If you think this is a bug in gfortran, feel free to fill a bug ...
    (comp.lang.fortran)