Page 1 of 1
problem of make abinit6.6.1
Posted: Thu Mar 17, 2011 1:08 am
by zjuer
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
Re: problem of make abinit6.6.1
Posted: Thu Mar 17, 2011 9:58 am
by Alain_Jacques
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
Re: problem of make abinit6.6.1
Posted: Thu Mar 17, 2011 3:24 pm
by zjuer
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
Re: problem of make abinit6.6.1
Posted: Thu Mar 17, 2011 9:44 pm
by Alain_Jacques
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
Re: problem of make abinit6.6.1
Posted: Thu Mar 17, 2011 10:27 pm
by pouillon
@Alain: a "make clean" in plugins/etsf_io/ will be enough in this case.
Re: problem of make abinit6.6.1
Posted: Thu Mar 17, 2011 11:16 pm
by zjuer
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
Re: problem of make abinit6.6.1
Posted: Fri Mar 18, 2011 12:22 am
by pouillon
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
Re: problem of make abinit6.6.1
Posted: Fri Mar 18, 2011 2:43 pm
by zjuer
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
Re: problem of make abinit6.6.1
Posted: Fri Mar 18, 2011 5:12 pm
by Alain_Jacques
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
to
Alain
Re: problem of make abinit6.6.1
Posted: Fri Mar 18, 2011 7:21 pm
by zjuer
Hello Alain and Pouillon,
Thank you two wery much. The compilation is successful now.
Best regards.
Zjuer
Re: problem of make abinit6.6.1
Posted: Mon Mar 21, 2011 10:49 pm
by zjuer
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
Re: problem of make abinit6.6.1
Posted: Mon Mar 21, 2011 11:04 pm
by Alain_Jacques
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
Re: problem of make abinit6.6.1
Posted: Tue Mar 22, 2011 12:30 am
by zjuer
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
Re: problem of make abinit6.6.1
Posted: Tue Mar 22, 2011 5:41 pm
by zjuer
Hello Alain,
It works again after use --with-dft-flavor="none" to configure and make it. Thank you.
Best regards,
Zjuer