Message Boards

Back

compiling Delft3D on Linux

Pushpa Dissanayake, modified 1 Month ago.

compiling Delft3D on Linux

Youngling Posts: 22 Join Date: 5/3/11 Recent Posts

Hallo everyone,

I am working on RedHat Enterprise Linux Server 7.4 (Maipo). Using GNU Fortran 5.3.0, I try to compile and end up with the following error relating to 'libtools',

make[2]: Leaving directory `/gpfs/fs5/home-sh/sungw649/D3D2/src/third_party_open/FLAP'
Making install in polypack
make[2]: Entering directory `/gpfs/fs5/home-sh/sungw649/D3D2/src/third_party_open/polypack'
Making install in src
make[3]: Entering directory `/gpfs/fs5/home-sh/sungw649/D3D2/src/third_party_open/polypack/src'
/bin/sh ../../../libtool  --tag=F77   --mode=compile mpif77 -r8 -g -132 -recursive -traceback -recursive -traceback -c -o ppdipo.lo ppdipo.f
libtool: compile:  mpif77 -r8 -g -132 -recursive -traceback -recursive -traceback -c ppdipo.f  -fPIC -o .libs/ppdipo.o
gfortran: error: unrecognized command line option ‘-r8’
gfortran: error: unrecognized command line option ‘-132’
gfortran: error: unrecognized command line option ‘-recursive’
gfortran: error: unrecognized command line option ‘-traceback’
gfortran: error: unrecognized command line option ‘-recursive’
gfortran: error: unrecognized command line option ‘-traceback’
make[3]: *** [ppdipo.lo] Error 1
make[3]: Leaving directory `/gpfs/fs5/home-sh/sungw649/D3D2/src/third_party_open/polypack/src'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/gpfs/fs5/home-sh/sungw649/D3D2/src/third_party_open/polypack'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/gpfs/fs5/home-sh/sungw649/D3D2/src/third_party_open'
make: *** [install-recursive] Error 1

Could anyone please help me, how to overcome this for a successful compilation?

Please find below my compilation script.

cd $sourcedir
 
# load modules
module load libtool2.4.6
module load python2.7.13
module load petsc3.10.4
module load gcc5.3.0
module load metis5.1.0

export PATH=/sfs/fs5/sw/mpich/mpich3.3/usr/bin:$PATH
export LD_LIBRARY_PATH=/sfs/fs5/sw/mpich/mpich3.3/usr/lib:$PATH

# setting environment variables needed for installation
export FC=mpi77
export MPIFC=mpif90
export PKG_CONFIG_PATH=/sfs/fs5/sw/petsc/petsc3.10.4/source/petsc-3.10.4/linux-opt/lib/pkgconfig:$PKG_CONFIG_PATH

export CC=gcc
export CXX=g++
export FC=gfortran
export CFLAGS="-O2"
export CXXFLAGS="-O2"
export FCFLAGS="-O2"
export FFLAGS="-O2"
export METIS_LIBS="-L/sfs/fs5/sw/metis/metis5.1.0/usr/lib -lmetis"

#change permission for execution of python files
#chmod +x makedepo.py
#chmod +x scripts/generate.py

# creating a configure file
aclocal
autoconf
autoreconf -i
./autogen.sh
cd third_party_open/kdtree2
./autogen.sh
cd -
make clean

./configure --prefix=$installdir --with-mpi --with-metis --with-petsc

 

I really appreciate your time.

Many thanks,

Dissa

compiling on linux
Adri Mourits, modified 1 Month ago.

RE: compiling Delft3D on Linux

Yoda Posts: 1221 Join Date: 1/3/11 Recent Posts

Hi Dissa,

For some reason, automake added Intel Fortran flags instead of Gnu Fortran flags. Maybe mpif90 is compiled with Intel.

Regards,

Adri

Pushpa Dissanayake, modified 1 Month ago.

RE: compiling Delft3D on Linux

Youngling Posts: 22 Join Date: 5/3/11 Recent Posts

Hi Adri,

Many thanks for your response! I have already tried with Intel compilier also, but I got the same error. Please see the compiling script below,

cd $sourcedir
# load modules
module load libtool2.4.6
module load intel17.0.4 intelmpi17.0.4
module load python2.7.13
module load petsc3.10.4
module load metis5.1.0
export PATH=/sfs/fs5/sw/mpich/mpich3.3/usr/bin:$PATH
export LD_LIBRARY_PATH=/sfs/fs5/sw/mpich/mpich3.3/usr/lib:$PATH
# setting environment variables needed for installation
export FC=mpiifort
export MPIFC=mpiifort
export PKG_CONFIG_PATH=/sfs/fs5/sw/petsc/petsc3.10.4/source/petsc-3.10.4/linux-opt/lib/pkgconfig:$PKG_CONFIG_PATH
export PATH=/sfs/fs5/sw/mpich/mpich3.3/usr/bin:$PATH
export LD_LIBRARY_PATH=/sfs/fs5/sw/mpich/mpich3.3/usr/lib:$PATH
export METIS_LIBS="-L/sfs/fs5/sw/metis/metis5.1.0/usr/lib -lmetis"
# creating a configure file
./autogen.sh
cd third_party_open/kdtree2
./autogen.sh
cd -
CFLAGS="-O2" CXXFLAGS="-O2" FFLAGS="-O2" FCFLAGS="-O2" ./configure --prefix=$installdir --with-mpi --with-metis --with-petsc
make ds-install

If 'mpif90' is compiled with Intel compiler, the above script should work, which asks for Intel fortran compiler.

What do you recommend for a successful compilation? If you need further information, please let me know.

In the mean time, I'll  let you know, if my attempts succeeded.

Many thanks

Dissa

 

Adri Mourits, modified 1 Month ago.

RE: compiling Delft3D on Linux

Yoda Posts: 1221 Join Date: 1/3/11 Recent Posts

Hi Dissa,

I don't see any direct errors in the way you try to compile. Some general remarks:

It's important that you use the same compiler vendor for ALL libraries (including the mpi shell, petsc, mpich etc.). So OR compile them all with the GNU compiler OR all with the Intel compiler.

If you're still stuck, it might help to look at script "...\src\build_h6.sh", which is used inside Deltares. When you use it, you will have to change all explicit paths in there, but just looking at what happens there might help.

Regards,

Adri