Compile abinit-7.6.3 with levmar library  [SOLVED]

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
thanusit
Posts: 70
Joined: Thu Jan 14, 2010 4:20 am

Compile abinit-7.6.3 with levmar library

Post by thanusit » Tue May 06, 2014 9:11 am

Dear all
I'm trying to compile abinit-7.6.3 with the supporting levmar library on Rock_clusters-6.1.1/centos6.5/linux_x86_64. The compilers are as follows.
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
$ gfortran --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
$ mpicc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
$ mpif90 --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
$ mpirun --version
mpirun (Open MPI) 1.6.2

In the configure step, I used

$ ../abinit-7.6.3/configure --with-config-file=./build.ac --prefix=/export/home/thanusit/apps/gcc-4.4.7/abinit/7.6.3_try_levmar.

The details of build.ac is listed below. The configure passed (config.log is attached) but make failed with the error:

../../src/70_gw/lib70_gw.a(m_model_screening.o): In function `__m_model_screening_MOD_sequential_fitting':
/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src/70_gw/../../../abinit-7.6.3/src/70_gw/m_model_screening.F90:479: undefined reference to `dfit_re_and_im_screening_'
collect2: ld returned 1 exit status.
(please see ==make's errors== below for more detais).

However, if with_algo_flavor="levmar" and the associating "with_algo_incs" and "with_algo_libs" flags were commented out, the make was succesful. This suggests that the other libraries are good and that the error has something to do with the attemp to use the levmar library. The levmar libray was installed via rpm using:levmar-devel-2.5-8.fc19.x86_64.rpm and levmar-2.5-8.fc19.x86_64.rpm.

I dont know what I'm missing. Is the installed levmar library the right one for abinit? Is the gcc too old? Any suggestion would be greatly appreciated.

Best Regards,
Thanusit

==vi build.ac==
#enable_fallbacks="no"
enable_exports="yes"
enable_pkg_check="yes"
enable_64bit_flags="yes"
enable_gw_dpc="yes"
enable_mpi="yes"
enable_mpi_io="yes"
with_mpi_prefix="/opt/openmpi"
with_trio_flavor="netcdf+etsf_io+fox"
with_netcdf_incs="-I/usr/include -I/usr/lib64/gfortran/modules"
with_netcdf_libs="-L/usr/lib64 -lnetcdf -lnetcdff"
with_fft_flavor="fftw3"
with_fft_incs="-I/usr/include"
with_fft_libs="-L/usr/lib64 -lfftw3 -lfftw3f"
with_linalg_flavor="atlas"
with_linalg_incs="-I/usr/include"
with_linalg_libs="-L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas"
with_algo_flavor="levmar"
with_algo_incs="-I/usr/include"
with_algo_libs="-L/usr/lib64 -llevmar"
with_math_flavor="gsl"
with_math_incs="-I/usr/include"
with_math_libs="-L/usr/lib64 -lgsl -lgslcblas -lm"
with_dft_flavor="atompaw+bigdft+libxc+wannier90"
========================================================

===make's errors====
...
Making all in 98_main
make[3]: Entering directory `/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src/98_main'
/opt/openmpi/bin/mpif90 -m64 -DHAVE_CONFIG_H -I. -I../../../abinit-7.6.3/src/98_main -I../.. -I../../src/incs -I../../../abinit-7.6.3/src/incs -I/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/include -I/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/include -I/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/include -I/usr/include -I/usr/lib64/gfortran/modules -I/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/include -I/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -ffree-form -J/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src/mods -O2 -mtune=native -march=native -m64 -g -ffree-line-length-none -fPIC -m64 -g -ffree-line-length-none -fPIC -c -o abinit-abinit.o `test -f 'abinit.F90' || echo '../../../abinit-7.6.3/src/98_main/'`abinit.F90
/opt/openmpi/bin/mpif90 -m64 -ffree-form -J/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src/mods -O2 -mtune=native -march=native -m64 -g -ffree-line-length-none -fPIC -m64 -g -ffree-line-length-none -fPIC -o abinit abinit-abinit.o ../../src/95_drive/lib95_drive.a ../../src/79_seqpar_mpi/lib79_seqpar_mpi.a ../../src/77_ddb/lib77_ddb.a ../../src/77_suscep/lib77_suscep.a ../../src/72_response/lib72_response.a ../../src/71_bse/lib71_bse.a ../../src/70_gw/lib70_gw.a ../../src/69_wfdesc/lib69_wfdesc.a ../../src/68_dmft/lib68_dmft.a ../../src/68_recursion/lib68_recursion.a ../../src/68_rsprc/lib68_rsprc.a ../../src/67_common/lib67_common.a ../../src/66_paw/lib66_paw.a ../../src/66_wfs/lib66_wfs.a ../../src/65_psp/lib65_psp.a ../../src/65_nonlocal/lib65_nonlocal.a ../../src/64_atompaw/lib64_atompaw.a ../../src/62_occeig/lib62_occeig.a ../../src/62_iowfdenpot/lib62_iowfdenpot.a ../../src/62_wvl_wfs/lib62_wvl_wfs.a ../../src/62_poisson/lib62_poisson.a ../../src/62_cg_noabirule/lib62_cg_noabirule.a ../../src/62_ctqmc/lib62_ctqmc.a ../../src/61_ionetcdf/lib61_ionetcdf.a ../../src/57_iovars/lib57_iovars.a ../../src/57_iopsp_parser/lib57_iopsp_parser.a ../../src/56_recipspace/lib56_recipspace.a ../../src/56_xc/lib56_xc.a ../../src/56_mixing/lib56_mixing.a ../../src/56_io_mpi/lib56_io_mpi.a ../../src/53_abiutil/lib53_abiutil.a ../../src/53_spacepar/lib53_spacepar.a ../../src/53_ffts/lib53_ffts.a ../../src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a ../../src/51_manage_mpi/lib51_manage_mpi.a ../../src/49_gw_toolbox_oop/lib49_gw_toolbox_oop.a ../../src/47_xml/lib47_xml.a ../../src/45_geomoptim/lib45_geomoptim.a ../../src/44_abitypes_defs/lib44_abitypes_defs.a ../../src/43_wvl_wrappers/lib43_wvl_wrappers.a ../../src/43_ptgroups/lib43_ptgroups.a ../../src/42_parser/lib42_parser.a ../../src/42_nlstrain/lib42_nlstrain.a ../../src/42_libpaw/lib42_libpaw.a ../../src/41_xc_lowlevel/lib41_xc_lowlevel.a ../../src/41_geometry/lib41_geometry.a ../../src/32_util/lib32_util.a ../../src/28_numeric_noabirule/lib28_numeric_noabirule.a ../../src/27_toolbox_oop/lib27_toolbox_oop.a ../../src/21_psiesta_noabirule/lib21_psiesta_noabirule.a ../../src/18_timing/lib18_timing.a ../../src/16_hideleave/lib16_hideleave.a ../../src/14_hidewrite/lib14_hidewrite.a ../../src/12_hide_mpi/lib12_hide_mpi.a ../../src/11_qespresso_ext/lib11_qespresso_ext.a ../../src/11_memory_mpi/lib11_memory_mpi.a ../../src/10_defs/lib10_defs.a ../../src/01_linalg_ext/lib01_linalg_ext.a ../../src/01_interfaces_ext/lib01_interfaces_ext.a ../../src/01_gsl_ext/lib01_gsl_ext.a -L/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/lib -lwannier90 -L/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/lib -lbigdft -ldft_common -labinit -L/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/lib -letsf_io_low_level -letsf_io_utils -letsf_io -L/usr/lib64 -lnetcdf -lnetcdff -L/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/lib -lxc -L/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/fallbacks/exports/lib -lFoX_sax -lFoX_utils -lFoX_fsys -lFoX_common -L/usr/lib64 -lfftw3 -lfftw3f -L/usr/lib64 -lgsl -lgslcblas -lm -L/usr/lib64 -llevmar -L/usr/lib64/atlas -llapack -lf77blas -lcblas -latlas -lrt -L/opt/openmpi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.. -lmpi_f90 -lmpi_f77 -lmpi -libverbs -ldat -lrt -lnsl -lutil -lgfortranbegin -lgfortran -lm -ldl -lpthread -L/opt/openmpi/lib -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.. -lmpi_f90 -lmpi_f77 -lmpi -libverbs -ldat -lrt -lnsl -lutil -lgfortranbegin -lgfortran -lm -ldl -lpthread
../../src/70_gw/lib70_gw.a(m_model_screening.o): In function `__m_model_screening_MOD_sequential_fitting':
/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src/70_gw/../../../abinit-7.6.3/src/70_gw/m_model_screening.F90:479: undefined reference to `dfit_re_and_im_screening_'
collect2: ld returned 1 exit status
make[3]: *** [abinit] Error 1
make[3]: Leaving directory `/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src/98_main'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/state/partition1/home/thanusit/src_build/abinit-7.6.3_build_dir_gcc-4.4.7_try_levmar'
make: *** [all] Error 2
=============================================================================
Attachments
config.log
(159.25 KiB) Downloaded 306 times

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Compile abinit-7.6.3 with levmar library

Post by jbeuken » Tue May 06, 2014 9:40 pm

hi,

you must add in your build.ac file :


Code: Select all

enable_clib="yes"


jmb
------
Jean-Michel Beuken
Computer Scientist

thanusit
Posts: 70
Joined: Thu Jan 14, 2010 4:20 am

Re: Compile abinit-7.6.3 with levmar library  [SOLVED]

Post by thanusit » Wed May 07, 2014 6:47 pm

Dear jmb
Thank you for your suggestion. The flag enable_clib="yes" did fix the above error. However, make still got a hiccup with another error:
------------------------------------------------------------------------------------
../../../abinit-7.6.3/src/98_main/mrgscr.F90:2313.15:

if (is_scr/=.true.) then
1
Error: Logicals at (1) must be compared with .neqv. instead of /=
make[3]: *** [mrgscr-mrgscr.o] Error 1.
------------------------------------------------------------------------------------

As suggested in the error messege, I tried to fix this new error by making a slight modification to ../src/98_main/mrgscr.F90, e.g.
by replacing "if (is_scr/=.true.) then" with "if (is_scr.neqv..true.) then", and the trick worked. "make" was successful. "make tests" were all succesful and "./runtests.py fast" gave:
---------------------------------------------------------------------------------------------------
Test suite completed in 27.24 s (average time for test = 2.35 s, stdev = 2.20 s)
failed: 0, succeeded: 10, passed: 1, skipped: 0, disabled: 0
Suite failed passed succeeded skipped disabled run_etime tot_etime
fast 0 1 10 0 0 25.81 26.89
--------------------------------------------------------------------------------------------------

I'm no developer but hope that is a proper way of resolving it.

Best regards,
Thanusit

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Compile abinit-7.6.3 with levmar library

Post by jbeuken » Wed May 07, 2014 7:48 pm

sorry Thanusit,

I had the same problem and I forgot to mention it on my last post !
the suggestion is correct : fix on the development branch…

jmb
------
Jean-Michel Beuken
Computer Scientist

Locked