pmininni / GHOST

GHOST (the Geophysical High-Order Suite for Turbulence) is an accurate and highly scalable pseudospectral code that solves a variety of PDEs often encountered in studies of turbulent flows.
42 stars 16 forks source link

Issue with Compiling (make) for HD with Lagrangian Particles #5

Closed AnirbanKopty closed 2 years ago

AnirbanKopty commented 2 years ago

I was trying to build (make) the GHOST binary executable file for the HD solver with lagrangian particles PARTICLES = lag in the Makefile.in where I had specified all the paths which worked flawlessly for making the HD solver without lagrangian particles.

Below is the output in shell for the make command which contains the error

make command output

[20ph40006@login08 src]$ make
/lib/cpp -traditional -DNX_=128 -DNY_=128 -DNZ_=128 -DORD_=2 \
   pseudo/pseudospec3D_mod.fpp -o pseudo/pseudospec3D_mod.f90
cd /scratch/20ph40006/GHOST-new/3D/src/fftp-3 && make edit CPP='/lib/cpp -traditional' IKIND='8' \
   CSIZE='32' NSTRIP='1' PRECISION='SINGLE' \
           NSTREAMS='1' DO_HYBRID='DO_HYBRIDno'
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/fftp-3'
/lib/cpp -traditional -DGSINGLE_PRECISION fprecision_mod.fpp -o \
           fprecision_mod.f90
/lib/cpp -traditional -DIKIND_=8 -DCSIZE_=32 -DNSTRIP_=1 \
   -DGSINGLE_PRECISION fftp_mod.fpp -o fftp_mod.f90
/lib/cpp -traditional -DGSINGLE_PRECISION fftp3D.fpp -o fftp3D.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/fftp-3'
cd /scratch/20ph40006/GHOST-new/3D/src/utils && make edit CPP='/lib/cpp -traditional' IKIND='8' \
   CSIZE='32' NSTRIP='1' PRECISION='SINGLE' \
   DO_HYBRID='DO_HYBRIDno' P_CUDA='no'
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/utils'
/lib/cpp -traditional -DGSINGLE_PRECISION  -I../fftp-3  regridutils.fpp -o \
           regridutils.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/utils'
cd ../
echo "Output for this solver includes the following files:" >> \
   ../bin/README_output.txt
echo "(note some output files may not be created, depending" >> \
   ../bin/README_output.txt
echo "on specific solver and options being used)."  >> \
   ../bin/README_output.txt
echo >> ../bin/README_output.txt
for file in pseudospec3D_mod.f90 module_dns.f90 pseudospec3D_hd.f90; do \
 echo "From subroutines in" $file "(see file for more details):"  >> \
   ../bin/README_output.txt ; \
 perl -ne 'print if /Output files contain/ .. /Parameters/' \
   pseudo/$file >> ../bin/README_output.txt ; \
 echo >> ../bin/README_output.txt ; \
done
perl -i -lpe 's/! Parameters//g' ../bin/README_output.txt
if [ 0 -eq 1 ]; then \
if [ -e main3D.fpp.bak ]; then \
 echo 'Files have already been modified!'; else \
 perl -i.bak -pe 's/fftw_f77\(/fftw_f77_\(/g' *.f90 *.fpp ; \
 for item in `cat external`; do \
 `echo 'perl -i -pe 's/${item}[\(]/${item}_\(/g' *.f90'`; \
 `echo 'perl -i -pe 's/${item}[\(]/${item}_\(/g' *.fpp'`; \
 done ; \
 for dir in include pseudo posix mpiio fftp-2 fftp-3 fftp-cu utils /scratch/20ph40006/GHOST-new/3D/src/contrib/nvidia /scratch/20ph40006/GHOST-new/3D/src/lagpart analysis; do \
  cd $dir ; \
  perl -i.bak -pe 's/fftw_f77\(/fftw_f77_\(/g' *.f90 ; \
  for item in `cat ../external`; do \
  `echo 'perl -i -pe 's/${item}[\(]/${item}_\(/g' *.f90'`; \
  done ; cd .. ; \
 done ; \
fi ; fi
cd /scratch/20ph40006/GHOST-new/3D/src/utils && make COMPILE='mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c' gtimer_mod.o
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/utils'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c gtimer_mod.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/utils'
cd /scratch/20ph40006/GHOST-new/3D/src/fftp-3 && make COMPILE='mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c' CUCOMPILE='     -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3  -DGSINGLE_PRECISION -c'
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/fftp-3'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c fprecision_mod.f90
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c fftp_mod.f90
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c fftp.f90
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c fftp3D.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/fftp-3'
cd /scratch/20ph40006/GHOST-new/3D/src/utils && make COMPILE='mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c' gutils_mod.o 
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/utils'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c gutils_mod.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/utils'
cd mpiio && make COMPILE='mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c' 
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/mpiio'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c binary_mod.f90
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c binary_io.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/mpiio'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c pseudo/pseudospec3D_mod.f90
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c pseudo/module_dns.f90
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c pseudo/pseudospec3D_hd.f90
cd /scratch/20ph40006/GHOST-new/3D/src/lagpart && make COMPILE='mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c' gpdbrec_mod.o
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/lagpart'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c gpdbrec_mod.f90
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/lagpart'
cd /scratch/20ph40006/GHOST-new/3D/src/lagpart && make COMPILE='mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c' gpartcomm_mod.o
make[1]: Entering directory `/scratch/20ph40006/GHOST-new/3D/src/lagpart'
mpif90  -O3    -I/home/apps/deps/fftw/3.3.8/intel2018/gnu485/include -I/scratch/20ph40006/GHOST-new/3D/src/fftp-3 -I/scratch/20ph40006/GHOST-new/3D/src/mpiio -I/scratch/20ph40006/GHOST-new/3D/src/utils -I/scratch/20ph40006/GHOST-new/3D/src/include  -I/scratch/20ph40006/GHOST-new/3D/src -I/scratch/20ph40006/GHOST-new/3D/src/lagpart  -c gpartcomm_mod.f90
gpartcomm_mod.f90:26.31:

      TYPE, PUBLIC :: GPartComm
                               1
Error: Finalization at (1) is not yet implemented
make[1]: *** [gpartcomm_mod.o] Error 1
make[1]: Leaving directory `/scratch/20ph40006/GHOST-new/3D/src/lagpart'
make: *** [/scratch/20ph40006/GHOST-new/3D/src/lagpart/gpartcomm_mod.o] Error 2

I'm unsure as to what is wrong at this point.

pmininni commented 2 years ago

Can you send me your Makefile.in, and the output of the following command?

mpif90 --show

AnirbanKopty commented 2 years ago

I have changed the extension to .txt since GitHub didn't allow me to upload .in file Makefile.txt

And, about the command:

[20ph40006@login02 src]$ pwd
/scratch/20ph40006/GHOST/3D/src
[20ph40006@login02 src]$ mpif90 --show
gfortran: error: unrecognized command line option ‘--show’

Also, I noticed one thing, while running the make command to build the lagrangian enabled SOLVER in my own PC (the earlier one is on HPC), it worked, here's the Makefile_PC.txt which worked in my PC.

pmininni commented 2 years ago

OK, it seems you are using gfortran. Try doing the following:

make dist

before compiling again, just in case some old objects were left from a previous compilation. Also, try doing

gfortran --version

in your PC and in the cluster. Old versions of GCC had a problem with finalizations, so let's compare the versions you are using just in case.

AnirbanKopty commented 2 years ago

I see, maybe this is the issue

In Cluster

GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

In my PC

GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'll see if the latest version solves it, thank you

AnirbanKopty commented 2 years ago

Thanks a lot, the problem is solved, the issue was with the old gfortran, thank you again!