[SIESTA-L] Compiling siesta 4.1.b4 and 4.1.5 with intel tools fails at iogrid_netcdf.F90

2021-07-12 Por tôpico Jimenez Alfaro, Jorge (NASERTIC)


Hello,

Any help will be really appreciated. Many thanks in advance

I have modified line 33 of Makefile regarding a recipe that used to work for 
Siesta

#add in Makefile line 33: lib: libfdict.a libncdf.a libSiestaXC.a libfdf.a 
libSiestaForces.a

System information: Centos 7.8

Loaded modules

intel/19.1.1.217

netCDF/4.4.1.1-intel

HDF5/1.8.10-intel

PnetCDF/1.8.1-intel

metis/5.1.0-intel

Compilation output: [Full_PATH]/Src/iogrid_netcdf.F90(133): error #7002: Error 
in opening the compiled module file. Check INCLUDE paths. [NETCDF] use netcdf

[Full_PATH]/Src/iogrid_netcdf.F90(272): error #7002: Error in opening the 
compiled module file. Check INCLUDE paths. [NETCDF] use netcdf ^ 
[Full_PATH]/Src/iogrid_netcdf.F90(391): error #7002: Error in opening the 
compiled module file. Check INCLUDE paths. [NETCDF] use netcdf, only: 
nf90_noerr, nf90_strerror ^ [Full_PATH]/Src/iogrid_netcdf.F90(157): error 
#6404: This name does not have a type, and must have an explicit type. 
[NF90_SHARE] iret = 
nf90_create(trim(name)//".grid.nc",NF90_SHARE+NF90_WRITE,ncid)

Arch.make as follows


#
# Copyright (C) 1996-2016   The SIESTA group
#  This file is distributed under the terms of the
#  GNU General Public License: see COPYING in the top directory
#  or http://www.gnu.org/copyleft/gpl.txt.
# See Docs/Contributors.txt for a list of contributors.
#
#---
# arch.make file for gfortran compiler.
# To use this arch.make file you should rename it to
#   arch.make
# or make a sym-link.
# For an explanation of the flags see DOCUMENTED-TEMPLATE.make

.SUFFIXES:
.SUFFIXES: .f .F .o .c .a .f90 .F90

SIESTA_ARCH=x86_64-unknown-linux-intel

CC = icc
FPP = $(FC) -E -P
FC = mpiifort
#FC_SERIAL = ifort

#FFLAGS = -O2 -fPIC -fp-model source


#AR = ar
RANLIB = ranlib

SYS = nag

SP_KIND = 4
DP_KIND = 8
KINDS = $(SP_KIND) $(DP_KIND)

#LDFLAGS =


FFLAGS= -qopenmp -I/opt/shared/apps/netCDF/4.4.1.1-intel/include/ 
-I/opt/apps/Siesta/siesta-4.1.5/Obj

FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF -DSIESTA__NO_MRRR

LDFLAGS= -qopenmp

ARFLAGS_EXTRA=

FCFLAGS_fixed_f=
FCFLAGS_free_f90=
FPPFLAGS_fixed_F=
FPPFLAGS_free_F90=
BLACS_LIBS= -L${MKLROOT}/lib/intel64 -libmkl_scalapack_lp64 -libmkl_intel_lp64 
-libmkl_intel_thread -libmkl_core -libmkl_blacs_intelmpi_lp64 -liomp5 -lpthread 
-lm -ldl
SCALAPACK_LIBS= -L${MKLROOT}/lib/intel64 -libmkl_scalapack_lp64 
-libmkl_intel_lp64 -libmkl_intel_thread -libmkl_core 
-libmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl

INTEL_LIBS = $MKLROOT/lib/intel64/libmkl_intel_lp64.a \
$(MKLROOT)/lib/intel64/libmkl_sequential.a \
$(MKLROOT)/lib/intel64/libmkl_core.a \
$(MKLROOT)/lib/intel64/libmkl_blacs_intelmpi_lp64.a \
$(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a
MPI_LIBS = 
-L/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib -lmpi
MPI_INCLUDE  = 
-I/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/include


#COMP_LIBS=dc_lapack.a liblapack.a libblas.a
export NETCDF=/opt/shared/apps/netCDF/4.4.1.1-intel
NETCDF_LIBS= -L$(NETCDF)/lib -L/opt/shared/apps/PnetCDF/1.7.0-intel/include  
-L/opt/shared/apps/HDF5/1.8.19-intel/lib -lnetcdff -lnetcdf -lhdf5_fortran 
-lhdf5 -lz -liomp5
NETCDF_INTERFACE=-I/apps/PNETCDF/1.8.1/INTEL/IMPI/include
HDF5_ROOT=/opt/shared/apps/HDF5/1.8.19-intel/

NETCDF_INCFLAGS  = -I$(NETCDF)/include
HDF5_INCFLAGS  = -I$(HDF5_ROOT)/include


LIBS=$(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(NETCDF_LIBS) 
-L/apps/METIS/5.1.0/INTEL/lib -lmetis

#SIESTA needs an F90 interface to MPI
#This will give you SIESTA's own implementation
#If your compiler vendor offers an alternative, you may change
#to it here.
MPI_INTERFACE=libmpi_f90.a



INCFLAGS = $(NETCDF_INCFLAGS) $(HDF5_INCFLAGS) $(MPI_INCLUDE) $(MKL_INCLUDE)

# Dependency rules -

FFLAGS_DEBUG = -g -O1 -fp-model source   # your appropriate flags here...

# The atom.f code is very vulnerable. Particularly the Intel compiler
# will make an erroneous compilation of atom.f with high optimization
# levels.
atom.o: atom.F
$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
state_analysis.o: state_analysis.F
$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F) $<
.c.o:
$(CC) -c $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $<
.F.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F)  $<
.F90.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F90) $<
.f.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f)  $<
.f90.o:
$(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90)  $<


-- 
SIESTA is supported by the Spanish Research Agency (AEI) and by the European 
H2020 MaX Centre of Excellence (http://www.max-centre.eu/)


[SIESTA-L] Compiling siesta 4.1.b4 and 4.1.5 with intel tools fails at siesta_cmlsubs.F90

2021-07-12 Por tôpico Jimenez Alfaro, Jorge (NASERTIC)

Hello

Hello, Issue compiling 4.1.b4.  The error appears executing make lib

compilation aborted for /opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90 
(code 1) make: *** [siesta_cmlsubs.o] Error 1

Any help will be really appreciated.
Many thanks in advance


mpiifort -c -qopenmp -I/opt/shared/apps/netCDF/4.4.1.1-intel/include/ 
-I/opt/apps/Siesta/siesta-4.1-b4/Obj 
-I/opt/shared/apps/netCDF/4.4.1.1-intel/include 
-I/opt/shared/apps/netCDF/4.4.1.1-intel/include 
-I/opt/shared/apps/HDF5/1.8.19-intel/include 
-I/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/include -DMPI 
-DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF -DSIESTA__NO_MRRR 
/opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90

/opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90(26): error #7002: Error 
in opening the compiled module file. Check INCLUDE paths. [VERSION_INFO]
Use version_info --^

/opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90(62): error #6285: There 
is no matching specific subroutine for this generic subroutine call. 
[CMLADDMETADATA]
Call cmlAddMetadata(mainXML, name='siesta:Version', content=version_str) 
--^

/opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90(63): error #6285: There 
is no matching specific subroutine for this generic subroutine call. 
[CMLADDMETADATA]
Call cmlAddMetadata(mainXML, name='siesta:Arch', content=siesta_arch) 
--^

/opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90(64): error #6285: There 
is no matching specific subroutine for this generic subroutine call. 
[CMLADDMETADATA]
Call cmlAddMetadata(mainXML, name='siesta:Flags', content=fflags) 
--^
/opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90(65): error #6285: There 
is no matching specific subroutine for this generic subroutine call. 
[CMLADDMETADATA]
Call cmlAddMetadata(mainXML, name='siesta:PPFlags', content=fppflags) 
--^


compilation aborted for /opt/apps/Siesta/siesta-4.1-b4/Src/siesta_cmlsubs.F90 
(code 1) make: *** [siesta_cmlsubs.o] Error 1

-- 
SIESTA is supported by the Spanish Research Agency (AEI) and by the European 
H2020 MaX Centre of Excellence (http://www.max-centre.eu/)


RE: [SIESTA-L] Compiling siesta 4.1.b4 and 4.1.5 with intel tools fails at iogrid_netcdf.F90

2021-07-14 Por tôpico Jimenez Alfaro, Jorge (NASERTIC)
Many thanks for your response
It worked.

Everything is fine unless 2 warning that I want to check

Best Regards
Jorge

-Mensaje original-
De: siesta-l-requ...@uam.es  En nombre de Alberto 
Garcia
Enviado el: martes, 13 de julio de 2021 8:35
Para: siesta-l 
Asunto: Re: [SIESTA-L] Compiling siesta 4.1.b4 and 4.1.5 with intel tools fails 
at iogrid_netcdf.F90

Hi,

In your arch.make you have defined the symbol NETCDF_INTERFACE, but the symbol 
whose value you append to INCFLAGS is NETCDF_INCLAGS.
Please change NETCDF_INTERFACE to NETCDF_INCFLAGS.

Also, regarding your related post: 'make lib' should not be used to compile 
Siesta. Just use 'make'.

  Alberto


- El 12 de Jul de 2021, a las 09:32, Jimenez Alfaro, Jorge (NASERTIC) 
jjime...@nasertic.es escribió:

| Hello,
| 
| Any help will be really appreciated. Many thanks in advance
| 
| I have modified line 33 of Makefile regarding a recipe that used to 
| work for Siesta
| 
| #add in Makefile line 33: lib: libfdict.a libncdf.a libSiestaXC.a 
| libfdf.a libSiestaForces.a
| 
| System information: Centos 7.8
| 
| Loaded modules
| 
| intel/19.1.1.217
| 
| netCDF/4.4.1.1-intel
| 
| HDF5/1.8.10-intel
| 
| PnetCDF/1.8.1-intel
| 
| metis/5.1.0-intel
| 
| Compilation output: [Full_PATH]/Src/iogrid_netcdf.F90(133): error 
| #7002: Error in opening the compiled module file. Check INCLUDE paths. 
| [NETCDF] use netcdf
| 
| [Full_PATH]/Src/iogrid_netcdf.F90(272): error #7002: Error in opening 
| the compiled module file. Check INCLUDE paths. [NETCDF] use netcdf 
| ^
| [Full_PATH]/Src/iogrid_netcdf.F90(391): error #7002: Error in opening 
| the compiled module file. Check INCLUDE paths. [NETCDF] use netcdf, only:
| nf90_noerr, nf90_strerror ^ 
| [Full_PATH]/Src/iogrid_netcdf.F90(157): error
| #6404: This name does not have a type, and must have an explicit type.
| [NF90_SHARE] iret =
| nf90_create(trim(name)//".grid.nc",NF90_SHARE+NF90_WRITE,ncid)
| 
| Arch.make as follows
| 
| 
| 
| 
| 
| #
| 
| # Copyright (C) 1996-2016 The SIESTA group
| 
| # This file is distributed under the terms of the
| 
| # GNU General Public License: see COPYING in the top directory
| 
| # or http://www.gnu.org/copyleft/gpl.txt.
| 
| # See Docs/Contributors.txt for a list of contributors.
| 
| #
| 
| #---
| 
| # arch.make file for gfortran compiler.
| 
| # To use this arch.make file you should rename it to
| 
| # arch.make
| 
| # or make a sym-link.
| 
| # For an explanation of the flags see DOCUMENTED-TEMPLATE.make
| 
| 
| 
| .SUFFIXES:
| 
| .SUFFIXES: .f .F .o .c .a .f90 .F90
| 
| 
| 
| SIESTA_ARCH=x86_64-unknown-linux-intel
| 
| 
| 
| CC = icc
| 
| FPP = $(FC) -E -P
| 
| FC = mpiifort
| 
| #FC_SERIAL = ifort
| 
| 
| 
| #FFLAGS = -O2 -fPIC -fp-model source
| 
| 
| 
| 
| 
| #AR = ar
| 
| RANLIB = ranlib
| 
| 
| 
| SYS = nag
| 
| 
| 
| SP_KIND = 4
| 
| DP_KIND = 8
| 
| KINDS = $(SP_KIND) $(DP_KIND)
| 
| 
| 
| #LDFLAGS =
| 
| 
| 
| 
| 
| FFLAGS= -qopenmp -I/opt/shared/apps/netCDF/4.4.1.1-intel/include/
| -I/opt/apps/Siesta/siesta-4.1.5/Obj
| 
| 
| 
| FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF 
| -DSIESTA__NO_MRRR
| 
| 
| 
| LDFLAGS= -qopenmp
| 
| 
| 
| ARFLAGS_EXTRA=
| 
| 
| 
| FCFLAGS_fixed_f=
| 
| FCFLAGS_free_f90=
| 
| FPPFLAGS_fixed_F=
| 
| FPPFLAGS_free_F90=
| 
| BLACS_LIBS= -L${MKLROOT}/lib/intel64 -libmkl_scalapack_lp64 
| -libmkl_intel_lp64 -libmkl_intel_thread -libmkl_core 
| -libmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl
| 
| SCALAPACK_LIBS= -L${MKLROOT}/lib/intel64 -libmkl_scalapack_lp64
| -libmkl_intel_lp64 -libmkl_intel_thread -libmkl_core
| -libmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl
| 
| 
| 
| INTEL_LIBS = $MKLROOT/lib/intel64/libmkl_intel_lp64.a \
| 
| $(MKLROOT)/lib/intel64/libmkl_sequential.a \
| 
| $(MKLROOT)/lib/intel64/libmkl_core.a \
| 
| $(MKLROOT)/lib/intel64/libmkl_blacs_intelmpi_lp64.a \
| 
| $(MKLROOT)/lib/intel64/libmkl_scalapack_lp64.a
| 
| MPI_LIBS = 
| -L/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/lib
| -lmpi
| 
| MPI_INCLUDE =
| -I/opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/incl
| ude
| 
| 
| 
| 
| 
| #COMP_LIBS=dc_lapack.a liblapack.a libblas.a
| 
| export NETCDF=/opt/shared/apps/netCDF/4.4.1.1-intel
| 
| NETCDF_LIBS= -L$(NETCDF)/lib 
| -L/opt/shared/apps/PnetCDF/1.7.0-intel/include
| -L/opt/shared/apps/HDF5/1.8.19-intel/lib -lnetcdff -lnetcdf 
| -lhdf5_fortran
| -lhdf5 -lz -liomp5
| 
| NETCDF_INTERFACE=-I/apps/PNETCDF/1.8.1/INTEL/IMPI/include
| 
| HDF5_ROOT=/opt/shared/apps/HDF5/1.8.19-intel/
| 
| 
| 
| NETCDF_INCFLAGS = -I$(NETCDF)/include
| 
| HDF5_INCFLAGS = -I$(HDF5_ROOT)/include
| 
| 
| 
| 
| 
| LIBS=$(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) 
| $(NETCDF_LIBS) -L/apps/METIS/5.1.0/INTEL/lib -lmetis
| 
| 
| 
| #SIESTA needs an F90 interface to MPI
| 
| #This will give you SIESTA's own implementation
| 
| #If your compiler vendor offers an alternati