[SOLVED] problem of make abinit6.6.1

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

[SOLVED] problem of make abinit6.6.1

Post by zidan » Tue Mar 22, 2011 1:19 pm

When I try to install abinit on the cluster (RedHat Enterprise Linux 5 x86_64, gcc 4.5.2, intel 10.1)
I have tried:
1. ./configure --prefix...
2. make FC=gfortran, then error came up as the following

make[7]: Entering directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
echo '! NetCDF-3.' > netcdf.inc
cat ../fortran/netcdf3.inc >> netcdf.inc
make all-am
make[8]: Entering directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../libsrc -DNDEBUG -DpgiFortran -g -O2 -MT fort-attio.lo -MD -MP -MF $depbase.Tpo -c -o fort-attio.lo fort-attio.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../libsrc -DNDEBUG -DpgiFortran -g -O2 -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-attio.c -o fort-attio.o
In file included from fort-attio.c:7 :
ncfortran.h:26:42: error:NF_INT_IS_C_... not defined:No such file or directory
fort-attio.c: In function ‘NF_INT_cfF’:
fort-attio.c:13: error:expected declaration specifiers before ‘NF_INTEGER’
fort-attio.c:20: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NF_INTEGER’
fort-attio.c:121: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NF_INTEGER’
fort-attio.c:133: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NF_INTEGER’
fort-attio.c:141: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NF_INTEGER’
fort-attio.c:148: error:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘NF_INTEGER’
fort-attio.c:148: error:expected ‘{’ at end of input
make[8]: *** [fort-attio.lo] error 1
make[8]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
make[7]: *** [all] error 2
make[7]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
make[6]: *** [all-recursive] error 1
make[6]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1'
make[5]: *** [all] error 2
make[5]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1'
make[4]: *** [build-stamp] error 2
make[4]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf'
make[3]: *** [package-ready] error 2
make[3]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf'
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins'
make[1]: *** [all-recursive] error 1
make[1]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1'
make: *** [all] error 2

I don't know how to solve this problem. Does anyone know what the problem is? Thanks
Attachments
config.log
(126.99 KiB) Downloaded 426 times
Last edited by zidan on Tue Mar 22, 2011 1:48 pm, edited 3 times in total.

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Tue Mar 22, 2011 1:25 pm

I have thought there are some thing wrong with the netcdf in the plugins directory, then I download a netcdf package form the web page http://www.unidata.ucar.edu/software/netcdf/ and install it, then i try --with-netcdf=... while configuring abinit, but it doesn't work!
Thanks for your kindness help! :)

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: problem of make abinit6.6.1

Post by Alain_Jacques » Tue Mar 22, 2011 1:45 pm

Dear Zidan,

From your config.log ...
configure:10801: gcc --version >&5
gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
i.e. 4.1.2 = old stuff = unsupported. I would suggest to adapt your environment to the gcc-4.5.2 that you mentioned (i.e. PATH and LD_LIBRARY_PATH) and configure Abinit with a proper ../configure ... FC=/path_to_4.5.2/bin/gfortran CC=/path_to_4.5.2/bin/gcc CXX=/path_to_4.5.2/bin/g++

Kind regards,

Alain

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Tue Mar 22, 2011 2:05 pm

Alain_Jacques wrote:Dear Zidan,

From your config.log ...
configure:10801: gcc --version >&5
gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
i.e. 4.1.2 = old stuff = unsupported. I would suggest to adapt your environment to the gcc-4.5.2 that you mentioned (i.e. PATH and LD_LIBRARY_PATH) and configure Abinit with a proper ../configure ... FC=/path_to_4.5.2/bin/gfortran CC=/path_to_4.5.2/bin/gcc CXX=/path_to_4.5.2/bin/g++

Kind regards,

Alain


Dear Alain
Thanks for your kindness help
Although I didn't add "FC=/path_to_4.5.2/bin/gfortran CC=/path_to_4.5.2/bin/gcc CXX=/path_to_4.5.2/bin/g++" when I "./configure", but I had use them when "make " .
Now I have tried the way you suggested, but the "make" process interrupted too

/bin/sh ../libtool --tag=FC --mode=link /vol5/home/simg/software/local/gcc-4.5.2/bin/gfortran -I../libsrc -I. -ffree-form -g -ffree-line-length-none -Wstrict-aliasing=2 -O2 -mtune=native -march=native -mfpmath=sse -o libnetcdff90.la typeSizes.lo netcdf.lo
libtool: link: ar cru .libs/libnetcdff90.a typeSizes.o netcdf.o
libtool: link: ranlib .libs/libnetcdff90.a
libtool: link: ( cd ".libs" && rm -f "libnetcdff90.la" && ln -s "../libnetcdff90.la" "libnetcdff90.la" )
make[8]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/f90'
make[7]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/f90'
Making all in fortran
make[7]: Entering directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
echo '! NetCDF-3.' > netcdf.inc
cat ../fortran/netcdf3.inc >> netcdf.inc
make all-am
make[8]: Entering directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile /vol5/home/simg/software/local/gcc-4.5.2/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../libsrc -DNDEBUG -DpgiFortran -g -O2 -mtune=native -march=native -mfpmath=sse -MT fort-attio.lo -MD -MP -MF $depbase.Tpo -c -o fort-attio.lo fort-attio.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: /vol5/home/simg/software/local/gcc-4.5.2/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I../libsrc -DNDEBUG -DpgiFortran -g -O2 -mtune=native -march=native -mfpmath=sse -MT fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-attio.c -o fort-attio.o
In file included from fort-attio.c:7:0:
ncfortran.h:26:42: Fatal error:NF_INT_IS_C_... not defined:no such file or directory
compilling interrupted。
make[8]: *** [fort-attio.lo] error 1
make[8]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
make[7]: *** [all] error 2
make[7]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1/fortran'
make[6]: *** [all-recursive] error 1
make[6]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1'
make[5]: *** [all] error 2
make[5]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1'
make[4]: *** [build-stamp] error 2
make[4]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf'
make[3]: *** [package-ready] error 2
make[3]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins/netcdf'
make[2]: *** [all-recursive] error 1
make[2]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1/plugins'
make[1]: *** [all-recursive] error 1
make[1]: Leaving directory `/vol5/home/simg/software/abinit-6.6.1'
make: *** [all] error 2
Attachments
config.log
(127.68 KiB) Downloaded 399 times

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: problem of make abinit6.6.1

Post by Alain_Jacques » Tue Mar 22, 2011 2:28 pm

Did you "make clean" before the configure step?

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Tue Mar 22, 2011 2:37 pm

Alain_Jacques wrote:Did you "make clean" before the configure step?


I delete the abinit-6.6.1 folder and untar the abinit-6.6.1 package, and then "./configure --prefix=/vol5/home/simg/software/abinit/ FC=/vol5/home/simg/software/local/gcc-4.5.2/bin/gfortran CC=/vol5/home/simg/software/local/gcc-4.5.2/bin/gcc CXX=/vol5/home/simg/software/local/gcc-4.5.2/bin/g++" and "make"

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: problem of make abinit6.6.1

Post by Alain_Jacques » Tue Mar 22, 2011 4:16 pm

two sugestions ...
x use --enable-64bit-flags
x you seem to have a netcdf package already installed - probably from RH repositories. Would you please check this with a

Code: Select all

rpm -qa |grep netcdf
If you're allowed to do so, can you remove it for the moment - at least the netcdf-devel package?

Alain

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Wed Mar 23, 2011 2:22 am

I have tried the two suggestions you gave, but the "make" process interrupted at the same place as before! I think there are something wrong with the netcdf compilling, but i don't know how to fix it! Thinks!

Zidan
Attachments
config.log
This config.log is from the netcdf folder
(140.75 KiB) Downloaded 389 times

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: problem of make abinit6.6.1

Post by pouillon » Wed Mar 23, 2011 5:48 pm

If you have a NetCDF package already installed - or can install one, I suggest you to do so instead of trying to build it within Abinit. This will likely work much better.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Thu Mar 24, 2011 2:49 am

Yes, I have installed netcdf, and I try to install abinit again, with :
./configure --prefix=/vol5/home/simg/software/abinit/ FC=/vol5/home/simg/software/local/gcc-4.5.2/bin/gfortran CC=/vol5/home/simg/software/local/gcc-4.5.2/bin/gcc CXX=/vol5/home/simg/software/local/gcc-4.5.2/bin/g++ --with_netcdf_incs="-I/vol5/home/simg/software/library/netcdf/include" --with_netcdf_libs="-L/vol5/home/simg/software/library/netcdf/lib/netcdf -lnetcdf"
and the configure feedback message shows that the external netcdf doesn't work:
==============================================================================
=== Connectors / Fallbacks ===
==============================================================================

checking whether MPI is usable... no
checking whether to build MPI code... no
checking whether to activate GPU support... no
checking for the requested transferable I/O support... etsf_io
checking netcdf.h usability... yes
checking netcdf.h presence... yes
checking for netcdf.h... yes
checking for Fortran module includes... unknown
configure: error: external netcdf support does not work

How can I make it work? thanks!

Zidan

User avatar
Alain_Jacques
Posts: 279
Joined: Sat Aug 15, 2009 9:34 pm
Location: Université catholique de Louvain - Belgium

Re: problem of make abinit6.6.1

Post by Alain_Jacques » Thu Mar 24, 2011 10:53 am

Hello Zidan,

Question 1: do you have a RH installed netcdf package; check with rpm -qa as mentioned earlier. If yes, please report the name of the package - there are several sources of netcdf on RH distribution.

Question 2: Do you have a file named /vol5/home/simg/software/library/netcdf/lib/libnetcdff.* - * can be "a" (i.e. static) or "so. ..." (dynamic lib). You have to choose either to build a 32bit or 64bit Abinit and combine with the same kind of libraries i.e. mixing doesn't work. If yes, check with a "file libnetcdff.so" (adapt libnetcdff.so to your case) that it is a 64bit library. And if yes again, cleanup the build directory and change the relevant part in your configure options to --enable-64bit-flags --with_netcdf_libs="-L/vol5/home/simg/software/library/netcdf/lib/netcdf -lnetcdff -lnetcdf".

Kind regards,

Alain

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: problem of make abinit6.6.1

Post by pouillon » Thu Mar 24, 2011 11:40 am

Looks to me as if Abinit's configure is unable to find the "netcdf.mod" file. Just find where it is and call configure again adding the following at the end:

Code: Select all

CPPFLAGS_EXTRA="-I/path/of/netcdf_mod" FCFLAGS_EXTRA="-I/path/of/netcdf_mod"

This should solve your problem.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Thu Mar 24, 2011 12:23 pm

Alain_Jacques wrote:
Question 1: do you have a RH installed netcdf package; check with rpm -qa as mentioned earlier. If yes, please report the name of the package - there are several sources of netcdf on RH distribution.

Question 2: Do you have a file named /vol5/home/simg/software/library/netcdf/lib/libnetcdff.* - * can be "a" (i.e. static) or "so. ..." (dynamic lib). You have to choose either to build a 32bit or 64bit Abinit and combine with the same kind of libraries i.e. mixing doesn't work. If yes, check with a "file libnetcdff.so" (adapt libnetcdff.so to your case) that it is a 64bit library. And if yes again, cleanup the build directory and change the relevant part in your configure options to --enable-64bit-flags --with_netcdf_libs="-L/vol5/home/simg/software/library/netcdf/lib/netcdf -lnetcdff -lnetcdf".


Question 1: There is no RH installed netcdf package,when I print "rpm -qa |grep netcdf", nothing appeared on the screen.

Question 2: I do have the file you mentioned, and in that folder I can see these files: "libnetcdf.a libnetcdf_c++.a libnetcdf_c++.la libnetcdf.la pkgconfig".

I re-configure with:

Code: Select all

./configure --prefix=/vol5/home/simg/software/local/abinit/ FC=/vol5/home/simg/software/local/gcc-4.5.2/bin/gfortran CC=/vol5/home/simg/software/local/gcc-4.5.2/bin/gcc CXX=/vol5/home/simg/software/local/gcc-4.5.2/bin/g++ --enable-64bit-flags --with-netcdf-libs="-L/vol5/home/simg/software/library/netcdf/lib/netcdf -lnetcdf"


it's still doesn't work:
checking netcdf.h usability... yes
checking netcdf.h presence... yes
checking for netcdf.h... yes
checking for Fortran module includes... unknown
configure: error: external netcdf support does not work


I tried both in our lab cluster or in Tianjin Super Computational Center, The results are the same!
Last edited by zidan on Thu Mar 24, 2011 12:28 pm, edited 2 times in total.

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Thu Mar 24, 2011 12:26 pm

pouillon wrote:Looks to me as if Abinit's configure is unable to find the "netcdf.mod" file. Just find where it is and call configure again adding the following at the end:

Code: Select all

CPPFLAGS_EXTRA="-I/path/of/netcdf_mod" FCFLAGS_EXTRA="-I/path/of/netcdf_mod"



There is no file called "netcdf.mod" but do have other files named "netcdf.mk" or "netcdf.pc" or"netcdf.pc.in"

I can successfully install abinit with

Code: Select all

--with-dft-flavor=none --with-trio-flavor=none

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: problem of make abinit6.6.1

Post by pouillon » Thu Mar 24, 2011 5:09 pm

There is no file called "netcdf.mod" but do have other files named "netcdf.mk" or "netcdf.pc" or"netcdf.pc.in"


Of course, you won't find such a file inside the source tree of Abinit. If you installed NetCDF fully, there has to be a "netcdf.mod" file somewhere. You might find it using "rpm -q --filesbypkg".
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

zidan
Posts: 9
Joined: Tue Mar 22, 2011 1:07 pm

Re: problem of make abinit6.6.1

Post by zidan » Fri Mar 25, 2011 4:00 am

Dear Alain and Pouillon:
Thanks very much for your kindness help, finally I have successfully installed abinit package and it works well!
Kind regards!

Zidan

Locked