Gilles,
I went for the radical solution and completely removed intel prallel studio from my system (I used it for ifort but I prefer to use gfortran now). The script works now. Thanks a lot for your help Gilles. Julien 2016-11-16 1:24 GMT-05:00 Gilles Gouaillardet <gilles.gouaillar...@gmail.com >: > Julien, > > the fortran lib is in /usr/lib/libmpi_mpifh.so.12 > the C lib is the one from Intel MPI > > i guess the C lib is in /usr/lib, and not /usr/lib/openmpi/lib > prepending /usr/lib is never recommended, so i suggest you simply remove > /opt/intel/compilers_and_libraries_2016.1.150/linux/mpi/intel64/lib > from your LD_LIBRARY_PATH > > Cheers, > > Gilles > > On Tue, Nov 15, 2016 at 10:33 PM, Julien de Troullioud de Lanversin > <j.detroulli...@gmail.com> wrote: > > Gilles, > > > > > > Thank you for your fast reply. > > > > When I type whereis mpifort I have the following: mpifort: > > /usr/bin/mpifort.openmpi /usr/bin/mpifort /usr/share/man/man1/mpifort.1. > gz > > > > I made sure I exported the LD_LIBRARY_PATH after I prepended > > /usr/lib/openmpi/lib. The same error is produced. > > > > If I type ldd ./test I get the following: > > > > linux-vdso.so.1 => (0x00007ffde08ef000) > > libmpi_mpifh.so.12 => /usr/lib/libmpi_mpifh.so.12 > (0x00002b5a2132c000) > > libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 > > (0x00002b5a21585000) > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002b5a218b0000) > > libmpi.so.12 => > > /opt/intel/compilers_and_libraries_2016.1.150/linux/ > mpi/intel64/lib/libmpi.so.12 > > (0x00002b5a21c7a000) > > libopen-pal.so.13 => /usr/lib/libopen-pal.so.13 (0x00002b5a2243c000) > > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > > (0x00002b5a226d9000) > > libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 > > (0x00002b5a228f7000) > > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002b5a22b36000) > > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 > > (0x00002b5a22e3f000) > > /lib64/ld-linux-x86-64.so.2 (0x000055689175a000) > > librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00002b5a23056000) > > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002b5a2325e000) > > libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 > (0x00002b5a23462000) > > libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 > > (0x00002b5a23666000) > > libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 > > (0x00002b5a238a0000) > > libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 > > (0x00002b5a23aac000) > > > > > > Thanks. > > > > > > > > Julien > > > > > > > > 2016-11-15 23:52 GMT-05:00 Gilles Gouaillardet > > <gilles.gouaillar...@gmail.com>: > >> > >> Julien, > >> > >> first, make sure you are using the Open MPI wrapper > >> which mpifort > >> should be /usr/lib/openmpi/bin if i understand correctly > >> then make sure you exported your LD_LIBRARY_PATH *after* you prepended > >> the path to Open MPI lib > >> in your .bashrc you can either > >> LD_LIBRARY_PATH=/usr/lib/openmpi/lib:$LD_LIBRARY_PATH > >> export LD_LIBRARY_PATH > >> or directly > >> export LD_LIBRARY_PATH=/usr/lib/openmpi/lib:$LD_LIBRARY_PATH > >> > >> then you can > >> ldd ./test > >> and comfirm all MPI libs (both C and Fortran) are pointing to Open MPI > >> > >> Cheers, > >> > >> Gilles > >> > >> On Tue, Nov 15, 2016 at 9:41 PM, Julien de Troullioud de Lanversin > >> <j.detroulli...@gmail.com> wrote: > >> > Hi all, > >> > > >> > > >> > I am completely new to MPI (and relatively new to linux). I am sorry > if > >> > the > >> > problem I encountered is obvious to solve. > >> > > >> > When I run the following simple test with mpirun: > >> > > >> > program hello_world > >> > > >> > use mpi > >> > integer ierr > >> > > >> > call MPI_INIT ( ierr ) > >> > print *, "Hello world" > >> > call MPI_FINALIZE ( ierr ) > >> > > >> > end program hello_world > >> > > >> > > >> > I get the following error : > >> > ./test: symbol lookup error: /usr/lib/libmpi_mpifh.so.12: undefined > >> > symbol: > >> > mpi_fortran_weights_empty > >> > > >> > I compiled the source code like this: mpifort -o test test.f90 > >> > > >> > I look up on the internet and I understand that it is a problem with > the > >> > shared library of open mpi. But I think I correctly added the open mpi > >> > lib > >> > to ld_library_path (I added the first directory -- > /usr/lib/openmpi/lib > >> > -- > >> > via .bashrc). Here is an echo $LD_LIBRARY_PATH: > >> > > >> > > >> > $/usr/lib/openmpi/lib:/opt/intel/compilers_and_libraries_ > 2016.1.150/linux/compiler/lib/intel64:/opt/intel/compilers_ > and_libraries_2016.1.150/linux/mpi/intel64/lib:/opt/ > intel/compilers_and_libraries_2016.1.150/linux/mpi/mic/lib:/ > opt/intel/compilers_and_libraries_2016.1.150/linux/ > ipp/lib/intel64:/opt/intel/compilers_and_libraries_2016. > 1.150/linux/compiler/lib/intel64:/opt/intel/compilers_ > and_libraries_2016.1.150/linux/mkl/lib/intel64:/opt/ > intel/compilers_and_libraries_2016.1.150/linux/tbb/lib/ > intel64/gcc4.4:/opt/intel/debugger_2016/libipt/intel64/ > lib:/opt/intel/compilers_and_libraries_2016.1.150/linux/ > daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_ > 2016.1.150/linux/daal/../compiler/lib/intel64_lin:/opt/ > intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/ > intel64:/opt/intel/compilers_and_libraries_2016.1.150/ > linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_ > 2016.1.150/linux/mpi/mic/lib:/opt/intel/compilers_and_ > libraries_2016.1.150/linux/ipp/lib/intel64:/opt/intel > >> > >> /compilers_and_libraries_2016.1.150/linux/compiler/lib/ > intel64:/opt/intel/compilers_and_libraries_2016.1.150/ > linux/mkl/lib/intel64:/opt/intel/compilers_and_libraries_ > 2016.1.150/linux/tbb/lib/intel64/gcc4.4:/opt/intel/ > debugger_2016/libipt/intel64/lib:/opt/intel/compilers_and_ > libraries_2016.1.150/linux/daal/lib/intel64_lin:/opt/ > intel/compilers_and_libraries_2016.1.150/linux/daal/../tbb/ > lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_ > 2016.1.150/linux/daal/../compiler/lib/intel64_lin > >> > > >> > The path that my system uses at run time (/usr/lib/) is not in the > >> > library > >> > path. I thus don't know why this path is used. > >> > > >> > I would be thankful if anyone could help me with this issue. > >> > > >> > > >> > Best, > >> > > >> > > >> > Julien de Troullioud de Lanversin > >> > > >> > _______________________________________________ > >> > users mailing list > >> > users@lists.open-mpi.org > >> > https://rfd.newmexicoconsortium.org/mailman/listinfo/users > >> _______________________________________________ > >> users mailing list > >> users@lists.open-mpi.org > >> https://rfd.newmexicoconsortium.org/mailman/listinfo/users > > > > > > > > > > -- > > de Troullioud de Lanversin Julien > > > > 瞩戈亮 > > > > _______________________________________________ > > users mailing list > > users@lists.open-mpi.org > > https://rfd.newmexicoconsortium.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users@lists.open-mpi.org > https://rfd.newmexicoconsortium.org/mailman/listinfo/users > -- de Troullioud de Lanversin Julien 瞩戈亮
_______________________________________________ users mailing list users@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/users