Am 19.05.2012 um 12:55 schrieb Tim Prince:

> On 5/19/2012 2:20 AM, Sergiy Bubin wrote:
>> I built OpenMPI with that set of intel compilers. Everything seems to be 
>> fine and I can compile my fortran+MPI code with no problem when I invoke 
>> ifort. I should say that I do not actually invoke the "wrapper" mpi 
>> compiler. I normally just add flags as MPICOMPFLAGS=$(shell mpif90 
>> --showme:compile) and MPILINKFLAGS=$(shell mpif90 --showme:link) in my 
>> makefile. I know it is not the recommended way of doing things but the 
>> reason I do that is that I absolutely need to be able to use different 
>> fortran compilers to build my fortran code.
> Avoiding the use of mpif90 accomplishes nothing for changing between 
> incompatible Fortran compilers.   Run-time libraries are incompatible among 
> ifort, gfortran, and Oracle Fortran, so you can't link a mixture of objects 
> compiled by incompatible Fortran compilers except in limited circumstances.  
> This includes the MPI Fortran library.

Maybe I get your statement in the wrong way, but I wouldn't say that these are 
"limited circumstances". How often does one link an Intel compiled program with 
a library form which you only use the *.so files which are already included in 
the distribution without recompiling the whole stuff? E.g. when I compile a 
graphical application I don't recompile the X11 libraries, which were compiled 
with gcc instead of icc.

-- Reuti


> I don't see how it is too great an inconvenience for your Makefile to set 
> PATH and LD_LIBRARY_PATH to include the mpif90 corresponding to the chosen 
> Fortran compiler.  You may need to build your own mpif90 for gfortran as well 
> as the other compilers, so as to configure it to keep it off the default 
> PATHs (e.g. --prefix=/opt/ompi1.4gf/), if you can't move the Ubuntu ompi.
> Surely most of this is implied in the OpenMPI instructions.
> 
> -- 
> Tim Prince
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


Reply via email to