I was able to compile and create executables oceanS and oceanG with no problem. I edited my build.bash because I want to create oceanM and run parallel jobs.
I particularly changed the following in my build.bash:
1. I activated MPI in these parts
Code: Select all
export USE_MPI=on # distributed-memory parallelism
export USE_MPIF90=on # compile with mpif90 script
export which_MPI=mpich # compile with MPICH library
Code: Select all
#export USE_DEBUG=on # use Fortran debugging flags
#export USE_NETCDF4=on # compile with NetCDF-4 library
if [ -n "${USE_MPIF90:+1}" ]; then
case "$FORT" in
ifort )
if [ "${which_MPI}" = "mpich" ]; then
export PATH=/opt/intelsoft/mpich/bin:$PATH
elif [ "${which_MPI}" = "mpich2" ]; then
export PATH=/opt/intelsoft/mpich2/bin:$PATH
elif [ "${which_MPI}" = "openmpi" ]; then
export PATH=/opt/intelsoft/openmpi/bin:$PATH
fi
;;
pgi )
if [ "${which_MPI}" = "mpich" ]; then
export PATH=/usr/vimssw/pgi/mpich/bin:$PATH
elif [ "${which_MPI}" = "mpich2" ]; then
export PATH=/opt/pgisoft/mpich2/bin:$PATH
elif [ "${which_MPI}" = "openmpi" ]; then
export PATH=/opt/pgisoft/openmpi/bin:$PATH
fi
;;
After I type
>> ./build.bash
it would execute the "compilation process" for a while but give the last two lines below indicating an error.
Code: Select all
/usr/bin/ld: cannot find -lnetcdf
make: *** [/local/home/atgallentes/NAKDONG/Project1/oceanM] Error 2
Can someone enlighten me about this problem?
Also attached is a copy of my build.bash
Thank youuuu