DOI-USGS / COAWST

COAWST modeling system git repository
Other
105 stars 50 forks source link

Error in inlet_test coupled tutorial #167

Open cnwong2023 opened 1 year ago

cnwong2023 commented 1 year ago

I am trying to run INLET_TEST/Coupled = ROMS+SWAN same grid. When I try to build the coawst model, the below error appeared. sudo ./build_coawst.sh [sudo] password for leon: $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f rm -f -r core *.ipo ./Build /root/make_macros.mk $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- cp -f /usr/include/netcdf.mod ./Build cp -f /usr/include/typesizes.mod ./Build cp -p /root/make_macros.mk ./Build $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- \ cd ./Build; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include /home/leon/COAWST//Master/MCT_coupler/mod_coupler_kinds.F > mod_coupler_kinds.f90; \ /home/leon/COAWST//ROMS/Bin/cpp_clean mod_coupler_kinds.f90; \ -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mod_coupler_kinds.f90; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include /home/leon/COAWST//Master/MCT_coupler/mct_coupler_params.F > mct_coupler_params.f90; \ /home/leon/COAWST//ROMS/Bin/cpp_clean mct_coupler_params.f90; \ -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mct_coupler_params.f90; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include /home/leon/COAWST//Master/MCT_coupler/mod_coupler_iounits.F > mod_coupler_iounits.f90; \ /home/leon/COAWST//ROMS/Bin/cpp_clean mod_coupler_iounits.f90; \ -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mod_coupler_iounits.f90;

/bin/sh: 6: -c: not found

/bin/sh: 10: -c: not found

/bin/sh: 14: -c: not found make: ** [makefile:603: mct_params] Error 127 $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- make: Nothing to be done for 'wrfclean'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- make: Nothing to be done for 'wrf'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- make: Nothing to be done for 'wrfhydroclean'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- make: Nothing to be done for 'wrfhydro'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- make: Nothing to be done for 'ww3clean'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- make: Nothing to be done for 'ww3'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- rm -rf SWAN/src_coawst; \ cd SWAN; ls; \ cmake -P clobber.cmake; \ echo "cleaned swan"; CMakeLists.txt LICENSE README.md bin build clobber.cmake cmake doc misc src switch.pl tools /bin/sh: 3: cmake: not found cleaned swan $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- mkdir SWAN/src_coawst; \ cp -r SWAN/src/ SWAN/src_coawst/; \ cd SWAN/src_coawst; \ echo ""; \ for file in mod_swan_kinds ocpcre ocpids ocpmix swancom1 swancom2 swancom3 swancom4 swancom5 swanmain swanout1 swanout2 swanparll swanpre1 swanpre2 swanpre3 swanser SwanSpectPart swan_iounits swmod1 swmod2 swpoint waves_control waves_coupler; do \ mv $file.ftn $file.b; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include "$file.b" > "$file.ftn"; \ /home/leon/COAWST//ROMS/Bin/cpp_clean "$file.ftn"; \ rm $file.b; \ done; \ echo ""; \ for file in agioncmd fftpack51 mod_xnl4v5 m_constants m_fileio nctablemd SdsBabanin serv_xnl4v5 SwanBndStruc SwanBpntlist SwanBraggScat SwanCheckGrid SwanCompdata SwanCompUnstruc SwanComputeForce SwanConvAccur SwanConvStopc SwanCreateEdges SwanCrossObstacle SwanDiffPar SwanDispParm SwanFindObstacles SwanFindPoint SwanGradDepthorK SwanGradVel SwanGridCell SwanGriddata SwanGridFace SwanGridobjects SwanGridTopology SwanGridVert SwanGSECorr SwanIEM SwanInitCompGrid SwanInterpolateAc SwanInterpolateOutput SwanInterpolatePoint SwanIntgratSpc SwanMaxOverNodes SwanMinOverNodes SwanPointinMesh SwanPrepComp SwanPrintGridInfo SwanPropvelS SwanPropvelX SwanPunCollect SwanQCM SwanReadADCGrid SwanReadEasymeshGrid SwanReadfort18 SwanReadGrid SwanReadTriangleGrid SwanSumOverNodes SwanSweepSel SwanThreadBounds SwanTranspAc SwanTranspX SwanVertlist SwanVTKPDataSets SwanVTKWriteData SwanVTKWriteHeader swn_outnc; do \ mv $file.ftn90 $file.b; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include $file.b > $file.ftn90; \ rm $file.b; \ /home/leon/COAWST//ROMS/Bin/cpp_clean "$file.ftn90"; \ done; \ echo ""; \ cd hcat; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include swanhcat.ftn > swanhcat.b; \ mv swanhcat.b swanhcat.ftn; \ echo ""; \ cd ../..; mkdir build; \ cd build; \ cmake .. -G "Unix Makefiles" -DUNIX=ON -DMPI=ON -DNETCDF=ON -DCMAKE_VERBOSE_MAKEFILE=ON; \ make; \ echo " "; echo " "; \ echo ""; \ echo "-------- Finished compiling SWAN ------------" \ echo ""

mkdir: cannot create directory ‘build’: File exists /bin/sh: 25: cmake: not found make[1]: Entering directory '/home/leon/COAWST/SWAN/build' make[1]: *** No targets specified and no makefile found. Stop. make[1]: Leaving directory '/home/leon/COAWST/SWAN/build'

-------- Finished compiling SWAN ------------ echo $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /bin/sh: 0: Illegal option -- /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Nonlinear/interp_floats.F > Build/interp_floats.f90 ROMS/Bin/cpp_clean Build/interp_floats.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Modules/mod_floats.F > Build/mod_floats.f90 ROMS/Bin/cpp_clean Build/mod_floats.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Utility/destroy.F > Build/destroy.f90 ROMS/Bin/cpp_clean Build/destroy.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Modules/mod_iounits.F > Build/mod_iounits.f90 ROMS/Bin/cpp_clean Build/mod_iounits.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Modules/mod_kinds.F > Build/mod_kinds.f90 ROMS/Bin/cpp_clean Build/mod_kinds.f90 cd ./Build; -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mod_kinds.f90 /bin/sh: 1: -c: not found make: *** [ROMS/Modules/Module.mk:15: Build/mod_kinds.o] Error 127

Thanks in advanced.

jcwarner-usgs commented 1 year ago

looks like it is not finding your compiler. what did you set for FORT in build_coawst.bash

cnwong2023 commented 1 year ago

build_coawst.bash setting: export USE_MPI=on # distributed-memory parallelism export USE_MPIF90=on # compile with mpif90 script

export which_MPI=intel # compile with mpiifort library

export which_MPI=mpich # compile with MPICH library

export which_MPI=mpich2 # compile with MPICH2 library

export which_MPI=mvapich2 # compile with MVAPICH2 library

export which_MPI=openmpi # compile with OpenMPI library

export USE_OpenMP=on # shared-memory parallelism

export FORT=ifort

export FORT=gfortran

export FORT=pgi

export USE_DEBUG=on # use Fortran debugging flags export USE_LARGE=on # activate 64-bit compilation

My complier information: gfortran --version GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 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.

which gfortran /usr/bin/gfortran

jcwarner-usgs commented 1 year ago

not sure. why do you need to sudo to get it to compile? maybe that is an issue. Your system is not finding the compiler. it has " -c...." but it should have "gfortran -c ..."

Also, swan needs to use Cmake. and your system does not have it /bin/sh: 25: cmake: not found

cnwong2023 commented 1 year ago

This is my previous compilation log. It seems that the compilation require permission to write in /usr/local/include?

./build_coawst.sh $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f rm -f -r core *.ipo ./Build /home/leon/make_macros.mk $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f cp -f /usr/include/netcdf.mod ./Build cp -f /usr/include/typesizes.mod ./Build cp -p /home/leon/make_macros.mk ./Build $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f \ cd ./Build; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include /home/leon/COAWST//Master/MCT_coupler/mod_coupler_kinds.F > mod_coupler_kinds.f90; \ /home/leon/COAWST//ROMS/Bin/cpp_clean mod_coupler_kinds.f90; \ /home/leon/opt/openmpi/bin/mpif90 -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mod_coupler_kinds.f90; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include /home/leon/COAWST//Master/MCT_coupler/mct_coupler_params.F > mct_coupler_params.f90; \ /home/leon/COAWST//ROMS/Bin/cpp_clean mct_coupler_params.f90; \ /home/leon/opt/openmpi/bin/mpif90 -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mct_coupler_params.f90; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include /home/leon/COAWST//Master/MCT_coupler/mod_coupler_iounits.F > mod_coupler_iounits.f90; \ /home/leon/COAWST//ROMS/Bin/cpp_clean mod_coupler_iounits.f90; \ /home/leon/opt/openmpi/bin/mpif90 -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I**/usr/local/mct/include mod_coupler_iounits.f90;

gfortran: error: byterecl: No such file or directory gfortran: error: unrecognized command line option ‘-assume’**

gfortran: error: byterecl: No such file or directory gfortran: error: unrecognized command line option ‘-assume’

gfortran: error: byterecl: No such file or directory gfortran: error: unrecognized command line option ‘-assume’ make: ** [makefile:603: mct_params] Error 1 $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f make: Nothing to be done for 'wrfclean'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f make: Nothing to be done for 'wrf'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f make: Nothing to be done for 'wrfhydroclean'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f make: Nothing to be done for 'wrfhydro'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f make: Nothing to be done for 'ww3clean'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f make: Nothing to be done for 'ww3'. $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f rm -rf SWAN/src_coawst; \ cd SWAN; ls; \ cmake -P clobber.cmake; \ echo "cleaned swan"; CMakeLists.txt LICENSE README.md bin clobber.cmake cmake doc misc src switch.pl tools /bin/sh: 3: cmake: not found cleaned swan $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f mkdir SWAN/src_coawst; \ cp -r SWAN/src/ SWAN/src_coawst/; \ cd SWAN/src_coawst; \ echo ""; \ for file in mod_swan_kinds ocpcre ocpids ocpmix swancom1 swancom2 swancom3 swancom4 swancom5 swanmain swanout1 swanout2 swanparll swanpre1 swanpre2 swanpre3 swanser SwanSpectPart swan_iounits swmod1 swmod2 swpoint waves_control waves_coupler; do \ mv $file.ftn $file.b; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include "$file.b" > "$file.ftn"; \ /home/leon/COAWST//ROMS/Bin/cpp_clean "$file.ftn"; \ rm $file.b; \ done; \ echo ""; \ for file in agioncmd fftpack51 mod_xnl4v5 m_constants m_fileio nctablemd SdsBabanin serv_xnl4v5 SwanBndStruc SwanBpntlist SwanBraggScat SwanCheckGrid SwanCompdata SwanCompUnstruc SwanComputeForce SwanConvAccur SwanConvStopc SwanCreateEdges SwanCrossObstacle SwanDiffPar SwanDispParm SwanFindObstacles SwanFindPoint SwanGradDepthorK SwanGradVel SwanGridCell SwanGriddata SwanGridFace SwanGridobjects SwanGridTopology SwanGridVert SwanGSECorr SwanIEM SwanInitCompGrid SwanInterpolateAc SwanInterpolateOutput SwanInterpolatePoint SwanIntgratSpc SwanMaxOverNodes SwanMinOverNodes SwanPointinMesh SwanPrepComp SwanPrintGridInfo SwanPropvelS SwanPropvelX SwanPunCollect SwanQCM SwanReadADCGrid SwanReadEasymeshGrid SwanReadfort18 SwanReadGrid SwanReadTriangleGrid SwanSumOverNodes SwanSweepSel SwanThreadBounds SwanTranspAc SwanTranspX SwanVertlist SwanVTKPDataSets SwanVTKWriteData SwanVTKWriteHeader swn_outnc; do \ mv $file.ftn90 $file.b; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include $file.b > $file.ftn90; \ rm $file.b; \ /home/leon/COAWST//ROMS/Bin/cpp_clean "$file.ftn90"; \ done; \ echo ""; \ cd hcat; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -I/home/leon/COAWST//ROMS/Include swanhcat.ftn > swanhcat.b; \ mv swanhcat.b swanhcat.ftn; \ echo ""; \ cd ../..; mkdir build; \ cd build; \ cmake .. -G "Unix Makefiles" -DUNIX=ON -DMPI=ON -DNETCDF=ON -DCMAKE_VERBOSE_MAKEFILE=ON; \ make; \ echo " "; echo " "; \ echo ""; \ echo "-------- Finished compiling SWAN ------------" \ echo ""

/bin/sh: 25: cmake: not found make[1]: Entering directory '/home/leon/COAWST/SWAN/build' make[1]: *** No targets specified and no makefile found. Stop. make[1]: Leaving directory '/home/leon/COAWST/SWAN/build'

-------- Finished compiling SWAN ------------ echo $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Nonlinear/interp_floats.F > Build/interp_floats.f90 ROMS/Bin/cpp_clean Build/interp_floats.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Modules/mod_floats.F > Build/mod_floats.f90 ROMS/Bin/cpp_clean Build/mod_floats.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Utility/destroy.F > Build/destroy.f90 ROMS/Bin/cpp_clean Build/destroy.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Modules/mod_iounits.F > Build/mod_iounits.f90 ROMS/Bin/cpp_clean Build/mod_iounits.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/leon/COAWST"' -DINLET_TEST -D'HEADER="inlet_test.h"' -D'ROMS_HEADER="/home/leon/COAWST/Projects/Inlet_test/Coupled/inlet_test.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/DOI-USGS/COAWST"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/leon/COAWST/Projects/Inlet_test/Coupled -IMaster -ICompilers -D'HEADER_DIR="/home/leon/COAWST/Projects/Inlet_test/Coupled"' ROMS/Modules/mod_kinds.F > Build/mod_kinds.f90 ROMS/Bin/cpp_clean Build/mod_kinds.f90 cd ./Build; /home/leon/opt/openmpi/bin/mpif90 -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mod_kinds.f90 gfortran: error: byterecl: No such file or directory gfortran: error: unrecognized command line option ‘-assume’ make: *** [ROMS/Modules/Module.mk:15: Build/mod_kinds.o] Error 1

Thanks for reminder. I will install Cmake. Thanks.

jcwarner-usgs commented 1 year ago

ok now we are getting somewhere. use this method ( no sudo) see how it now has "cd ./Build; /home/leon/opt/openmpi/bin/mpif90 -c ..."

the error here is with gfortran flags. what is mpif90 point to? if you type mpif90 what does it say ( i am looking for gfortran or ifort)

cnwong2023 commented 1 year ago

mpif90 gfortran: fatal error: no input files compilation terminated.

which mpif90 /home/leon/opt/openmpi/bin/mpif90

mpif90 --version GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 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.

jcwarner-usgs commented 1 year ago

ok. because you set FC=gfortran, the compiler will use Compiler/Linux-gfortran.mk

so it will do:

cd ./Build; /home/leon/opt/openmpi/bin/mpif90 -c -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -assume byterecl -I/home/leon/COAWST/SWAN/build/mod -I/usr/local/mct/include mod_kinds.f90

and we see:

gfortran: error: byterecl: No such file or directory gfortran: error: unrecognized command line option ‘-assume’

so we need to edit Compilers/Linux-gfortran.mk and remove those flags "-assume byterecl" change line 234 from FFLAGS += -assume byterecl to

FFLAGS += -assume byterecl

and try again

cnwong2023 commented 1 year ago

It seems to work but some new errors appear.

make[3]: [lib/CMakeFiles/swan41.45.dir/build.make:79: lib/CMakeFiles/swan41.45.dir/swmod2.f.o] Error 1 make[2]: [CMakeFiles/Makefile2:168: lib/CMakeFiles/swan41.45.dir/all] Error 2 make[1]: *** [Makefile:133: all] Error 2

master.f90:22:10:

22 | USE swan_iounits | 1 Fatal Error: Cannot open module file ‘swan_iounits.mod’ for reading at (1): No such file or directory compilation terminated. make: *** [Master/Module.mk:33: Build/master.o] Error 1 log.build_coawst.txt

Thanks for your help.

jcwarner-usgs commented 1 year ago

that log file does not seem to be the full build. i can not find that error in that log file. can you send a new file?

cnwong2023 commented 1 year ago

log.build_coawst.txt The first error appeared line 126. Thanks.

jcwarner-usgs commented 1 year ago

looks like Cmake is having trouble to find the mpi libraries. Is there someone to help you on this system? -j

cnwong2023 commented 1 year ago

I ran it on my own computer. Do I need to change any paths or pointers? Thanks.