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
zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

problem of make abinit6.6.1

Post by zjuer » Thu Mar 17, 2011 1:08 am

Hi,
When I try to install on my computer(ubuntu 10.10,gfortran4.4 gcc4.4 g++4.4,openmpi1.4.3),some problems came up.
I installed openmpi at /home/pc/openmpi
and used export LD_LIBRARY_PATH=/home/pc/openmpi/lib
then used ./configure --enable-mpi --enable-64bit-flags --with-mpi-prefix=/home/pc/openmpi to configure
then sudo make,but errors came up:
configure: finding C compiler
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/pc/Downloads/abinit-6.6.1/plugins/netcdf/netcdf-4.1.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[4]: *** [configure-stamp] Error 1
make[4]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/netcdf'
make[3]: *** [package-ready] Error 2
make[3]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/netcdf'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pc/Downloads/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
(138.22 KiB) Downloaded 335 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 » Thu Mar 17, 2011 9:58 am

Hello Zjuer,

you seem to be in trouble to compile the netcdf plugin; the error message is somewhat misleading - it's not the main config.log that contains the relevant information but the one in plugins/netcdf/netcdf-4.1.1/config.log. Would you be so kind to save a copy of it and post here for inspection.

You have another option to compile Abinit with netcdf support: install Ubuntu netcdf package, reconfigure Abinit to detect it - and not to compile the "fallback"

So install the netcdf 4 devel, cleanup your Abinit tree and reconfigure with ...

Code: Select all

sudo apt-get install libnetcdf-dev
make distclean
configure ... the one you mentioned earlier
make

And don't forget to run the testsuite after if compilation is successful. If it fails, a copy of the main config.log, config.h and src/98_main/Makefile would help me to find out.

Kind regards,

Alain

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Thu Mar 17, 2011 3:24 pm

Hello Alain,
Thank you for your help. I have posted the plugins/netcdf/netcdf-4.1.1/config.log, please have a look at it. Thanks
I also tried
sudo apt-get install libnetcdf-dev
make distclean
configure ... the one you mentioned earlier
make, but something else came up,
mkdir tmp
cd etsf_io-1.0.3 && \
F77="/home/pc/openmpi/bin/mpif90 -m64" \
FFLAGS="-m64 -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse" \
F90="/home/pc/openmpi/bin/mpif90 -m64" \
F90FLAGS="-m64 -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse" \
FC="/home/pc/openmpi/bin/mpif90 -m64" \
FCFLAGS="-m64 -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse" \
./configure \
--prefix=/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io/tmp \
--with-moduledir=/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io/tmp/include \
--with-netcdf-module-path=`echo "-I/usr/include" | sed -e "s/-I//"` \
--with-netcdf-ldflags=`echo "-lnetcdff -lnetcdf" | sed -e "s/-lnetcdf//"` \

configure: error: unrecognized option: -lnetcdf
Try `./configure --help' for more information.
make[4]: *** [configure-stamp] Error 1
make[4]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make[3]: *** [package-ready] Error 2
make[3]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pc/Downloads/abinit-6.6.1'
make: *** [all] Error 2
The main config.log, config.h and src/98_main/Makefile are enclosed.

Best regards,

zjuer
Attachments
config.log
(17.54 KiB) Downloaded 317 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 » Thu Mar 17, 2011 9:44 pm

Hmmm ... tiny bug, it will be corrected in 6.6.2

Meanwhile, you can apply the following patch to the <root>/plugins/etsf_io/etsf_io.mk file

Code: Select all

=== modified file plugins/etsf_io/etsf_io.mk
--- plugins/etsf_io/etsf_io.mk   2010-09-04 11:11:20 +0000
+++ plugins/etsf_io/etsf_io.mk   2011-03-17 20:29:16 +0000
@@ -36,7 +36,7 @@
      --prefix=$(PWD)/tmp \
      --with-moduledir=$(PWD)/tmp/include \
      --with-netcdf-module-path=`echo "$(lib_netcdf_incs)" | sed -e "s/-I//"` \
-     --with-netcdf-ldflags=`echo "$(lib_netcdf_libs)" | sed -e "s/-lnetcdf//"` \
+     --with-netcdf-ldflags=`echo "$(lib_netcdf_libs)" | sed -e "s/-lnetcdf[f_]*//g"` \
      $(CFGFLAGS_ETSF_IO)
    touch configure-stamp

After that, you can go on with the make but as you're close to the beginning of the compilation, it's probably advisable to clean, reconfigure and make again.

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 17, 2011 10:27 pm

@Alain: a "make clean" in plugins/etsf_io/ will be enough in this case.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Thu Mar 17, 2011 11:16 pm

Hello Alain,
I don't know how to use your patch correctly. I tried to add your patch at the end of etsf_io.mk, the entire etsf_io.mk is attached, but it does not work, and some new problems show up. Could you give me a hand? Thanks.

Best regards,

zjuer

make[4]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/linalg'
if test -d tmp ; then find tmp -type f -exec mv {} . \; ; rm -rf tmp ; fi
make[3]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/linalg'
Making all in etsf_io
make[3]: Entering directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make -f ../../plugins/etsf_io/etsf_io.mk
make[4]: Entering directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
../../plugins/etsf_io/etsf_io.mk:54: *** target pattern contains no `%'. Stop.
make[4]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make[3]: *** [package-ready] Error 2
make[3]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pc/Downloads/abinit-6.6.1'
make: *** [all] Error 2
Attachments
etsf_iomk.log
(1.77 KiB) Downloaded 359 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 » Fri Mar 18, 2011 12:22 am

Save the patch to a file, let's say etsf_io.patch, and do the following:

Code: Select all

cd <abinit_top_source_dir>
patch -p0 < /path/to/etsf_io.patch
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Fri Mar 18, 2011 2:43 pm

Hello pouillon,
Thanks for your help. When I try to patch according to your suggestion some problems appear. Could you tell me how to deal with the problem? Thank you.

pc@uiuc:~/Downloads/abinit-6.6.1$ patch -p0 < new.patch
patching file plugins/etsf_io/etsf_io.mk
Hunk #1 FAILED at 36.
1 out of 1 hunk FAILED -- saving rejects to file plugins/etsf_io/etsf_io.mk.rej


new.patch:
=== modified file plugins/etsf_io/etsf_io.mk
--- plugins/etsf_io/etsf_io.mk 2010-09-04 11:11:20 +0000
+++ plugins/etsf_io/etsf_io.mk 2011-03-17 20:29:16 +0000
@@ -36,7 +36,7 @@
--prefix=$(PWD)/tmp \
--with-moduledir=$(PWD)/tmp/include \
--with-netcdf-module-path=`echo "$(lib_netcdf_incs)" | sed -e "s/-I//"` \
- --with-netcdf-ldflags=`echo "$(lib_netcdf_libs)" | sed -e "s/-lnetcdf//"` \
+ --with-netcdf-ldflags=`echo "$(lib_netcdf_libs)" | sed -e "s/-lnetcdf[f_]*//g"` \
$(CFGFLAGS_ETSF_IO)
touch configure-stamp

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 » Fri Mar 18, 2011 5:12 pm

Hello Zjuer,

Assuming that you're still working in the same directory structure as before ...

Code: Select all

cd /home/pc/Downloads/abinit-6.6.1/plugins/etsf_io
then edit etsf_io.mk to change the end of 39th line from

Code: Select all

sed -e "s/-lnetcdf//"` \
to

Code: Select all

sed -e "s/-lnetcdf[f_]*//g"` \


Alain

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Fri Mar 18, 2011 7:21 pm

Hello Alain and Pouillon,
Thank you two wery much. The compilation is successful now.

Best regards.

Zjuer

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Mon Mar 21, 2011 10:49 pm

Hello Alain and Pouillon,
I am sorry to trouble you again. Today I try to recompile abinit6.6.1 in order to change the installation directory. But I failed. Then I reinstalled the operating system and tried again and I got the error information which is similar with last time. Since I have changed the etsf_io.mk file as before, I can not find out what is wrong this time. The config.log inetsf_io-1.0.3 is enclosed. Could you have a look at this problem? Thanks.

Best regards,

Zjuer

cd etsf_io-1.0.3 && \
F77="/home/pc/openmpi/bin/mpif90 -m64" \
FFLAGS="-m64 -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse" \
F90="/home/pc/openmpi/bin/mpif90 -m64" \
F90FLAGS="-m64 -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse" \
FC="/home/pc/openmpi/bin/mpif90 -m64" \
FCFLAGS="-m64 -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse" \
./configure \
--prefix=/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io/tmp \
--with-moduledir=/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io/tmp/include \
--with-netcdf-module-path=`echo "-I/usr/include" | sed -e "s/-I//"` \
--with-netcdf-ldflags=`echo "-lnetcdff -lnetcdf" | sed -e "s/-lnetcdf[f_]*//g"` \

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for Fortran compiler default output file name... a.out
checking whether the Fortran compiler works... configure: error: cannot run Fortran compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[4]: *** [configure-stamp] Error 1
make[4]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make[3]: *** [package-ready] Error 2
make[3]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins/etsf_io'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/pc/Downloads/abinit-6.6.1/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/pc/Downloads/abinit-6.6.1'
make: *** [all] Error 2
Attachments
config.log
(7.24 KiB) Downloaded 324 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 » Mon Mar 21, 2011 11:04 pm

In the enclosed config.log:
configure:2433: checking whether the Fortran compiler works
configure:2443: ./a.out
./a.out: error while loading shared libraries: libmpi_f90.so.0: cannot open shared object file: No such file or directory
configure:2446: $? = 127
configure:2455: error: cannot run Fortran compiled programs.

i.e. a program - a.out - compiled with mpif90 cannot be executed because the libmpi_f90.so dynamic library cannot be found. Very probably because the LD_LIBRARY_PATH doesn't contain the path to your openmpi libraries. Use

Code: Select all

export LD_LIBRARY_PATH=/xxx:$LD_LIBRARY_PATH
where /xxx point to the directory of your openmpi libs

Kind regards,

Alain

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Tue Mar 22, 2011 12:30 am

Hello Alain,
I have rechecked the problem of LD_LIBRARY_PATH, and verified with echo${LD_LIBRARY_PATH}, but the problem is still the same.

Best regards,

Zjuer

zjuer
Posts: 42
Joined: Thu Feb 17, 2011 2:05 am

Re: problem of make abinit6.6.1

Post by zjuer » Tue Mar 22, 2011 5:41 pm

Hello Alain,
It works again after use --with-dft-flavor="none" to configure and make it. Thank you.

Best regards,

Zjuer

Locked