No, it is not a documentation bug. You are replacing the Fortran compiler
that the wrapper uses with a compiler from a completely different family.
The FAQ entry advises against messing with the wrapper configuration,
selected during library build time. Listing all possible effects that might
result from changing the compiler is not an option.

 

However, it works if for example you configure Open MPI with the system
supplied version of gfortran and then specify a later gfortran version, e.g.
OMPI_FC=gfortran-4.7 (unless the module format has changed in the meantime).

 

Kind regards,

Hristo

--

Hristo Iliev, PhD – High Performance Computing Team

RWTH Aachen University, Center for Computing and Communication

Rechen- und Kommunikationszentrum der RWTH Aachen

Seffenter Weg 23, D 52074 Aachen (Germany)

Phone: +49 241 80 24367 – Fax/UMS: +49 241 80 624367

 

 

From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On
Behalf Of Dominik Goeddeke
Sent: Wednesday, March 13, 2013 10:17 AM
To: us...@open-mpi.org
Subject: Re: [OMPI users] bug in mpif90? OMPI_FC envvar does not work with
'use mpi'

 

Hi,

thanks, I remember that now. So it is a "documentation bug" in that
particular FAQ entry.

Dominik

On 03/13/2013 09:58 AM, Iliev, Hristo wrote:

Hi, Dominik,
 
gfortran and ifort produce Fortran module files (*.mod) with completely
different and hence incompatible formats. You cannot use a module compiled
with gfortran in ifort and vice versa. That's why many Fortran libraries
come with explicit module interface definitions that have to be compiled
with the specific Fortran compiler before the library can be used as a
module.
 
Hope that helps to clarify the issue.
 
Kind regards,
Hristo
 
--
Hristo Iliev, PhD – High Performance Computing Team
RWTH Aachen University, Center for Computing and Communication
Rechen- und Kommunikationszentrum der RWTH Aachen
Seffenter Weg 23, D 52074 Aachen (Germany)
Phone: +49 241 80 24367 – Fax/UMS: +49 241 80 624367
 
 

-----Original Message-----
From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org]
On Behalf Of Dominik Goeddeke
Sent: Tuesday, March 12, 2013 10:32 PM
To: Open MPI Users
Subject: [OMPI users] bug in mpif90? OMPI_FC envvar does not work with
'use mpi'
 
Dear OMPI folks,
 
according to this FAQ entry
 
http://www.open-mpi.org/faq/?category=mpi-apps#override-wrappers-
after-v1.0
 
one way to use the mpif90 compiler wrapper with another compiler than
Open-MPI was built with is to set the envvar OMPI_FC to the other

compiler.

 
Using this simple toy code
 

program test
  implicit none
  include 'mpif.h'
  integer :: ierr
  call MPI_Init(ierr)
  print *, "Hello"
  call MPI_Finalize(ierr)
end program test

 
I indeed see the expected (and documented) behaviour:
 

bash$ export OMPI_FC=ifort
bash$ mpif90 test.f90
bash$ mpirun -np 3 ./a.out

 
Now, If I replace these two lines in the reproducer
 

implicit none
include 'mpif.h'

 
with these two lines (which is actually the MPI-2 way of doing things, as

Jeff

himself praises in this blog entry:
http://blogs.cisco.com/performance/a-bucket-full-of-new-mpi-fortran-
features)
 

use mpi
implicit none

 
I get this as the output of mpif90:
 

test.f90(7): error #7013: This module file was not generated by any
release of this compiler.   [MPI]
use mpi
----^
compilation aborted for test.f90 (code 1)

 
There seems to be no language on this particular problem in the FAQs, so I
assume this is either a documentation bug or an actual bug in the compiler
wrappers. The approach is clearly marked as "not recommended", but
actually, this problem can be quite a showstopper because on laptops,
people (like me) are often too lazy to compile Open-MPI (and consequently,
valgrind and friends) multiple times, especially since the FAQ says that

this

should work :)
 
I am using the system gcc of ubuntu 12.04 (4.6.3-1ubuntu5) and OMPI 1.6.3.
Of course everything works if I use a properly installed machine that

provides

OpenMPI-builds for different compilers via modules, and also the oldish
"include 'mpif.h'" approach is a sufficient workaround.
 
Thanks for any clarification, hope this reproducer helps,
 
Cheers,
 
Dominik
 
--
Jun.-Prof. Dr. Dominik Göddeke
Hardware-orientierte Numerik für große Systeme Institut für Angewandte
Mathematik (LS III) Fakultät für Mathematik, Technische Universität
Dortmund http://www.mathematik.tu-dortmund.de/~goeddeke
Tel. +49-(0)231-755-7218  Fax +49-(0)231-755-5933
 
_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users






_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users






-- 
Jun.-Prof. Dr. Dominik Göddeke
Hardware-orientierte Numerik für große Systeme
Institut für Angewandte Mathematik (LS III)
Fakultät für Mathematik, Technische Universität Dortmund
http://www.mathematik.tu-dortmund.de/~goeddeke
Tel. +49-(0)231-755-7218  Fax +49-(0)231-755-5933
 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to