Skip to Content.
Sympa Menu

forum - cut3d with netcdf support building problem

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

cut3d with netcdf support building problem


Chronological Thread 
  • From: qba@mml.ch.pwr.wroc.pl
  • To: forum@abinit.org
  • Subject: cut3d with netcdf support building problem
  • Date: Thu, 23 Feb 2006 10:39:45 +0100

Hi all!!!

I am trying to build cut3d with support for netcdf. Here is my
makefile_macros file: (I am bulding on Pentium 4 Linux box, using IFC 9.0
compiler)


MACHINE=P6
# Fortran optimized compilation
FC=ifort
FFLAGS=-FR -O3 -w
FFLAGS_LIBS= -O3 -w

# C preprocessor, used to preprocess the fortran source.
CPP=/usr/bin/cpp
CPP_FLAGS=-P -traditional -D__IFC -DNETCDF
# The cpp directive CHGSTDIO changes the standard I/O definition
# Uncomment the next line for this to happen.
#CPP_FLAGS=-P -DCHGSTDIO

# C optimized compilation.
CC=cc
CFLAGS=-O

# Location of perl . Used to generate the script fldiff, in ~ABINIT/Utilities
.
PERL=/usr/bin/perl

# List of machine-dependent routines
MACHINE_DEP_C_SEQ_SUBS_LIST=etime.o

# Create BLAS library from abinis source
# The following lines should be redundant, since this is the default
# however, we got troubles when they where missing
BLAS=Lib_blas/blas.a
LAPACK=Lib_lapack/lapack.a
LIBS=$(LAPACK) $(BLAS) $(NETCDF)


NC_FC=g77
NC_F90=ifort
NC_CPPFLAGS=
NC_FLIBS=
NC_CC=gcc
NC_CFLAGS=-O2
NC_FFLAGS=


I have found somewhere on this list that I should use -DNETCDF in CPP_FLAGS,
however, using this I have got following error message in log file from
make cut3d command:

...(cut)....

cd ./Src_main ; \
/home/qba/data/instalki/abinit-4.6.5/makedefns ; \
if [ ! -f include.version ] ; then \
cp /home/qba/data/instalki/abinit-4.6.5/include.version . ; \
fi ; \
rm -f cut3d_cpp.f90 ; \
/usr/bin/cpp -C -DP6 -P -traditional -D__IFC -DNETCDF
/home/qba/data/instalki/abinit-4.6.5/Src_main/cut3d.F90 | sed '/^#pragma/d' >
cut3d_cpp.f90 ; \
ifort -FR -O3 -w -c cut3d_cpp.f90 ; \
mv cut3d_cpp.o cut3d.o ; \
if [ no = yes ] ; then \
rm -f cut3d_cpp.f90 ; \
fi
/home/qba/data/instalki/abinit-4.6.5/Src_main
makedefns : copied defs files to dir
fortcom: Error: cut3d_cpp.f90, line 42: Error in opening the Library module
file. [NETCDF]
use netcdf
------^
fortcom: Error: cut3d_cpp.f90, line 643: This name does not have a type, and
must have an explicit type. [NF90_CREATE]
status = nf90_create(filnam, nf90_clobber, ncid)
-----------------------^
fortcom: Error: cut3d_cpp.f90, line 644: This name does not have a type, and
must have an explicit type. [NF90_NOERR]
if (status /= nf90_noerr) call handle_ncerr(status, "Creating
file")
----------------------------^
fortcom: Error: cut3d_cpp.f90, line 682: This name does not have a type, and
must have an explicit type. [NF90_DEF_DIM]
status = nf90_def_dim(ncid,"gridsize1",nr1, gridsize1DimID)
-----------------------^
fortcom: Error: cut3d_cpp.f90, line 702: This name does not have a type, and
must have an explicit type. [NF90_DEF_VAR]
status = nf90_def_var(ncid, "latticevec",nf90_float, (/
latDimID, latDimID /), latticevecVarID)
-----------------------^
fortcom: Error: cut3d_cpp.f90, line 737: This name does not have a type, and
must have an explicit type. [NF90_PUT_ATT]
status = nf90_put_att(ncid,latticevecVarID , "field",
"latticevec,vector")
-----------------------^
fortcom: Error: cut3d_cpp.f90, line 808: This name does not have a type, and
must have an explicit type. [NF90_ENDDEF]
status = nf90_enddef(ncid)
-----------------------^
fortcom: Error: cut3d_cpp.f90, line 813: This name does not have a type, and
must have an explicit type. [NF90_PUT_VAR]
status = nf90_put_var(ncid,latticevecVarID,Bohr_Ang*rprimd)
-----------------------^
fortcom: Error: cut3d_cpp.f90, line 839: This name does not have a type, and
must have an explicit type. [NF90_CLOSE]
status = nf90_close(ncid)
-----------------------^
compilation aborted for cut3d_cpp.f90 (code 1)

...(cut)...

I have noticed also that netcdf distribution in Lib_netcdf directory is not
build during the compilation of abinit. I have downloaded new netcdf-3.6,
build it, and I have put libnetcdf.a in $ABINITHOME/Lib_netcdf/lib.
Then, I have tried to build cut3d without -DNETCDF flag, The compilation
finished without errors, cut3d was linked with my libnetcdf.a, but I still
can not get output in netcdf format.

Oh, I am using abinit-4.6.5

Any ideas what I'm doing wrong?

Regards,
Kuba






Archive powered by MHonArc 2.6.16.

Top of Page