I think you cited the correct prior thread on the OMPI users list, and I think it correctly identifies the problem: the linker is finding the "wrong" library first, determines that it is wrong, and skips it.
You probably should remove the "wrong" library from your LD_LIBRARY_PATH (e.g., if you're building for 64 bit, then remove the 32 bit library dir, and vice versa). You *might* be able to remove both of those directories from your LD_LIBRARY_PATH, because gcc might be searching those directories anyway (because it knows where it built/installed itself, unless you moved the tree after installation).
Regardless, this is really more of a gcc question than an Open MPI question, because you probably have this same problem with anything that you compile with this compiler, right?
On May 8, 2013, at 3:12 PM, Matteo Parsani <parsani.matteo_at_[hidden]> wrote:
> Dear All,
> I have recently installed gcc 4.7.3 on my cent OS 6.4. Moreover, I have compiled openmpi 1.6.4 with the above compiler.
> My LD_LIBRARY_PATH is set correctly and it points to both /lib and /lib64 where libgfortran.so and libgcc_s.so for 32 and 64 bits are located.
> Every time I compile a Fortran, a C or a C++ source code with the wrapper mpif90, mpicc or mpicx I get this warning:
> /usr/bin/ld: skipping incompatible /scratch/home0/pmatteo/research/lib_install/lib/libgfortran.so when searching for -lgfortran
> /usr/bin/ld: skipping incompatible /scratch/home0/pmatteo/research/lib_install/lib/libgcc_s.so when searching for -lgcc_s
> I have switch my LD_LIBRARY_PATH as suggested in this thread: http://www.open-mpi.org/community/lists/users/2009/02/8067.php
> but nothing change.
> Any idea what I am doing wrong?
> I know that it is just a warning but I would like to avoid it.
> Thank you.
> users mailing list
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/