DOI-USGS / COAWST

COAWST modeling system git repository
Other
109 stars 51 forks source link

version 3.8 does not compile #174

Open rececilio opened 1 year ago

rececilio commented 1 year ago

Hello,

I am trying a fresh installation using the version 3.8 but so far unsuccessfully. I got: gfortran: error: unrecognized command-line option ‘-assume’ make: *** [ROMS/Modules/Module.mk:15: /home/renato/Desktop/MyCOAWST/Hcast/CTG/Build/mod_kinds.o] Error 1

Then I commented out line 234 of file /Compilers/linux-gfortran.mk and it now gives: cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include wrt_station.f90 f951: Warning: Nonexistent include directory ‘/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod’ [-Wmissing-include-dirs] wrt_station.f90:581:8:

581 | tile=MyRank | 1 Error: Dummy argument ‘tile’ with INTENT(IN) in variable definition context (assignment) at (1) make: *** [ROMS/Utility/Module.mk:15: Build_roms/wrt_station.o] Error 1

The folder /COAWST/SWAN/build/ is actually empty. Any ideas on what I might be doing wrong? Thanks, Renato Cecilio

stamenminkov commented 1 year ago

That happened to me, I believe "-assume byterecl" is an ifort command, while you're running with gfortran. You can remove it straight away and run again the build (think it's in the Linux-gfortran.mk file, but I could be mistaken)

rececilio commented 1 year ago

Hi. Thank you. I had already commented out. First problem: I did not install Cmake. Now it is clear that SWAN is not compiling:

[ 3%] Building Fortran object lib/CMakeFiles/swan41.45.dir/swmod2.f.o cd /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib && /usr/bin/f95 -I/usr/local/NC4/include -O -w -fno-second-underscore -ffree-line-length-none -fallow-argument-mismatch -I/home/renato/Desktop/MyCOAWST/COAWST/Build_roms -I/usr/local/MCT/include -J../mod -c /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod2.f -o CMakeFiles/swan41.45.dir/swmod2.f.o /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod2.f:1496: Error: Can't open included file 'mpif.h' make[3]: [lib/CMakeFiles/swan41.45.dir/build.make:91: lib/CMakeFiles/swan41.45.dir/swmod2.f.o] Error 1 make[3]: Leaving directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' make[2]: [CMakeFiles/Makefile2:139: lib/CMakeFiles/swan41.45.dir/all] Error 2 make[2]: Leaving directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' make[1]: *** [Makefile:139: all] Error 2 make[1]: Leaving directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' -------- Finished compiling SWAN ------------ echo

rececilio commented 1 year ago

But what about this error: cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include wrt_station.f90 wrt_station.f90:581:8:

581 | tile=MyRank | 1 Error: Dummy argument ‘tile’ with INTENT(IN) in variable definition context (assignment) at (1) make: *** [ROMS/Utility/Module.mk:15: Build_roms/wrt_station.o] Error 1

jcwarner-usgs commented 1 year ago

can i see the full build log? Yes, I need to use Cmake now for SWAN. some people are having trouble with it. We may need to set some env variables to let cmake know where files are. can you install Cmake and try again?

rececilio commented 1 year ago

I already installed Cmake and commented out "-assume byterecl" The output is huge: $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f rm -f -r core *.ipo ./Build_roms /home/renato/make_macros.mk $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f cp -f /usr/local/NC4/include/netcdf.mod ./Build_roms cp -f /usr/local/NC4/include/typesizes.mod ./Build_roms cp -p /home/renato/make_macros.mk ./Build_roms $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f \ cd ./Build_roms; \ echo ""; \ cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Include /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//Master/MCT_coupler/mod_coupler_kinds.F > mod_coupler_kinds.f90; \ /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Bin/cpp_clean mod_coupler_kinds.f90; \ /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../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/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Include /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//Master/MCT_coupler/mct_coupler_params.F > mct_coupler_params.f90; \ /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Bin/cpp_clean mct_coupler_params.f90; \ /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../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/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Include /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//Master/MCT_coupler/mod_coupler_iounits.F > mod_coupler_iounits.f90; \ /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Bin/cpp_clean mod_coupler_iounits.f90; \ /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include mod_coupler_iounits.f90;

$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"; bin build clobber.cmake cmake CMakeLists.txt doc LICENSE misc README.md src switch.pl tools cleaned swan $gitrev is c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f mkdir SWAN/src_coawst; \ cp -r SWAN/src/* SWAN/src_coawst/; \ cd SWAN/src_coawst; \ echo ""; \ for file in swmod1 swancom1 waves_control mod_swan_kinds swanout2 swancom2 swancom4 swanser swanmain swanout1 waves_coupler swanpre1 swancom5 swan_iounits swanpre2 swanpre3 ocpcre swancom3 SwanSpectPart swanparll ocpmix ocpids swmod2 swpoint; do \ mv $file.ftn $file.b; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Include "$file.b" > "$file.ftn"; \ /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Bin/cpp_clean "$file.ftn"; \ rm $file.b; \ done; \ echo ""; \ for file in SwanVTKPDataSets SwanThreadBounds SwanFindObstacles SwanFindPoint SwanPropvelX SwanPunCollect mod_xnl4v5 SwanInterpolateOutput SwanReadEasymeshGrid SwanMinOverNodes SwanReadfort18 SwanMaxOverNodes SwanConvAccur swn_outnc SwanCompdata SwanDiffPar SwanGridVert SwanBraggScat SwanDispParm SwanGradDepthorK m_constants SwanPrintGridInfo SdsBabanin m_fileio SwanGridobjects SwanReadTriangleGrid SwanInitCompGrid SwanInterpolateAc SwanSumOverNodes agioncmd SwanGriddata SwanVertlist SwanGSECorr SwanPrepComp SwanPropvelS SwanGridTopology SwanVTKWriteHeader SwanIEM SwanTranspX SwanIntgratSpc serv_xnl4v5 SwanReadADCGrid SwanCheckGrid SwanTranspAc SwanCrossObstacle nctablemd SwanCompUnstruc SwanComputeForce SwanGridFace SwanInterpolatePoint SwanReadGrid fftpack51 SwanVTKWriteData SwanPointinMesh SwanQCM SwanSweepSel SwanCreateEdges SwanGradVel SwanGridCell SwanConvStopc SwanBpntlist SwanBndStruc; do \ mv $file.ftn90 $file.b; \ /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Include $file.b > $file.ftn90; \ rm $file.b; \ /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../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/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../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 ""

-- The Fortran compiler identification is GNU 11.4.0 -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Check for working Fortran compiler: /usr/bin/f95 - skipped -- Found Perl: /usr/bin/perl (found version "5.34.0") -- Found NetCDF: /usr/local/NC4/include (found version "4.9.2") found components: Fortran -- FindNetCDF defines targets: -- - NetCDF_VERSION [4.9.2] -- - NetCDF_PARALLEL [FALSE] -- - NetCDF_C_CONFIG_EXECUTABLE [/usr/local/NC4/bin/nc-config] -- - NetCDF::NetCDF_C [SHARED] [Root: /usr/local/NC4] Lib: /usr/local/NC4/lib/libnetcdf.so -- - NetCDF_Fortran_CONFIG_EXECUTABLE [/usr/local/NC4/bin/nf-config] -- - NetCDF::NetCDF_Fortran [SHARED] [Root: /usr/local/NC4] Lib: /usr/local/NC4/lib/libnetcdff.so -- Found MPI_Fortran: /usr/lib/x86_64-linux-gnu/libmpi_usempif08.so (found version "3.1") -- Found MPI: TRUE (found version "3.1") found components: Fortran -- Configuring done -- Generating done -- Build files have been written to: /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build make[1]: Entering directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' /usr/bin/cmake -S/home/renato/Desktop/MyCOAWST/COAWST/SWAN -B/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/bin/cmake -E cmake_progress_start /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/CMakeFiles /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build//CMakeFiles/progress.marks make -f CMakeFiles/Makefile2 all make[2]: Entering directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' make -f lib/CMakeFiles/swan41.45.dir/build.make lib/CMakeFiles/swan41.45.dir/depend make[3]: Entering directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' cd /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/renato/Desktop/MyCOAWST/COAWST/SWAN /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib/CMakeFiles/swan41.45.dir/DependInfo.cmake --color= Scanning dependencies of target swan41.45 make[3]: Leaving directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' make -f lib/CMakeFiles/swan41.45.dir/build.make lib/CMakeFiles/swan41.45.dir/build make[3]: Entering directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' [ 1%] Building Fortran object lib/CMakeFiles/swan41.45.dir/swmod1.f.o cd /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib && /usr/bin/f95 -I/usr/local/NC4/include -O -w -fno-second-underscore -ffree-line-length-none -fallow-argument-mismatch -I/home/renato/Desktop/MyCOAWST/COAWST/Build_roms -I/usr/local/MCT/include -J../mod -c /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod1.f -o CMakeFiles/swan41.45.dir/swmod1.f.o /usr/bin/cmake -E cmake_copy_f90_mod mod/ocpcomm4.mod lib/CMakeFiles/swan41.45.dir/ocpcomm4.mod.stamp GNU /usr/bin/cmake -E cmake_copy_f90_mod mod/swcomm1.mod lib/CMakeFiles/swan41.45.dir/swcomm1.mod.stamp GNU /usr/bin/cmake -E cmake_copy_f90_mod mod/swcomm3.mod lib/CMakeFiles/swan41.45.dir/swcomm3.mod.stamp GNU /usr/bin/cmake -E cmake_copy_f90_mod mod/swcomm4.mod lib/CMakeFiles/swan41.45.dir/swcomm4.mod.stamp GNU [ 2%] Building Fortran object lib/CMakeFiles/swan41.45.dir/SdsBabanin.f90.o cd /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib && /usr/bin/f95 -I/usr/local/NC4/include -O -w -fno-second-underscore -ffree-line-length-none -fallow-argument-mismatch -I/home/renato/Desktop/MyCOAWST/COAWST/Build_roms -I/usr/local/MCT/include -J../mod -c /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/SdsBabanin.f90 -o CMakeFiles/swan41.45.dir/SdsBabanin.f90.o /usr/bin/cmake -E cmake_copy_f90_mod mod/sdsbabanin.mod lib/CMakeFiles/swan41.45.dir/sdsbabanin.mod.stamp GNU /usr/bin/cmake -E touch lib/CMakeFiles/swan41.45.dir/SdsBabanin.f90.o.provides.build /usr/bin/cmake -E cmake_copy_f90_mod mod/ocpcomm2.mod lib/CMakeFiles/swan41.45.dir/ocpcomm2.mod.stamp GNU [ 3%] Building Fortran object lib/CMakeFiles/swan41.45.dir/swmod2.f.o cd /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib && /usr/bin/f95 -I/usr/local/NC4/include -O -w -fno-second-underscore -ffree-line-length-none -fallow-argument-mismatch -I/home/renato/Desktop/MyCOAWST/COAWST/Build_roms -I/usr/local/MCT/include -J../mod -c /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod2.f -o CMakeFiles/swan41.45.dir/swmod2.f.o /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod2.f:1496: Error: Can't open included file 'mpif.h' make[3]: [lib/CMakeFiles/swan41.45.dir/build.make:91: lib/CMakeFiles/swan41.45.dir/swmod2.f.o] Error 1 make[3]: Leaving directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' make[2]: [CMakeFiles/Makefile2:139: lib/CMakeFiles/swan41.45.dir/all] Error 2 make[2]: Leaving directory '/home/renato/Desktop/MyCOAWST/COAWST/SWAN/build' make[1]: *** [Makefile:139: all] Error 2 make[1]: Leaving directory '/home/renato/Desktop/MyCOAWST/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/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV ROMS/Nonlinear/atm2ocn_flux.F > Build_roms/atm2ocn_flux.f90 ROMS/Bin/cpp_clean Build_roms/atm2ocn_flux.f90

*** several more lines that exceeds the editor limit

/usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV ROMS/Utility/distribute.F > Build_roms/distribute.f90 ROMS/Bin/cpp_clean Build_roms/distribute.f90 cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include -ffree-form -ffree-line-length-none distribute.f90 distribute.f90:4278:26:

4278 | CALL mpi_allreduce (Asend, Areduce, Npts, MP_FLOAT, handle, & | 1 ...... 4511 | CALL mpi_allreduce (Asend, Areduce, Isize, & | 2 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) distribute.f90:4165:28:

4165 | CALL mpi_allreduce (Asend(i), Areduce(i), 1, MPI_INTEGER, & | 1 ...... 4511 | CALL mpi_allreduce (Asend, Areduce, Isize, & | 2 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)). distribute.f90:3936:26:

3936 | CALL mpi_allgather (my_bounds, np, MPI_INTEGER, & | 1 ...... 5687 | CALL mpi_allgather (Asend, Npts, MP_FLOAT, Arecv, Npts, MP_FLOAT, & | 2 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)). distribute.f90:1408:22:

1408 | CALL mpi_bcast (ibuffer, Npts, MPI_INTEGER, MyMaster, & | 1 ...... 5135 | CALL mpi_bcast (A, Asize, MP_FLOAT, MyMaster, OCN_COMM_WORLD, & | 2 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)). distribute.f90:218:22:

218 | CALL mpi_bcast (A, Npts, MP_FLOAT, MyMaster, MyCOMM, MyError) | 1 ...... 5135 | CALL mpi_bcast (A, Asize, MP_FLOAT, MyMaster, OCN_COMM_WORLD, & | 2 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include -ffree-form -ffree-line-length-none strings.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV ROMS/Utility/yaml_parser.F > Build_roms/yaml_parser.f90 ROMS/Bin/cpp_clean Build_roms/yaml_parser.f90 cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include -ffree-form -ffree-line-length-none yaml_parser.f90

* more several lines

cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include wrt_quick.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV ROMS/Utility/wrt_rst.F > Build_roms/wrt_rst.f90 ROMS/Bin/cpp_clean Build_roms/wrt_rst.f90 cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include wrt_rst.f90 /usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="c3216d27cb79ee6f7a2ce8ac934b84e80b737f9f "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV ROMS/Utility/wrt_station.F > Build_roms/wrt_station.f90 ROMS/Bin/cpp_clean Build_roms/wrt_station.f90 cd ./Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include wrt_station.f90 wrt_station.f90:581:8:

581 | tile=MyRank | 1 Error: Dummy argument ‘tile’ with INTENT(IN) in variable definition context (assignment) at (1) make: *** [ROMS/Utility/Module.mk:15: Build_roms/wrt_station.o] Error 1

rececilio commented 1 year ago

I have found a file mpif.h in: /usr/lib/x86_64-linux-gnu/openmpi/include Following the output of nf-config, i tried: export NETCDF_INCDIR=/usr/include export NETCDF_LIBDIR=/usr/lib/x86_64-linux-gnu Same results.

rececilio commented 1 year ago

nf-config --all

This netCDF-Fortran 4.5.4 has been built with the following features: --cc -> gcc --cflags -> -I/usr/include -Wdate-time -D_FORTIFY_SOURCE=2 --fc -> gfortran --fflags -> -I/usr/include -I/usr/include --flibs -> -L/usr/lib/x86_64-linux-gnu -lnetcdff -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -lnetcdf -lnetcdf -lm --has-f90 -> --has-f03 -> yes

--has-nc2 -> yes --has-nc4 -> yes --prefix -> /usr --includedir-> /usr/include --version -> netCDF-Fortran 4.5.4

rececilio commented 1 year ago

Utility/wrt_station.F: there is something wrong either in line 812 or 814.

jcwarner-usgs commented 1 year ago

ok i just pushed out an update to wrt_station. can you do a git pull and try again?

rececilio commented 1 year ago

wrt_station seems solved. swan is not compiling. (Error: Can't open included file 'mpif.h')


cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="a11b7a51faee59c46c5af0b7551cf3cb472eb7d8 "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Include /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//Master/MCT_coupler/mod_coupler_iounits.F > mod_coupler_iounits.f90; \ /home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST//ROMS/Bin/cpp_clean mod_coupler_iounits.f90; \ /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include mod_coupler_iounits.f90;

f951: Warning: Nonexistent include directory ‘/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod’ [-Wmissing-include-dirs]


[ 3%] Building Fortran object lib/CMakeFiles/swan41.45.dir/swmod2.f.o cd /home/renato/Desktop/MyCOAWST/COAWST/SWAN/build/lib && /usr/bin/f95 -I/usr/include -O -w -fno-second-underscore -ffree-line-length-none -fallow-argument-mismatch -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/Build_roms -I/usr/local/MCT/include -J../mod -c /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod2.f -o CMakeFiles/swan41.45.dir/swmod2.f.o /home/renato/Desktop/MyCOAWST/COAWST/SWAN/src_coawst/swmod2.f:1496: Error: Can't open included file 'mpif.h' make[3]: *** [lib/CMakeFiles/swan41.45.dir/build.make:91: lib/CMakeFiles/swan41.45.dir/swmod2.f.o] Error 1


/usr/bin/cpp -P -traditional -w -DMPI -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/renato/Desktop/MyCOAWST/COAWST"' -DCTG1 -D'HEADER="ctg1.h"' -D'ROMS_HEADER="/home/renato/Desktop/MyCOAWST/Hcast/CTG/ctg1.h"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV -DNestedGrids= -D'ANALYTICAL_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -D'MY_ANALYTICAL="on"' -D'GIT_URL="https://github.com/jcwarner-usgs/COAWST.git"' -D'GIT_REV="a11b7a51faee59c46c5af0b7551cf3cb472eb7d8 "' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1151"' -IROMS/Include -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Nonlinear/Wec -IROMS/Nonlinear/Vegetation -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/renato/Desktop/MyCOAWST/Hcast/CTG -IMaster -ICompilers -D'HEADER_DIR="/home/renato/Desktop/MyCOAWST/Hcast/CTG"' -DAVERAGES -DDIAGNOSTICS_TS -DDIAGNOSTICS_UV Master/get_numswan_grids.F > /home/renato/Desktop/MyCOAWST/Hcast/CTG/Build_roms/get_numswan_grids.f90 ROMS/Bin/cpp_clean /home/renato/Desktop/MyCOAWST/Hcast/CTG/Build_roms/get_numswan_grids.f90 cd /home/renato/Desktop/MyCOAWST/Hcast/CTG/Build_roms; /usr/bin/mpif90 -c -frepack-arrays -fallow-argument-mismatch -fallow-argument-mismatch -O3 -ffast-math -I/home/renato/Desktop/MyCOAWST/Hcast/CTG/../../COAWST/SWAN/build/mod -I/usr/local/MCT/include get_numswan_grids.f90 get_numswan_grids.f90:10:11:

10 | USE M_COUPLING | 1 Fatal Error: Cannot open module file ‘m_coupling.mod’ for reading at (1): No such file or directory compilation terminated. make: *** [Master/Module.mk:33: /home/renato/Desktop/MyCOAWST/Hcast/CTG/Build_roms/get_numswan_grids.o] Error 1

hzhy36 commented 1 year ago

I encountered the same problem. I use gfortran 11.4.0 and want to install coawst 3.8. Follow the discussation above, I already comment out the "-assume byterecl" in Linux-gfortran.mk. I also installed cmake already, and I get a error now:

hzhy@LAPTOP-8IHODGV5:~/project/DaYaWan$ ./build_coawst.sh > build.log /home/hzhy/COAWST/SWAN/src_coawst/swmod2.f:1496: Error: Can't open included file 'mpif.h' make[3]: [lib/CMakeFiles/swan41.45.dir/build.make:91: lib/CMakeFiles/swan41.45.dir/swmod2.f.o] Error 1 make[2]: [CMakeFiles/Makefile2:139: lib/CMakeFiles/swan41.45.dir/all] Error 2 make[1]: *** [Makefile:139: all] Error 2 distribute.f90:4278:26:

4278 | CALL mpi_allreduce (Asend, Areduce, Npts, MP_FLOAT, handle, & | 1 ...... 4511 | CALL mpi_allreduce (Asend, Areduce, Isize, & | 2 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) distribute.f90:4165:28:

4165 | CALL mpi_allreduce (Asend(i), Areduce(i), 1, MPI_INTEGER, & | 1 ...... 4511 | CALL mpi_allreduce (Asend, Areduce, Isize, & | 2 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)). distribute.f90:3936:26:

3936 | CALL mpi_allgather (my_bounds, np, MPI_INTEGER, & | 1 ...... 5687 | CALL mpi_allgather (Asend, Npts, MP_FLOAT, Arecv, Npts, MP_FLOAT, & | 2 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)). distribute.f90:1408:22:

1408 | CALL mpi_bcast (ibuffer, Npts, MPI_INTEGER, MyMaster, & | 1 ...... 5135 | CALL mpi_bcast (A, Asize, MP_FLOAT, MyMaster, OCN_COMM_WORLD, & | 2 Warning: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/REAL(8)). distribute.f90:218:22:

218 | CALL mpi_bcast (A, Npts, MP_FLOAT, MyMaster, MyCOMM, MyError) | 1 ...... 5135 | CALL mpi_bcast (A, Asize, MP_FLOAT, MyMaster, OCN_COMM_WORLD, & | 2 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) get_numswan_grids.f90:10:11:

10 | USE M_COUPLING | 1 Fatal Error: Cannot open module file ‘m_coupling.mod’ for reading at (1): No such file or directory compilation terminated. make: *** [Master/Module.mk:33: /home/hzhy/project/DaYaWan/Build_roms/get_numswan_grids.o] Error 1

Here is my build log, build.log Thanks in advance.

jcwarner-usgs commented 1 year ago

i guess the error/warnings listed above do not show up in the build.log.
The issue is that Cmake can not find your mpif.h. I am not sure how to fix that. I suggest you go here: https://gitlab.tudelft.nl/citg/wavemodels/swan

and get the SWAN code. Follow their instructions on how to build it using Cmake. If you have problems, post an issue there and get help until the code can be built. Then you can come back here and we can make it work in the coawst system.

jcwarner-usgs commented 3 months ago

I think we have a solution for this. Are you still working on it?

We edited the SWAN/src/CMakeLists.txt and edited line 60 from

COAWST include mct params info

set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -I$ENV{MCT_PARAMS_DIR} -I$ENV{MCT_INCDIR}" ) to

COAWST include mct params info

set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -I$ENV{MCT_PARAMS_DIR} -I$ENV{MCT_INCDIR} -I$ENV{MPI_INCDIR}" )

and we had set export MPI_INCDIR=path_to_mpi_include

let me know if this works.