Closed agahirpa closed 10 months ago
This should be working, so it is a little unusual that it's not. Can you attach the config.log
file generated when you run configure
on netCDF-Fortran 4.6.1? You may need to rename it to config.log.txt
in order for GitHub to accept it as an upload.
This should be working, so it is a little unusual that it's not. Can you attach the
config.log
file generated when you runconfigure
on netCDF-Fortran 4.6.1? You may need to rename it toconfig.log.txt
in order for GitHub to accept it as an upload.
Thank you for looking into this. Attached is the config log file config.log.txt
I have the same problem compiling netcdf-fortran-4.6.1 with netcdf-c 4.9.2 on CentOS 7.9.
Thank you; I'm still trying to sort out what is going on here, insofar as I've been unable to replicate the issue as of yet. From the config.log file you provided, @agahirpa, it looks like you're using Ubuntu 22.02 under WSL on a Windows host. Is this correct? @jshn9515 would you be able to provide your config.log file as well?
Thank you; I'm still trying to sort out what is going on here, insofar as I've been unable to replicate the issue as of yet. From the config.log file you provided, @agahirpa, it looks like you're using Ubuntu 22.02 under WSL on a Windows host. Is this correct? @jshn9515 would you be able to provide your config.log file as well?
@WardF that is correct: I am using Ubuntu 22.02 under WSL on a Window.
Thank you for looking this. I think it is similar to #414. config.log.txt
After setting NF_NOQUANTIZE
to 0 and NF_QUANTIZE_BITGROOM
to 1, the issue was resolved. However, another error occurred:
netcdf.F90:47:2:
#include "netcdf_externals.f90"
1~~~~~~~~~~~~~~~~~~~~~
Fatal Error: netcdf_constants.f90: No such file or directory
compilation terminated.
make[1]: *** [Makefile:766: netcdf.lo] Error 1
The include statements are .f90 but the actual files are .F90.
After completing the following steps, the compilation is successful, and all tests have passed:
netcdf.F90
.#define USE_NETCDF4
before #ifdef USE_NETCDF4
in module_netcdf_nc_data.F90
.typeSizes.F90
and save as module_typesizes.F90
.Thanks @jshn9515 I am taking a look at making these changes, thanks!
Thanks a lot!
Well... I finally find out the reason I receive these errors is that I had built the NetCDF-C library with the --disable-netcdf-4
option, which caused the NetCDF-Fortran library to be unable to find the USE_NETCDF4
symbol. Once I built NetCDF-C without this option, the original code was able to run without any need for modification.
Well... I finally find out the reason I receive these errors is that I had built the NetCDF-C library with the
--disable-netcdf-4
option, which caused the NetCDF-Fortran library to be unable to find theUSE_NETCDF4
symbol. Once I built NetCDF-C without this option, the original code was able to run without any need for modification.
By any chance you find a solution for this issue? I ran into the same problem. But in my case, even I build the NetCDF-C with netCDF-4, the make check in the NetCDF-F still complains
I have no idea about that. Maybe you can open a new issue and describe that problem.
I have no idea about that. Maybe you can open a new issue and describe that problem.
Do you mind sharing your method for compiling the NetCDF 4.9.2 and NetCDF-fortran-4.6.1?
Thanks
I built them on CentOS 7.9 with GCC 11.2.1. For NetCDF-C:
ZDIR=/usr/local
H5DIR=/usr/local
NCDIR=/usr/local
CPPFLAGS='-I${H5DIR}/include -I${ZDIR}/include'
LDFLAGS='-L${H5DIR}/lib -L${ZDIR}/lib'
./configure --prefix=${NCDIR}
make -j 4
make check
make install
And for NetCDF-Fortran:
NCDIR=/usr/local
NFDIR=/usr/local
CC=/usr/local/cc
FC=/usr/local/fortran
CPPFLAGS=-I${NCDIR}/include
LDFLAGS=-L${NCDIR}/lib
./configure --prefix=${NFDIR}
make -j 4
make check
make install
By the way, make sure all the dependencies have been installed correctly with all tests passed.
I am trying to compile netcdf-fortran-4.6.1 with netcdf-c 4.9.2 and I get the following error on
ubuntu 22.02
.I used the following:
CPPFLAGS=-I//home/agahirpa/local/include LDFLAGS="-L/home/agahirpa/local/lib -Wl,-rpath,/home/agahirpa/local/lib -lnetcdf" ./configure --prefix=/home/agahirpa/local --disable-dependency-tracking
with the output from
nc-config --all
is below. The netcdf-c was compiled with:I don't know what I did wrong.