Compilation error for module "m_sigmaph.F90" (Abinit-9.6.2)

Dear users/developers,

I am trying to build an executable for Abinit-9.6.2 using GNU compilers version 9.3. The build is aborted during compilation of the m_sigmaph module, apparently related to a netcdf functionality. Please, see the traceback below.

mpif90.openmpi -DHAVE_CONFIG_H -I. -I…/… -I…/…/shared/common/src/02_clib -I…/…/shared/common/src/02_clib -I…/…/shared/common/src/10_defs -I…/…/shared/common/src/10_defs -I…/…/shared/common/src/12_hide_mpi -I…/…/shared/common/src/12_hide_mpi -I…/…/shared/common/src/14_hidewrite -I…/…/shared/common/src/14_hidewrite -I…/…/shared/common/src/16_hideleave -I…/…/shared/common/src/16_hideleave -I…/…/shared/common/src/17_libtetra_ext -I…/…/shared/common/src/17_libtetra_ext -I…/…/shared/common/src/18_timing -I…/…/shared/common/src/18_timing -I…/…/shared/common/src/27_toolbox_oop -I…/…/shared/common/src/27_toolbox_oop -I…/…/shared/common/src/28_numeric_noabirule -I…/…/shared/common/src/28_numeric_noabirule -I…/…/shared/common/src/29_kpoints -I…/…/shared/common/src/29_kpoints -I…/…/shared/common/src/32_util -I…/…/shared/common/src/32_util -I…/…/shared/libpaw/src -I…/…/shared/libpaw/src -I…/…/src/41_geometry -I…/…/src/41_geometry -I…/…/src/44_abitools -I…/…/src/44_abitools -I…/…/src/44_abitypes_defs -I…/…/src/44_abitypes_defs -I…/…/src/51_manage_mpi -I…/…/src/51_manage_mpi -I…/…/src/52_fft_mpi_noabirule -I…/…/src/52_fft_mpi_noabirule -I…/…/src/53_ffts -I…/…/src/53_ffts -I…/…/src/56_io_mpi -I…/…/src/56_io_mpi -I…/…/src/56_recipspace -I…/…/src/56_recipspace -I…/…/src/61_occeig -I…/…/src/61_occeig -I…/…/src/62_cg_noabirule -I…/…/src/62_cg_noabirule -I…/…/src/62_iowfdenpot -I…/…/src/62_iowfdenpot -I…/…/src/65_paw -I…/…/src/65_paw -I…/…/src/66_nonlocal -I…/…/src/66_nonlocal -I…/…/src/66_wfs -I…/…/src/66_wfs -I…/…/src/67_common -I…/…/src/67_common -I…/…/src/69_wfdesc -I…/…/src/69_wfdesc -I…/…/src/72_response -I…/…/src/72_response -I…/…/src/77_ddb -I…/…/src/77_ddb -I…/…/src/78_eph -I…/…/src/78_eph -I…/…/shared/common/src/incs -I…/…/shared/common/src/incs -I…/…/shared/common/src/mods -I…/…/shared/common/src/mods -I…/…/src/incs -I…/…/src/incs -I…/…/src/mods -I…/…/src/mods -I…/…/shared/libpaw/incs -I…/…/shared/libpaw/incs -I…/…/shared/libpaw/mods -I…/…/shared/libpaw/mods -I/home/alain/prog_libs/builds/gnu/libraries/hdf5-1.14.0/include -I/home/alain/prog_libs/sources/libraries/hdf5-1.14.0/src/H5FDsubfiling -I/home/alain/prog_libs/builds/gnu/libraries/netcdf-4.6.1/include -I/home/alain/prog_libs/builds/gnu/libraries/netcdf-4.6.1/include -I/home/alain/prog_libs/builds/gnu/libraries/netcdf-4.6.1/include -I/home/alain/prog_libs/builds/gnu/libraries/netcdf-4.6.1/include -ffree-form -J…/mods -O2 -mtune=native -march=native -g -ffree-line-length-none -fopenmp -I/home/alain/prog_libs/builds/gnu/libraries/netcdf-4.6.1/include -I/home/alain/prog_libs/builds/gnu/libraries/netcdf-4.6.1/include -c -o m_sigmaph.o m_sigmaph.F90
m_sigmaph.F90:4982:7:

4982 | NCF_CHECK(nf90_inq_ncid(sr_ncid, strcat(“srate_k”, itoa(ikcalc), “_s”, itoa(spin)), grp_ncid))
| 1
Error: Function ‘nf90_inq_ncid’ at (1) has no IMPLICIT type
m_sigmaph.F90:4982:122:

4982 | NCF_CHECK(nf90_inq_ncid(sr_ncid, strcat(“srate_k”, itoa(ikcalc), “_s”, itoa(spin)), grp_ncid))
| 1
Error: Function ‘nf90_inq_ncid’ at (1) has no IMPLICIT type
m_sigmaph.F90:3475:14:

3475 | NCF_CHECK(nf90_def_grp(ncid, strcat(“srate_k”, itoa(ikcalc), “_s”, itoa(spin)), grp_ncid))
| 1
Error: Function ‘nf90_def_grp’ at (1) has no IMPLICIT type
m_sigmaph.F90:3475:125:

3475 | NCF_CHECK(nf90_def_grp(ncid, strcat(“srate_k”, itoa(ikcalc), “_s”, itoa(spin)), grp_ncid))
| 1
Error: Function ‘nf90_def_grp’ at (1) has no IMPLICIT type

I am not sure if this is related to the preprocessing step. I would be grateful if you can provide any insight/help on this issue.

Thank you very much!

Dear user,

Can you provide us the config.ac file you have used to configure, the output of the configure step and the config.log file generated during the configuration? That will help us understand the problem.

Hi Olivier,

Thanks for your quick reply. I am trying to attach these files but I am getting a message:

“Sorry, new users can not upload attachments.”

Am I missing something on my end?

Thank you.

Hi Olivier,

Just noted that I was granted access to attach files. Please, see the requested files below. The file compile-abinit-gnu.txt contains the script I use to compile Abinit. It has been a while since the last time I built Abinit. I haven’t edited the configure.ac file.

Thanks a lot for your time!

Alain.

compile-abinit-gnu.txt (1.6 KB)
config.log (202.9 KB)
configure.ac (33.5 KB)

Dear Alain,

The error message states that some NetCDF function have no implicit type. Looking at similar issue, it seems some functions from NetCDF are only in C while this part of the code is in fortran. Somewhere before in the code, a comment says:

! (use iso_c_binding to associate a real pointer to complex data because netcdf does not support complex types).
! Well, cannot use c_loc with gcc <= 4.8 due to internal compiler error so use c2r and stack memory.

This iso_c_binding thing is related to using C function in fortran. The person who played with this code was @gmatteo so maybe he has better insights? It was modified a year ago, so maybe an older version of ABINIT would work for you. You said you had it installed in the past? Did you re-install a newer NetCDF? It says you used the 4.6.1 version. That’s for C I suppose? What about fortran? I was able to install ABINIT with NetCDF 4.8.1 and NetCDF-fortran 4.5.3.

Let’s see what others have to say for now, then I can try some more.

Best,
Olivier

Dear Olivier,

Thanks for your reply.

Currently, I am using netcdf-4.6.1 and netcdf-fortran-4.4.4. I will upgrade NetCDF libraries as per your suggestion and get back to you.

Thanks!

Dear Olivier,

Thanks for the suggestion. Indeed, it seems that I hadn’t built the netcdf-fortran library properly. I am posting here the configure lines I used to build the netcdf libraries, just in case it might be useful for other users.

For netcdf-c-4.8.1: (relying on pre-built hdf5 library)

./configure CC=mpicc.openmpi FC=mpif90.openmpi
–prefix=/home/alain/prog_libs/builds/gnu/libraries/netcdf
LDFLAGS=-L/home/alain/prog_libs/builds/gnu/libraries/hdf5-1.14.0/lib
CPPFLAGS=-I/home/alain/prog_libs/builds/gnu/libraries/hdf5-1.14.0/include

For netcdf-fortran-4.5.3:

./configure CC=mpicc.openmpi FC=mpif90.openmpi
–prefix=/home/alain/prog_libs/builds/gnu/libraries/netcdff
LDFLAGS=-L/home/alain/prog_libs/builds/gnu/libraries/netcdf/lib
CPPFLAGS=-I/home/alain/prog_libs/builds/gnu/libraries/netcdf/include

This fixed the compilation error and now I have an executable + utilities :-). I will be testing it tomorrow.

Thank you very much for your help.

Best regards,

Alain.

1 Like