0

I am working on ROMS modeling. I just installed Openmpi on out linux cluster. I also adjusted LD_LIBRARY_PATH accordingly. I am now facing a unique probelm.

when I give mpirun -np 4 ./oceanG ocean.in from bash shell, it runs the model fine. However, the same command in batch file unable to link ./oceanG to netcdff5.so.

I get following error message.

./oceanG: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory ./oceanG: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory ./oceanG: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory ./oceanG: error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory

my PBS file his as follows

#!/bin/bash
#$ -N Upwelling_test
#$-l qname=long_4.q
#$ -cwd
#$ -pe mpich 4
 LD_LIBRARY_PATH=/opt/intel/openmpi/lib:/opt/intel/netcdf4.1.3/lib:/opt/intel/Compiler/11.0/081/lib/intel64:
 /opt/intel/openmpi/bin/mpirun -np 4 ./oceanG  ocean.in

searching for a solution to this strange

Rob
  • 14,746
  • 28
  • 47
  • 65

2 Answers2

0

You should try adding export before LD_LIBRARY_PATH=/opt/intel/....

Without the export keyword, the variable set in your script will not be passed down to any processes that your script starts.

kgutwin
  • 867
  • 1
  • 10
  • 15
0

I had the same issue. Even I put the export before the LD_LIBRARY_PATH.

export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH

It works in the interaction model but through the error "error while loading shared libraries: libnetcdff.so.5: cannot open shared object file: No such file or directory" when submit to the cluster.

argan
  • 61
  • 4