Page 1 of 4

Linking with NETCDF

Posted: Fri Oct 30, 2009 6:11 am
by devsharma
hi sir,
Thanks for guidance. I will use Abinit for all my calculations.

Sir, as u suggested,i tried to install the yambo with netcdf. Please tell one thing.
I download netcdf -4.01, extract it in home folder(/home/sushil) and compile it with
./configure --prefix=/home/sushil/net (where net is a folder i created)
make check install
i got netcdf compiled with no error. and all tests were passed.
Now i have , in net folder ,
bin include lib src
and in netcdf-4.0.1 folder ,
cxx cxx4 examples f90 fortran libncdap libsrc libsrc4 m4 man4 ncdap_test ncdump ncgen ncgen4 nctest nc_test nf_test win32

Sir, i want to ask, now if i have to compile the yambo with netcdf libraries which path to specify??
i tried
./configure --with-netcdf=/home/sushil/net/lib
but the configuration was not with netcdf. Please guide
thanks
with regards
Dev

Re: Linking with NETCDF

Posted: Fri Oct 30, 2009 11:28 am
by Conor Hogan
Dear Dev,
Unfortunately the web page has not been updated to show this for the latest versions of the code, but you can always check the correct configure options using

Code: Select all

./configure --help
It this case it shows you:

Code: Select all

  
  --with-netcdf-include=<path>
                          Path of the NetCDF include directory
  --with-netcdf-lib=<path>
                          Path of the NetCDF lib directory
so you need to make the appropriate modifications.
Regards,
Conor

Re: Linking with NETCDF

Posted: Tue May 18, 2010 10:01 am
by feffeficus
Hi guys,

netcdf compiling error, I presume:

I'm compiling on this machine in CCRT:

952 Machines Bull modèles 3045 et 3045c sous OS Bull Advanced Server 4 version 5
64-bit
i load this modules (that are supposed to be coherent each other I hope..)

1) mpibull2/1.3.9-5.s(default) 2) intel/11.1.056(default) 3) fftw3/3.2.1 4) netcdf/3.6.2 5) mkl/10.1.0.015

i use this configure:

Code: Select all

./configure --with-iotk=/home/cont003/feffe/CODES/PLATINE/espresso-4.1.2/iotk --with-fftw=/applications/fftw3-3.2.1/ --with-netcdf-lib=/opt/scilibs/NETCDF/netCDF-3.6.2/lib --with-netcdf-include=/opt/scilibs/NETCDF/netCDF-3.6.2/include --with-p2y=4.0 --enable-largedb FC=/opt/mpi/mpibull2-1.3.9-5.s/bin/mpif90 FCFLAGS=-nofor-main
and after a good configure, doing make yambo, I found en error with these two modules:

Code: Select all

home/cont003/feffe/CODES/PLATINE/yambo-3.2.1_rev576/lib/libmodules.a
/home/cont003/feffe/CODES/PLATINE/yambo-3.2.1_rev576/lib/libio.a

make[1]: *** [yambo] Error 1
make[1]: Leaving directory `/home/cont003/feffe/CODES/PLATINE/yambo-3.2.1_rev576/driver'
make: *** [yambo] Error 2

Now: I ask of course to the ccrt guys, but in the meanwhile, since they don't reply yet, do you think is a problem of netcdf precompilation or not?

Thanks!
ff

Re: Linking with NETCDF

Posted: Tue May 18, 2010 11:37 am
by myrta gruning
Ciao Feffe

Usually netcdf problems appear from the configure...
It seems you have the problem at the final stage while yambo is linking all the libs
libmodules.a
libio.a
that are generated by the yambo compilation.
Maybe they were not properly cleaned from a previous compilation :?: well this is just an hypothesis, the compiler error message is not really helpful.
You may try with a
make clean
checking that all the *.a and *.o are cleaned and then re-do
make yambo

m

Re: Linking with NETCDF

Posted: Tue May 18, 2010 12:40 pm
by feffeficus
ciao Myrta!
thanks.

I will try as you suggest. I will let you know!
ciau!
ff

Re: Linking with NETCDF

Posted: Tue May 18, 2010 1:08 pm
by feffeficus
sorry no way.

i still get this as last of a long list of errors:

Code: Select all

/home/cont003/feffe/CODES/PLATINE/yambo-prova/yambo-3.2.1_rev576/lib/libmodules.a(mod_IO.o)(.text+0x6192): In function `io_m_mp_variable_is_found_':
: undefined reference to `netcdf_mp_nf90_inq_varid_'
sigh.

Re: Linking with NETCDF

Posted: Tue May 18, 2010 1:30 pm
by andrea marini
Feffe, do a make clean_all and after the configure list the contents of the lib/ and include/ folders (before compiling). They should look like

Code: Select all

include/:
bison  gsl_complex.h  gsl_complex_math.h  netcdfcpp.h  netcdf.h  netcdf.hh  netcdf.inc  netcdf.mod  parser.h  symbols.h  typesizes.mod  version.inc

lib/:
blas  lapack  libiotk.a  libnetcdf.a  libnetcdf_c++.a  local  slatec

Re: Linking with NETCDF

Posted: Tue May 18, 2010 1:37 pm
by feffeficus
andrea marini wrote:Feffe, do a make clean_all and after the configure list the contents of the lib/ and include/ folders (before compiling). They should look like

Code: Select all

include/:
bison  gsl_complex.h  gsl_complex_math.h  netcdfcpp.h  netcdf.h  netcdf.hh  netcdf.inc  netcdf.mod  parser.h  symbols.h  typesizes.mod  version.inc

lib/:
blas  lapack  libiotk.a  libnetcdf.a  libnetcdf_c++.a  local  slatec

yes, they are like that.

Re: Linking with NETCDF

Posted: Tue May 18, 2010 1:47 pm
by andrea marini
Ok. so the problem is at the linking time. Last you think we can try is to compile using

Code: Select all

configure (...) --enable-msgs-comps
Then you can redirect configure and compilation log with

Code: Select all

./configure (...) >& CONFIGURE_LOG
make (...) >& COMPILATION_LOG
then tar the two files and post them here om the forum. Maybe from the messages of the configure/make we can guess where the problem is.

Re: Linking with NETCDF

Posted: Tue May 18, 2010 2:30 pm
by feffeficus
andrea marini wrote:Ok. so the problem is at the linking time. Last you think we can try is to compile using

Code: Select all

configure (...) --enable-msgs-comps
Then you can redirect configure and compilation log with

Code: Select all

./configure (...) >& CONFIGURE_LOG
make (...) >& COMPILATION_LOG
then tar the two files and post them here om the forum. Maybe from the messages of the configure/make we can guess where the problem is.
thanks. ok. the file are in attachement.
sorry to bother, since now no improvement.