Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI users] bug in mpif90? OMPI_FC envvar does not work with 'use mpi'
From: Dominik Goeddeke (dominik.goeddeke_at_[hidden])
Date: 2013-03-13 05:16:54


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-bounces_at_[hidden] [mailto:users-bounces_at_[hidden]]
>> 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
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> 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