Open lizziel opened 2 weeks ago
Hi @lizziel I think I have seen it before. I think sometimes the information provided in cmake about netcdf doesn't always set the include path for whatever reason. You could try setting -DCMAKE_Fortran_FLAGS="-I/n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-fortran/4.5.3-fasrc01/include"
Hi @lizziel I was getting the same error as you on my local linux machine. For some reason, pkg-config doesn't give the proper include locations for netcdf.mod
on my system.
(base) kyle@Blueberry:~/Documents/tuv-x (lapacke_debug)$ pkg-config --cflags --libs netcdf-fortran
-I/usr/include/hdf5/serial -lnetcdff
(base) kyle@Blueberry:~/Documents/tuv-x (lapacke_debug)$ pkg-config --cflags --libs netcdf
-I/usr/include/hdf5/serial -lnetcdf
Notice it's missing /usr/include
, which is where netcdf.mod is for me
So, this may be a netcdf pkg-config issue on some systems (@WardF).
For me cmake -DCMAKE_Fortran_FLAGS="-I/usr/include" ..
did indeed fix the issue with not finding netcdf.mod
. Hopefully that will also fix it for you
Hi, I am running into a build error in TUV-x related to netcdf-fortran and wonder if you have seen this before. The error is an issue finding
netcdf.mod
.I verified I have the netcdf fortran library by using nf-config, and that the path matches what is in
CMakeCache.txt
:netcdff_INCLUDEDIR:INTERNAL=/n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-fortran/4.5.3-fasrc01/include
I also verified
netcdf.mod
is included in that path. I tried turning on a few non-default build options, but still get the same issue:cmake .. -DTUVX_ENABLE_NC_CONFIG=ON -DMUSICA_BUILD_FORTRAN_INTERFACE=ON
This is with CMake 3.25.2. Let me know if you have any insight!