I seem to have fixed the problem using the miracle of LD_LIBRARY_PATH.  I probably should have known about the importance of that environment variable already, and I imagine no knowing about it has caused me problems in the past.

 

So besides the important environment variables listed in the openmpi docs, like LDFLAGS, perhaps something about the variable LD_LIBRARY_PATH should be mentioned as well.

 

 

From: users-bounces@open-mpi.org [mailto:users-bounces@open-mpi.org] On Behalf Of Jason Palmer
Sent: Tuesday, August 25, 2009 5:46 AM
To: users@open-mpi.org
Subject: [OMPI users] gfortran, gcc4.2, openmpi 1.3.3, fortran compile errors

 

Hi,

 

I’m trying to build openmpi with gcc4.2. I built gcc with thread support in order to use OpenMP. I have been able to compile and run a threaded OpenMP program with gfortran from gcc4.2, so the gfortran program itself seems to be working.

 

However, when I try to configure OpenMPI 1.3.3, setting the FC, F77, and F90 environment variables to the gfortran I built, and thd CC to the gcc, it fails to “run a simple Fortran 77 program” and exits the configure script saying Fortran doesn’t work. But I know the gfortran I’m specifying does work.

 

I have tried specifying –m64 in the flags, and specifying the gcc4.2 library directory (for libgfortran etc.) but it still fails on the simple Fortran test.

 

I’m using Fedora Redhat Linux, gcc 4.2, and openmpi 1.3.3. Has anyone gotten OpenMPI to configure and build with a gcc with OpenMP (thread) support?

 

The configure output and config.log are attached.

 

Thanks!

 

Jason