Closed kilicomu closed 5 years ago
Hi Killian,
Thanks for trying this, and for the detailed issue. This is really helpful.
Everything you've done looks correct to me.
I looked through the FindNetCDF.cmake
script I got from VTK, and it looks like they set NO_DEFAULT_PATHS
by default, making their script to ignore CMAKE_PREFIX_PATH
(reference here). It looks like their script mainly relies on additional variables like NETCDF_F90_INCLUDE_DIRS
, for getting users to point to where things are installed, rather than using standard variables like CMAKE_PREFIX_PATH
. My preference is to stick with standard CMake variables, and I think your idea for rewriting the FindNetCDF.cmake
script and using nc-config
and nf-config
is a good one, so I'm going to do that for the next demo.
I'm going to have the second iteration of the Demo ready sometime in the next couple days (maybe Friday or Monday). If you want to try something in the meantime, you could try setting NETCDF_USE_DEFAULT_PATHS
to true. It looks like this will turn off NO_DEFAULT_PATHS
in the VTK FindNetCDF.cmake
script causing CMAKE_PREFIX_PATH
to be looked at. No need to try this, but if it's easy, it might get you past the FindNetCDF stage.
Anyways, thanks again! I'll follow up when the second version of the demo is ready. --Liam
Hi Liam.
Using your instructions found here and information you provided in an email, I have attempted to configure the GEOS-Chem classic build using a clone of your feature/CMakeDemo branch (commit 695c). The configure process doesn't seem to be able to get past trying to find NetCDF libraries.
Some context:
On our HPC system, NetCDF-C and NetCDF-Fortran are installed in distinct locations, owing to the separation of the NetCDF-C and NetCDF-Fortran libraries a while back. Consequently, I have NetCDF-C installed at
/opt/apps/easybuild/software/data/netCDF/4.6.1-intel-2018b
and NetCDF-Fortran installed at
/opt/apps/easybuild/software/data/netCDF-Fortran/4.4.4-intel-2018b
For peace of mind, the contents of the relevant directories undeneath those library installation roots are:
The problem:
With my shell environment set up for building and running GEOS-Chem, when running
from within a build directory in my GEOS-Chem run directory, I face the following configuration error:
I have attached the
CMakeCache.txt
andCMakeOutput.log
files from my build directory, and can provide any other information that you need. I apologise if I'm missing something obvious here!CMakeCache.txt
CMakeOutput.log