Hello everyone,

Sorry to jump in this thread but I am actually hitting a similar error: (attachment error.txt for more details)

nf_ncdf.f90(3017): catastrophic error: Too many errors, exiting
compilation aborted for nf_ncdf.f90 (code 1)
make[2]: *** [nf_ncdf.o] Error 1
make[2]: Leaving directory `/projects/acad/ucl-naps/software/transiesta/4.1_b1_NETCDF/src/Obj/NCDF/src'
make[1]: *** [lib] Error 2
make[1]: Leaving directory `/projects/acad/ucl-naps/software/transiesta/4.1_b1_NETCDF/src/Obj/NCDF'
make: *** [libncdf.a] Error 2


my arch.make is like this:

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

SIESTA_ARCH=x86_64-unknown-linux-gnu--unknown

FPP=
FPP_OUTPUT=
FC=mpif90
RANLIB=ranlib

SYS=nag

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

FFLAGS=-O1
FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT
LDFLAGS=

MKL_LIBS=${MKLROOT}/lib/intel64/libmkl_blas95_lp64.a ${MKLROOT}/lib/intel64/libmkl_lapack95_lp64.a -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lmkl_blacs_intelmpi_lp64 -lpthread -lm -ldl

#NETCDF_INCFLAGS=-I/softs/netcdf/4.3.2-el6/intel/2013_sp1.1.106/intelmpi/4.1.3.045/include
NETCDF_LIBS=-L/softs/netcdf/4.3.2-el6/intel/2013_sp1.1.106/intelmpi/4.1.3.045/lib -lnetcdff -lnetcdf HDF5_LIBS=-L/softs/hdf5/1.8.13-el6/intel/2013_sp1.1.106/intelmpi/4.1.3.045/lib -lhdf5_fortran -lhdf5


COMP_LIBS=libsiestaLAPACK.a
COMP_LIBS += libncdf.a

FPPFLAGS += -DCDF -DNCDF -DNCDF_4

LIBS=$(MKL_LIBS) $(NETCDF_LIBS) $(HDF5_LIBS)

MPI_INTERFACE=libmpi_f90.a
MPI_INCLUDE=.

.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)  $<


Sorry again to jump in this thread. Thank you in advance for your time.


Jean-Jo



Le 23/09/16 à 07:58, Nick Papior a écrit :
Please attach your entire arch.make file. There are a few unknowns in your compilation process.



2016-09-23 2:52 GMT+02:00 I. Camps <ica...@gmail.com <mailto:ica...@gmail.com>>:

    Hello,

    I am trying to compile siesta-4.1-b1 with NetCDF4 but I am getting
    into troubles :(

    The errors are (my system info is bellow):
    ####################
    mpiifort -E -P -x c  -DCDF -DNCDF_4 -DMPI -DNCDF_PARALLEL -I.
    -I/home/icamps/Temp/SIESTA/siesta-4.1-b1/Src/NCDF/src
    /home/icamps/Temp/SIESTA/siesta-4.1-b1/Src/NCDF/src/nf_ncdf.F90 |
    sed -e 's/NEWLINE/\n/g;/^$/d;/^\!.*&/d;
    s/[[:space:]]*##[[:space:]]*\([^[:space:]]*\)/\1/g;
    s/[[:space:]]*#\([^i][^[:space:]]*\)/"\1"/g; s:/ /://:g;
    s/"endif"/\n#endif/g' > nf_ncdf.f90 #2> /dev/null
    ifort: command line warning #10155: ignoring option '-x'; argument
    required
    ifort: error #10236: File not found:  'c'
    mpiifort -c -w -O2 -mp -I../../    nf_ncdf.f90
    nf_ncdf.f90(59): error #7002: Error in opening the compiled module
    file.  Check INCLUDE paths.   [NETCDF]
      use netcdf
    ------^
    nf_ncdf.f90(95): error #8237: The character length in a component
    declaration shall either be a colon, be an initialization
    expression, or be a specification expression.   [GRP]
         character(len=NF90_MAX_NAME) :: grp = " "
    -------------------------------------^
    nf_ncdf.f90(95): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_MAX_NAME]
         character(len=NF90_MAX_NAME) :: grp = " "
    -------------------^
    nf_ncdf.f90(255): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_MPIIO]
        par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
    ---------------^
    nf_ncdf.f90(255): error #6363: The intrinsic data types of the
    arguments must be the same.   [IAND]
        par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
    --------------------------^
    nf_ncdf.f90(255): error #6404: This name does not have a type, and
    must have an explicit type.   [IAND]
        par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
    ----------^
    nf_ncdf.f90(257): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_MPIPOSIX]
        par = iand(NF90_MPIPOSIX,this%mode) == NF90_MPIPOSIX
    ---------------^
    nf_ncdf.f90(259): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_PNETCDF]
        par = iand(NF90_PNETCDF,this%mode) == NF90_PNETCDF
    ---------------^
    nf_ncdf.f90(297): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_64BIT_OFFSET]
           this%mode = IOR(this%mode,NF90_64BIT_OFFSET)
    ---------------------------------^
    nf_ncdf.f90(297): error #6363: The intrinsic data types of the
    arguments must be the same.   [IOR]
           this%mode = IOR(this%mode,NF90_64BIT_OFFSET)
    ---------------------------------^
    nf_ncdf.f90(311): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_SHARE]
                 if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
    -----------------------^
    nf_ncdf.f90(311): error #6363: The intrinsic data types of the
    arguments must be the same.   [IAND]
                 if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
    ----------------------------------^
    nf_ncdf.f90(311): error #6404: This name does not have a type, and
    must have an explicit type.   [IAND]
                 if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
    ------------------^
    nf_ncdf.f90(359): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_FORMAT_CLASSIC]
           case ( NF90_FORMAT_CLASSIC )
    --------------^
    nf_ncdf.f90(359): error #6601: In a CASE statement, the case-value
    must be a constant expression.   [NF90_FORMAT_CLASSIC]
           case ( NF90_FORMAT_CLASSIC )
    --------------^
    nf_ncdf.f90(359): error #6612: In a CASE statement, the case-value
    must be of type INTEGER, CHARACTER, or LOGICAL. [NF90_FORMAT_CLASSIC]
           case ( NF90_FORMAT_CLASSIC )
    --------------^
    nf_ncdf.f90(359): error #6611: The case-value must be of the same
    type as the case-expr. [NF90_FORMAT_CLASSIC]
           case ( NF90_FORMAT_CLASSIC )
    --------------^
    nf_ncdf.f90(361): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_FORMAT_64BIT]
           case ( NF90_FORMAT_64BIT )
    --------------^
    nf_ncdf.f90(361): error #6601: In a CASE statement, the case-value
    must be a constant expression.   [NF90_FORMAT_64BIT]
           case ( NF90_FORMAT_64BIT )
    --------------^
    nf_ncdf.f90(361): error #6612: In a CASE statement, the case-value
    must be of type INTEGER, CHARACTER, or LOGICAL. [NF90_FORMAT_64BIT]
           case ( NF90_FORMAT_64BIT )
    --------------^
    nf_ncdf.f90(361): error #6611: The case-value must be of the same
    type as the case-expr. [NF90_FORMAT_64BIT]
           case ( NF90_FORMAT_64BIT )
    --------------^
    nf_ncdf.f90(363): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_FORMAT_NETCDF4]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    --------------^
    nf_ncdf.f90(363): error #6601: In a CASE statement, the case-value
    must be a constant expression.   [NF90_FORMAT_NETCDF4]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    --------------^
    nf_ncdf.f90(363): error #6612: In a CASE statement, the case-value
    must be of type INTEGER, CHARACTER, or LOGICAL. [NF90_FORMAT_NETCDF4]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    --------------^
    nf_ncdf.f90(363): error #6611: The case-value must be of the same
    type as the case-expr. [NF90_FORMAT_NETCDF4]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    --------------^
    nf_ncdf.f90(363): error #6404: This name does not have a type, and
    must have an explicit type.   [NF90_FORMAT_NETCDF4_CLASSIC]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    -----------------------------------^
    nf_ncdf.f90(363): error #6601: In a CASE statement, the case-value
    must be a constant expression.   [NF90_FORMAT_NETCDF4_CLASSIC]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    -----------------------------------^
    nf_ncdf.f90(363): error #6612: In a CASE statement, the case-value
    must be of type INTEGER, CHARACTER, or LOGICAL.
    [NF90_FORMAT_NETCDF4_CLASSIC]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    -----------------------------------^
    nf_ncdf.f90(363): error #6611: The case-value must be of the same
    type as the case-expr. [NF90_FORMAT_NETCDF4_CLASSIC]
           case ( NF90_FORMAT_NETCDF4, NF90_FORMAT_NETCDF4_CLASSIC )
    -----------------------------------^
    nf_ncdf.f90(3132): catastrophic error: Too many errors, exiting
    compilation aborted for nf_ncdf.f90 (code 1)
    make[2]: ***
    [/home/icamps/Temp/SIESTA/siesta-4.1-b1/tmp-para-netcdf/arch.make:92:
    nf_ncdf.o] Error 1
    make[2]: Leaving directory
    '/home/icamps/Temp/SIESTA/siesta-4.1-b1/tmp-para-netcdf/NCDF/src'
    make[1]: *** [Makefile:20: lib] Error 2
    make[1]: Leaving directory
    '/home/icamps/Temp/SIESTA/siesta-4.1-b1/tmp-para-netcdf/NCDF'
    make: *** [Makefile:372: libncdf.a] Error 2
    ####################


    My system:
    ************************
    OpenSUSE Tumbleweed (up-to-date)
    Intel Parallel Studio XE 2017 (Fortran compiler, MPI, MKL, etc.)

    HDF5 1.8.17 (configured/compiled with FC=mpiifort CC=mpicc
    ./configure --enable-parallel --prefix=${H5DIR}
    --with-zlib=${H5DIR} --enable-fortran --enable-fortran2003)

    NetCDF4.4.1 (configured/compiled with CC=mpicc
    CPPFLAGS=-I${H5DIR}/include LDFLAGS=-L${H5DIR}/lib64 ./configure
    --prefix=${NCDIR} --enable-netcdf-4 --enable-pnetcdf)

    In my arch.make:

    ETCDF_ROOT=/software/lib/netcdf
    NETCDF_INCFLAGS=-I$(NETCDF_ROOT)/include
    NETCDF_LIBS=-L$(NETCDF_ROOT)/lib64 -lnetcdff -lnetcdf
    -lhdf5_fortran -lhdf5 -lz
    FPPFLAGS_CDF=-DCDF -DNCDF_4

    COMP_LIBS += libncdf.a libfdict.a

    LIBS=$(SUGGESTED_LIBS) $(NETCDF_LIBS) $(COMP_LIBS)
    ************************

    []'s,

    Camps




--
Kind regards Nick

mpif90 -E -P -x c -I/projects/acad/napsimu/local/include -DMPI -DFC_HAVE_FLUSH 
-DFC_HAVE_ABORT -DCDF -DNCDF -DNCDF_4 -DTRANSIESTA  -I. 
-I/projects/acad/ucl-naps/software/transiesta/4.1_b1_NETCDF/src/Src/NCDF/src 
/projects/acad/ucl-naps/software/transiesta/4.1_b1_NETCDF/src/Src/NCDF/src/nf_ncdf.F90
 | sed -e 's/NEWLINE/\n/g;/^$/d;/^\!.*&/d; 
s/[[:space:]]*##[[:space:]]*\([^[:space:]]*\)/\1/g; 
s/[[:space:]]*#\([^i][^[:space:]]*\)/"\1"/g; s:/ /://:g; s/"endif"/\n#endif/g' 
> nf_ncdf.f90 #2> /dev/null
ifort: command line warning #10155: ignoring option '-x'; argument required
ifort: error #10236: File not found:  'c'
mpif90 -c -O1 -I../../    nf_ncdf.f90
nf_ncdf.f90(59): error #7002: Error in opening the compiled module file.  Check 
INCLUDE paths.   [NETCDF]
  use netcdf
------^
nf_ncdf.f90(95): error #8237: The character length in a component declaration 
shall either be a colon, be an initialization expression, or be a specification 
expression.   [GRP]
     character(len=NF90_MAX_NAME) :: grp = " "
-------------------------------------^
nf_ncdf.f90(95): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_MAX_NAME]
     character(len=NF90_MAX_NAME) :: grp = " "
-------------------^
nf_ncdf.f90(255): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_MPIIO]
    par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
---------------^
nf_ncdf.f90(255): warning #7319: This argument's data type is incompatible with 
this intrinsic procedure; procedure assumed EXTERNAL.   [IAND]
    par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
---------------^
nf_ncdf.f90(255): error #6363: The intrinsic data types of the arguments must 
be the same.   [IAND]
    par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
--------------------------^
nf_ncdf.f90(255): error #6404: This name does not have a type, and must have an 
explicit type.   [IAND]
    par = iand(NF90_MPIIO,this%mode) == NF90_MPIIO
----------^
nf_ncdf.f90(257): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_MPIPOSIX]
    par = iand(NF90_MPIPOSIX,this%mode) == NF90_MPIPOSIX
---------------^
nf_ncdf.f90(259): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_PNETCDF]
    par = iand(NF90_PNETCDF,this%mode) == NF90_PNETCDF
---------------^
nf_ncdf.f90(295): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_64BIT_OFFSET]
       this%mode = IOR(this%mode,NF90_64BIT_OFFSET)
---------------------------------^
nf_ncdf.f90(295): error #6363: The intrinsic data types of the arguments must 
be the same.   [IOR]
       this%mode = IOR(this%mode,NF90_64BIT_OFFSET)
---------------------------------^
nf_ncdf.f90(309): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_SHARE]
             if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
-----------------------^
nf_ncdf.f90(309): warning #7319: This argument's data type is incompatible with 
this intrinsic procedure; procedure assumed EXTERNAL.   [IAND]
             if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
-----------------------^
nf_ncdf.f90(309): error #6363: The intrinsic data types of the arguments must 
be the same.   [IAND]
             if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
----------------------------------^
nf_ncdf.f90(309): error #6404: This name does not have a type, and must have an 
explicit type.   [IAND]
             if ( iand(NF90_SHARE,mode) /= NF90_SHARE ) &
------------------^
nf_ncdf.f90(350): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_NETCDF4]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
--------------^
nf_ncdf.f90(350): warning #7319: This argument's data type is incompatible with 
this intrinsic procedure; procedure assumed EXTERNAL.   [IAND]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
--------------^
nf_ncdf.f90(350): error #6363: The intrinsic data types of the arguments must 
be the same.   [IAND]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
---------------------------^
nf_ncdf.f90(350): error #6404: This name does not have a type, and must have an 
explicit type.   [IAND]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
---------^
nf_ncdf.f90(361): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_CREATE]
       call ncdf_err(nf90_create(filename, this%mode , this%f_id), &
---------------------^
nf_ncdf.f90(386): warning #7319: This argument's data type is incompatible with 
this intrinsic procedure; procedure assumed EXTERNAL.   [IAND]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
--------------^
nf_ncdf.f90(386): error #6363: The intrinsic data types of the arguments must 
be the same.   [IAND]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
---------------------------^
nf_ncdf.f90(386): error #6404: This name does not have a type, and must have an 
explicit type.   [IAND]
    if ( iand(NF90_NETCDF4,this%mode) == NF90_NETCDF4 ) then
---------^
nf_ncdf.f90(400): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_NOWRITE]
       this%mode = IOR(this%mode,NF90_NOWRITE)
---------------------------------^
nf_ncdf.f90(400): error #6363: The intrinsic data types of the arguments must 
be the same.   [IOR]
       this%mode = IOR(this%mode,NF90_NOWRITE)
---------------------------------^
nf_ncdf.f90(405): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_OPEN]
       call ncdf_err(nf90_open(filename, this%mode , this%f_id), &
---------------------^
nf_ncdf.f90(416): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_INQ_GRP_FULL_NCID]
       call ncdf_err(nf90_inq_grp_full_ncid(this%f_id, trim(this%grp), this%id))
---------------------^
nf_ncdf.f90(621): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_CLOSE]
    call ncdf_err(nf90_close(this%f_id),"Closing NetCDF file: "//this)
------------------^
nf_ncdf.f90(647): error #6632: Keyword arguments are invalid without an 
explicit interface.   [FORMATNUM]
    call ncdf_err(nf90_inquire(this%id,ldims,lvars,latts,formatNum=lformat), &
---------------------------------------------------------^
nf_ncdf.f90(647): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_INQUIRE]
    call ncdf_err(nf90_inquire(this%id,ldims,lvars,latts,formatNum=lformat), &
------------------^
nf_ncdf.f90(656): error #6632: Keyword arguments are invalid without an 
explicit interface.   [NAME]
          call ncdf_err(nf90_inquire_dimension(this%id,i,name=key))
---------------------------------------------------------^
nf_ncdf.f90(656): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_INQUIRE_DIMENSION]
          call ncdf_err(nf90_inquire_dimension(this%id,i,name=key))
------------------------^
nf_ncdf.f90(662): error #6404: This name does not have a type, and must have an 
explicit type.   [NF90_GLOBAL]
       call get_atts_id(this,NF90_GLOBAL,dict_att)
-----------------------------^
nf_ncdf.f90(3017): catastrophic error: Too many errors, exiting
compilation aborted for nf_ncdf.f90 (code 1)
make[2]: *** [nf_ncdf.o] Error 1
make[2]: Leaving directory 
`/projects/acad/ucl-naps/software/transiesta/4.1_b1_NETCDF/src/Obj/NCDF/src'
make[1]: *** [lib] Error 2
make[1]: Leaving directory 
`/projects/acad/ucl-naps/software/transiesta/4.1_b1_NETCDF/src/Obj/NCDF'
make: *** [libncdf.a] Error 2

Responder a