Page 1 of 1

Compilation problem in 6.5

Posted: Thu Sep 16, 2010 11:46 pm
by aromero
Hey guys, after downloading the 6.5 version in my mac, I did try to compile as usual before I include anything new, but this time
it did not go to far..

i am gettin the message:


ifort -O3 -byte_kinds -free -c diolib.f
ifort: command line warning #10006: ignoring unknown option '-byte_kinds'
diolib.f(13): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [PRECLIB]
USE preclib
----------^
diolib.f(14): error #6683: A kind type parameter must be a compile-time constant. [Q]


Is there anything wrong with the Makefile?

thanks!!

Re: Compilation problem in 6.5

Posted: Fri Sep 17, 2010 12:14 pm
by pouillon
Which version of ifort are you using?

Please attach config.dump as well.

Re: Compilation problem in 6.5

Posted: Fri Sep 17, 2010 4:23 pm
by aromero
Dear Yann

here it is....hope it is something silly

thanks!

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 12:32 pm
by pouillon
Where?

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 2:40 pm
by aromero
Dear Yann


it seems it can not upload the file.. here I am copying it directly:

Code: Select all

# Environment variables
ABI_CPPFLAGS="-I/sw/include"
AR="ar"
ARFLAGS="     rc"
ARFLAGS_64BITS=""
ARFLAGS_CMD="rc"
ARFLAGS_DEBUG=""
ARFLAGS_EXTRA=""
ARFLAGS_HINTS=""
ARFLAGS_OPT=""
CC="gcc"
CC_LDFLAGS="    "
CC_LDFLAGS_64BITS=""
CC_LDFLAGS_DEBUG=""
CC_LDFLAGS_EXTRA=""
CC_LDFLAGS_GPU=""
CC_LDFLAGS_HINTS=""
CC_LDFLAGS_OPT=""
CC_LIBS="    "
CC_LIBS_64BITS=""
CC_LIBS_DEBUG=""
CC_LIBS_EXTRA=""
CC_LIBS_GPU=""
CC_LIBS_HINTS=""
CC_LIBS_OPT=""
CFLAGS="-I/sw/include"
CFLAGS_64BITS=""
CFLAGS_DEBUG=""
CFLAGS_EXTRA=""
CFLAGS_GPU=""
CFLAGS_HINTS=""
CFLAGS_OPT=""
CPP="gcc -E"
CPPFLAGS=""
CPPFLAGS_64BITS=""
CPPFLAGS_DEBUG=""
CPPFLAGS_EXTRA=""
CPPFLAGS_GPU=""
CPPFLAGS_HINTS=""
CPPFLAGS_OPT=""
CXX="g++"
CXXFLAGS="-I/sw/include"
CXXFLAGS_64BITS=""
CXXFLAGS_DEBUG=""
CXXFLAGS_EXTRA=""
CXXFLAGS_GPU=""
CXXFLAGS_HINTS=""
CXXFLAGS_OPT=""
CXX_LDFLAGS="    "
CXX_LDFLAGS_64BITS=""
CXX_LDFLAGS_DEBUG=""
CXX_LDFLAGS_EXTRA=""
CXX_LDFLAGS_GPU=""
CXX_LDFLAGS_HINTS=""
CXX_LDFLAGS_OPT=""
CXX_LIBS="    "
CXX_LIBS_64BITS=""
CXX_LIBS_DEBUG=""
CXX_LIBS_EXTRA=""
CXX_LIBS_GPU=""
CXX_LIBS_HINTS=""
CXX_LIBS_OPT=""
DEFS="-DHAVE_CONFIG_H"
FC="gfortran"
FCFLAGS=" -g -ffree-line-length-none "
FCFLAGS_64BITS=""
FCFLAGS_DEBUG="-g"
FCFLAGS_EXTRA=""
FCFLAGS_FIXEDFORM="-ffixed-form"
FCFLAGS_FREEFORM="-ffree-form"
FCFLAGS_HINTS="-ffree-line-length-none"
FCFLAGS_MODDIR="-J$(abinit_moddir)"
FCFLAGS_OPT="-O2"
FC_LDFLAGS="    "
FC_LDFLAGS_64BITS=""
FC_LDFLAGS_DEBUG=""
FC_LDFLAGS_EXTRA=""
FC_LDFLAGS_HINTS=""
FC_LDFLAGS_OPT=""
FC_LIBS="    "
FC_LIBS_64BITS=""
FC_LIBS_DEBUG=""
FC_LIBS_EXTRA=""
FC_LIBS_HINTS=""
FC_LIBS_OPT=""
FPP=""
FPPFLAGS="    "
FPPFLAGS_DEBUG=""
FPPFLAGS_EXTRA=""
FPPFLAGS_HINTS=""
FPPFLAGS_OPT=""
LTXFLAGS=""
MDFLAGS=""
MPI_RUNNER=""
NVCC=""
NVCC_CFLAGS=""
NVCC_CPPFLAGS=""
NVCC_LDFLAGS=""
NVCC_LIBS=""
PDFFLAGS=""
SERIAL_RUNNER=""
XPP=""
XPPFLAGS="    "
XPPFLAGS_EXTRA=""

# Command-line options
enable_64bit_flags="no"
enable_all_plugins=""
enable_bigdft="yes"
enable_bindings="no"
enable_bse_unpacked="no"
enable_cclock="no"
enable_clib="no"
enable_config_file="yes"
enable_debug="yes"
enable_dft="no"
enable_etsf_io="yes"
enable_exports="no"
enable_fast_check="no"
enable_fc_wrapper="no"
enable_fft="no"
enable_fox="no"
enable_gpu="no"
enable_gw_cutoff="no"
enable_gw_dpc="no"
enable_gw_optimal="no"
enable_gw_wrapper="no"
enable_hints="yes"
enable_libxc="yes"
enable_linalg="yes"
enable_macroave="yes"
enable_maintainer_checks="no"
enable_math="no"
enable_mpi="no"
enable_mpi_io="no"
enable_mpi_io_test="no"
enable_mpi_trace="no"
enable_netcdf="yes"
enable_optim="standard"
enable_scalapack="no"
enable_smp="no"
enable_stdin="yes"
enable_test_timeout="no"
enable_timer="no"
enable_trio="no"
enable_vdwxc="no"
enable_wannier90="yes"
with_bigdft_includes=""
with_bigdft_libs=""
with_config_file=""
with_dft_flavor="bigdft+libxc+wannier90"
with_dft_includes=""
with_dft_libs=""
with_etsf_io_includes=""
with_etsf_io_libs=""
with_fc_vendor=""
with_fc_version=""
with_fft_flavor="fftw3"
with_fft_includes=""
with_fft_libs=""
with_fox_includes=""
with_fox_libs=""
with_gpu_cflags=""
with_gpu_cppflags=""
with_gpu_flavor="cuda-single"
with_gpu_includes=""
with_gpu_ldflags=""
with_gpu_libs=""
with_gpu_prefix=""
with_libxc_includes=""
with_libxc_libs=""
with_linalg_flavor="netlib"
with_linalg_includes=""
with_linalg_libs=""
with_math_flavor="gsl"
with_math_includes=""
with_math_libs=""
with_mpi_includes=""
with_mpi_level=""
with_mpi_libs=""
with_mpi_prefix=""
with_netcdf_includes=""
with_netcdf_libs=""
with_plugins_prefix=""
with_plugins_tardir=""
with_test_timeout="0"
with_timer_flavor="abinit"
with_timer_includes=""
with_timer_libs=""
with_trio_flavor="fox+etsf"
with_trio_includes=""
with_trio_libs=""
with_wannier90=""
with_wannier90_includes=""
with_wannier90_libs=""

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 4:03 pm
by Alain_Jacques
Hello Aldo, Yann ...

"i am gettin the message:
ifort -O3 -byte_kinds -free -c diolib.f"

and

FC="gfortran"


Sound fishy to me :-)

Alain

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 4:28 pm
by aromero
I did a make clean and configure again and now the problem did appears in


mv -f .deps/xc_f.Tpo .deps/xc_f.Po
gfortran -ffree-form -g -ffree-line-length-none -O2 -c -o libxc_funcs.o libxc_funcs.f90
cpp ./libxc_master.F90 > ../src/libxc.f90
gfortran -ffree-form -g -ffree-line-length-none -O2 -c -o libxc.o libxc.f90
./libxc_master.F90:28:

module xc_f90_ ## types_m
1
Error: Declaración inclasificable en (1)
./libxc_master.F90:32.17:

integer, public, parameter :: xc_f90_kind = selected_real_kind(14)
1
Error: No se permite el atributo PUBLIC en (1) fuera de la parte de especificación de un módulo
./libxc_master.F90:35.2:


Sorry for the spanish.. my mac decided by default to use spanish messaging.

Thanks again...

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 6:07 pm
by Alain_Jacques
Aldo,

I think you use Fink gfortran ... right? If it is your case, it's advisable to mix the same versions of gfortran, gcc and cpp to compile abinit. Fink names the gnu fortran "gfortran" but the corresponding gnu C is "gcc-4" and gnu CPP is "cpp-4". If you do a "which cpp", I bet /usr/bin/cpp is returned - but not the one in /sw/bin/ ... right? So during the abinit compilation, Apple's cpp is invoked - and it is an oldtimer - not Fink cpp.

I suggest first to try to redo the offending line "by hand" using Fink cpp-4: go where the libxc_master.F90 file resides (should be somewhere in plugins/libxc/libxc-svn-r6071-fixed/src), do a "cpp-4 ./libxc_master.F90 > ../src/libxc.f90" and see if it still complains with Fink cpp-4.
If it runs fine, I would suggest to cleanup everything and redo a proper configure of abinit with CC=/sw/bin/gcc-4 and CPP=/sw/bin/cpp-4 to be sure to pick up the right compiler.

Alain

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 7:50 pm
by pouillon
The problem comes from the build system not detecting ifort properly, after which it applies the flags for gfortran. In such a situation, it is normal that modules aren't found.

I'm on it, and I'll let you know when I've solved the problem.

Re: Compilation problem in 6.5

Posted: Mon Sep 20, 2010 10:43 pm
by jolafc
I did manage to compile abinit 6.5.0 on OS X 10.6.4 using the GNU compilers (gcc, g++, gfortran) version 4.2 and openmpi 1.4.2 as installed with macports.

In short, here is the recipe that works for me :
1) Install macports (package available here : http://www.macports.org/install.php)
2) In a shell, run :

Code: Select all

sudo port install openmpi

3) Use the attached .ac file to compile abinit (I added the .log extension just to make the forum let me upload it)

Note : Building netcdf and libxc plugins failed in abinit 6.2.2 with this setup and I didn't test them in abinit 6.5.0, so they are still deactivated in the .ac file attached here.

Let us know if it solves your problem...

Re: Compilation problem in 6.5

Posted: Tue Sep 21, 2010 10:03 pm
by aromero
Thanks for all replies. I was able to compile abinit 6.5 in my mac but excluding libxc. I will try to find out what is the problem but it is not related to find
the modules.

regards

Re: Compilation problem in 6.5  [SOLVED]

Posted: Fri Sep 24, 2010 6:56 pm
by pouillon
I partly solved the issues encountered with ifort. Part of the problem can come from the CC, CXX, and FC, variables set in the environment before runing configure. The build system is designed so that the environment variables always override the config file. Until now, this was done silently, and I changed this in my 6.4.0 branch: from now on, overrides will be brought to the attention of the user at the top of the output of configure.

I now need to find out why ifort is not recognized anymore. In the meantime, you can force the detection of ifort by using the --with-fc-vendor=intel and --with-fc-version=<your_version> options of configure.