Open QuLogic opened 10 years ago
Do you also have the NetCDF C library (libnetcdf.so) installed? I believe the CMake module requires this as well, which may explain your problem. However it's probably not necessary for AxiSEM so if this is the problem we can remove the check for it.
The solver should compile without netcdf, if netcdf is to be used, the macro "unc" needs to be defined (typically -Dunc as an option for the compiler). Additionally, there is an option in the inparam_advanced file, to switch netcdf on and of without recompiling.
The CMake build process has no problem if NetCDF isn’t installed - it uses the unc macro in the same manner as the original build. I believe Elliott was referring to the script not correctly finding his installation of NetCDF.
On Apr 22, 2014, at 2:31 PM, Martin van Driel notifications@github.com wrote:
The solver should compile without netcdf, if netcdf is to be used, the macro "unc" needs to be defined (typically -Dunc as an option for the compiler). Additionally, there is an option in the inparam_advanced file, to switch netcdf on and of without recompiling.
— Reply to this email directly or view it on GitHub.
I believe Elliott was referring to the script not correctly finding his installation of NetCDF.
Yes, that's correct. The build is fine without NetCDF, but I can't try with since CMake doesn't find NetCDF.
Do you also have the NetCDF C library (libnetcdf.so) installed?
You mean this, right?
$ rpm -ql netcdf-devel | grep libnetcdf
/usr/lib64/libnetcdf.so
Yes, that's correct. I'm not sure why CMake wouldn't find at least one of your NetCDF installations. Do you know if it works if you only have one installation active?
I can't remove the C devel package because the Fortran devel package depends on it.
Sorry, I meant in your original email you had two sets of libraries (MPI and non-MPI). If you disable one of those sets, does CMake find the other, or does it fail to find anything regardless of the setup?
Ah, yes, I see. I tried with only MPI devel and only non-MPI devel, but neither of these worked correctly.
When you run CMake, what is in CMakeCache.txt under NETCDF_INCLUDES, NETCDF_INCLUDES_F90, NETCDF_LIBRARIES, NETCDF_LIBRARIES_F90, and NETCDF_LIBRARIES_C? I'm just trying to understand the problem without being able to recreate it on my own machine. Thanks!
This is with only the MPI devel libraries installed:
NETCDF_INCLUDES:PATH=/usr/include
NETCDF_INCLUDES_F90:PATH=NETCDF_INCLUDES_F90-NOTFOUND
NETCDF_LIBRARIES:STRING=/usr/lib64/libnetcdf.so
NETCDF_LIBRARIES_C:FILEPATH=/usr/lib64/libnetcdf.so
NETCDF_LIBRARIES_F90:FILEPATH=NETCDF_LIBRARIES_F90-NOTFOUND
NETCDF_INCLUDES-ADVANCED:INTERNAL=1
NETCDF_INCLUDES_F90-ADVANCED:INTERNAL=1
NETCDF_LIBRARIES-ADVANCED:INTERNAL=1
NETCDF_LIBRARIES_C-ADVANCED:INTERNAL=1
NETCDF_LIBRARIES_F90-ADVANCED:INTERNAL=1
This is with both devel libraries installed:
NETCDF_INCLUDES:PATH=/usr/include
NETCDF_INCLUDES_F90:PATH=NETCDF_INCLUDES_F90-NOTFOUND
NETCDF_LIBRARIES:STRING=/usr/lib64/libnetcdf.so
NETCDF_LIBRARIES_C:FILEPATH=/usr/lib64/libnetcdf.so
NETCDF_LIBRARIES_F90:FILEPATH=/usr/lib64/libnetcdff.so
NETCDF_INCLUDES-ADVANCED:INTERNAL=1
NETCDF_INCLUDES_F90-ADVANCED:INTERNAL=1
NETCDF_LIBRARIES-ADVANCED:INTERNAL=1
NETCDF_LIBRARIES_C-ADVANCED:INTERNAL=1
NETCDF_LIBRARIES_F90-ADVANCED:INTERNAL=1
The problem is with the Fortran90 module. I see that it's treated as a header and hinted to be in ${NETCDF_INCLUDES}
. Since that defaults to /usr/include
, it doesn't work.
I have installed the packaged version of NetCDF for Fortran, but CMake does not correctly find it.
Note that there are two sets of libraries, non-MPI:
and an MPI version,
I don't think
FindNetCDF.cmake
correctly understands this split.