Open platipodium opened 1 year ago
I already applied the fix to cmplr.env
described in #129
Is it problematic that it states:
auxiliary FORTRAN compiler : gfortran
auxiliary C compiler : gcc
Overwriting this in bin/wwatch3.env
does not have an effect ...
Trying:
cd ~/devel/noaa/CoastalApp-Test/WW3/model/ftn
export aPe=../exe
export aPb=../bin
export aPo=../obj
results in
...
Exporting WWATCH3_ENV=/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/bin/wwatch3.env
ad3 : processing w3wdatmd
Exporting WWATCH3_ENV=/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/bin/wwatch3.env
ad3 : processing wmmdatmd
Linking ww3_grid
Exporting WWATCH3_ENV=/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/bin/wwatch3.env
make: *** [../exe/ww3_grid] Error 1
Trying:
make ../exe/ww3_grid
make: *** [../exe/ww3_grid] Error 1
The execution of the code within the target fails:
./bin/link ww3_grid w3wdatmd w3gdatmd w3adatmd w3idatmd w3odatmd wmmdatmd w3parall w3triamd w3gridmd w3src4md w3snl1md w3iogrmd constants w3servmd w3arrymd w3dispmd w3gsrumd w3timemd w3nmlgridmd scrip_constants scrip_grids scrip_iounitsmod scrip_remap_vars scrip_timers scrip_errormod scrip_interface scrip_kindsmod scrip_remap_conservative wmscrpmd scrip_netcdfmod scrip_remap_write scrip_remap_read || echo fail
.. continuting ..
This creates the call
ifort -o ww3_grid -g -O1 -xhost ww3_grid.o w3wdatmd.o w3gdatmd.o w3adatmd.o w3idatmd.o w3odatmd.o wmmdatmd.o w3parall.o w3triamd.o w3gridmd.o w3src4md.o w3snl1md.o w3iogrmd.o constants.o w3servmd.o w3arrymd.o w3dispmd.o w3gsrumd.o w3timemd.o w3nmlgridmd.o scrip_constants.o scrip_grids.o scrip_iounitsmod.o scrip_remap_vars.o scrip_timers.o scrip_errormod.o scrip_interface.o scrip_kindsmod.o scrip_remap_conservative.o wmscrpmd.o scrip_netcdfmod.o scrip_remap_write.o scrip_remap_read.o
in ../obj
Manually changing to ../obj
and executing
ifort -o ww3_grid -g -O1 -xhost ww3_grid.o w3wdatmd.o w3gdatmd.o w3adatmd.o w3idatmd.o w3odatmd.o wmmdatmd.o w3parall.o w3triamd.o w3gridmd.o w3src4md.o w3snl1md.o w3iogrmd.o constants.o w3servmd.o w3arrymd.o w3dispmd.o w3gsrumd.o w3timemd.o w3nmlgridmd.o scrip_constants.o scrip_grids.o scrip_iounitsmod.o scrip_remap_vars.o scrip_timers.o scrip_errormod.o scrip_interface.o scrip_kindsmod.o scrip_remap_conservative.o wmscrpmd.o scrip_netcdfmod.o scrip_remap_write.o scrip_remap_read.o
reveals that netcdf
is the culprit (again)
/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/tmp/w3gridmd.F90:3368: undefined reference to `netcdf_mp_nf90_create_'
/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/tmp/w3gridmd.F90:3369: undefined reference to `netcdf_mp_nf90_def_dim_'
/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/tmp/w3gridmd.F90:3370: undefined reference to `netcdf_mp_nf90_def_dim_'
/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/tmp/w3gridmd.F90:3371: undefined reference to `netcdf_mp_nf90_def_dim_'
/sciclone/home20/clemmen/devel/noaa/CoastalApp-Test/WW3/model/tmp/w3gridmd.F90:3373: undefined reference to `netcdf_mp_nf90_def_var_manydims_'
...
This needs the fix mentioned in #102
sed 's/`$NETCDF_CONFIG --fc`/gfortran/g' -i WW3/model/bin/comp.tmpl
sed 's/`$NETCDF_CONFIG --includedir`/\/usr\/local\/include/g' -i WW3/model/bin/comp.tmpl
sed 's/`$NETCDF_CONFIG --fc`/gfortran/g' -i WW3/model/bin/link.tmpl
sed 's/`$NETCDF_CONFIG --includedir`/\/usr\/local\/include/g' -i WW3/model/bin/link.tmpl
sed 's/`$NETCDF_CONFIG --flibs`/-L\/usr\/local\/lib -lnetcdff -lnetcdf /g' -i WW3/model/bin/link.tmpl
Specifically with recently updated code, it is only one line in each file
diff --git a/model/bin/comp.tmpl b/model/bin/comp.tmpl
index feba730..6784ba9 100755
--- a/model/bin/comp.tmpl
+++ b/model/bin/comp.tmpl
@@ -79,8 +79,9 @@
# netcdf include dir
if [ "$netcdf_compile" = 'yes' ]
then
- if [ "$mpi_mod" = 'no' ]; then comp="`$NETCDF_CONFIG --fc`"; fi
- opt="$opt `$NETCDF_CONFIG --cflags`"
+ if [ "$mpi_mod" = 'no' ]; then comp="ifort"; fi
+ #opt="$opt `$NETCDF_CONFIG --cflags`"
+ opt="$opt -I/usr/local/skylake/linux-centos7-x86_64/intel-18.0.5/netcdf-fortran-4.4.4-rbpzwccr65wvutgic74rwjg6azlynglt/include -I/usr/local/skyla
fi
# ftn include dir
diff --git a/model/bin/link.tmpl b/model/bin/link.tmpl
index 24c081f..5a3262e 100755
--- a/model/bin/link.tmpl
+++ b/model/bin/link.tmpl
@@ -113,8 +113,10 @@
# netcdf library dir
if [ "$netcdf_compile" = 'yes' ] ; then
- if [ "$mpi_mod" = 'no' ]; then comp="`$NETCDF_CONFIG --fc`"; fi
- libs="$libs `$NETCDF_CONFIG --flibs` `$NETCDF_CONFIG --libs`"
+ if [ "$mpi_mod" = 'no' ]; then comp="ifort"; fi
+ #libs="$libs `$NETCDF_CONFIG --flibs` `$NETCDF_CONFIG --libs`"
+ libs="$libs -L/usr/local/skylake/linux-centos7-x86_64/intel-18.0.5/netcdf-fortran-4.4.4-rbpzwccr65wvutgic74rwjg6azlynglt/lib -lnetcdff -L/usr/loc
+
fi
@aliabdolali @pvelissariou1
Would you please chime in!?
Thanks, -Saeed
My idea is that much of this and other problems are related to non-portable passing of environment variables ... like the $NETCDF_CONFIG
here.
@saeed-moghimi-noaa @platipodium we have implemented cmake in the latest version of WW3, so no need to setting such environmental variables anymore. I would recommend keeping this non-portable passing of env for a while until we merge the top of WW3 to the COASTAL App, then life is much easier.
@aliabdolali CMake is good news! Do you have a time line on merging WW3 HEAD to Coastal App?
@aliabdolali CMake is good news! Do you have a time line on merging WW3 HEAD to Coastal App? My understanding from our conversation with NOS colleagues is that we want to have everything up and running with different configurations (including regtests) and then we will plan for further development.
Upon
I get