Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

libgfortran.so.3: cannot open shared object file:

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

anikett

New member
Hi,
I am beginner to WRF.
I have configured and compiled WRF and WPS successfully.
and then ran ungrib.exe and geogrid and metgrid.exe and real.exe.

when I run wrf.exe on more than one node using MPI it gives the following errors. (although a simple command ./wrf.exe is running on a single node but runtime error segmentation fault)
~/WRF/test/em_real$ mpiexec -np 4 -hostfile ~/hostfile ./wrf.exe
./wrf.exe: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
./wrf.exe: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
./wrf.exe: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
./wrf.exe: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory

although if you see in following terminal output libgfortran.so.3 is available in the system. (I am working on a my university cluster on which i am not having root/sudo access)
anikett:~/WRF/test/em_real$ locate libgfortran
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.a
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.so
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortran.spec
/usr/lib/gcc/x86_64-linux-gnu/5/libgfortranbegin.a
/usr/lib/x86_64-linux-gnu/libgfortran.so.3
/usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
/usr/lib/x86_64-linux-gnu/libgfortran.so.4
/usr/lib/x86_64-linux-gnu/libgfortran.so.4.0.0
/usr/local/lib/python3.5/dist-packages/numpy/.libs/libgfortran-ed201abd.so.3.0.0
/usr/local/lib/python3.5/dist-packages/scipy/.libs/libgfortran-ed201abd.so.3.0.0
/usr/share/doc/libgfortran-5-dev
/usr/share/doc/libgfortran3
/usr/share/doc/libgfortran4

even though I have followed all the exact process that is mentioned in compiling WRF page.
gfortran is installed.
anikett:~/WRF/test/em_real$ which gfortran
/usr/bin/gfortran
anikett:~/WRF/test/em_real$

and MPICH installation is also correct because I have ran some MPI programs(Both C and Fortran) on different nodes from one node (using mpiexec) successfully.
I have been stuck at this for couple of days now.
kindly help.
Thanks anyway.
 
Hi,
Do you have the environment variable LD_LIBRARY_PATH set? Check to see if you have the path to the libgfortran* libraries in that setting. If not, add it using the following syntax, and see if it makes any difference.

(for a bash shell)
export LD_LIBRARY_PATH=path-to-your-libs:$LD_LIBRARY_PATH
 
Top