abinit-6.10.3 error message with make command

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.
nikhilsd
Posts: 1
Joined: Sun Jan 29, 2012 11:03 pm

abinit-6.10.3 error message with make command

Post by nikhilsd » Sun Jan 29, 2012 11:13 pm

After using ./configure CC=/usr/local/gfortran/bin/gcc , I got the output

Code: Select all

Summary of important options:

  * C compiler      : gnu version 4.6
  * Fortran compiler: gnu version 4.6
  * architecture    :   ( bits)

  * debugging       : basic
  * optimizations   : standard

  * MPI    enabled  : no
  * MPI-IO enabled  : no
  * GPU    enabled  : no (none)

  * TRIO   flavor = netcdf-fallback+etsf_io-fallback
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = netlib (libs: auto-detected)
  * FFT    flavor = none (libs: ignored)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

Configuration complete.
You may now type "make" to build ABINIT.
(or, on a SMP machine, "make mj4", or "make multi multi_nprocs=<n>")

[b]When I did "make", this was the message I got:[/b]

make  all-recursive
Making all in plugins
Making all in netcdf
make[3]: Nothing to be done for `all'.
Making all in etsf_io
make[3]: Nothing to be done for `all'.
Making all in libxc
make -f ../../plugins/libxc/libxc.mk
libxc-1.0 has been uncompressed.
touch patches-stamp
libxc-1.0 has been patched.
cd libxc-1.0 && \
    CPP="/usr/local/gfortran/bin/gcc -E" \
    CPPFLAGS="" \
    CC="/usr/local/gfortran/bin/gcc" \
    CFLAGS="-g -O2 -mtune=native -march=native -mfpmath=sse  " \
    FCCPP="cpp " \
    FC="/usr/local/gfortran/bin/gfortran" \
    FCLIBS="" \
    LIBS="" \
    FCFLAGS="-ffree-form -g -ffree-line-length-none  -O2 -mtune=native -march=native -mfpmath=sse" \
    ./configure \
     --prefix="/Users/nikhilsivadas/Downloads/abinit-6.10.3/plugins/libxc/tmp" \
     --enable-fortran --disable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking build system type... i386-apple-darwin10.6.0
checking host system type... i386-apple-darwin10.6.0
checking for style of include used by make... GNU
checking for gcc... /usr/local/gfortran/bin/gcc
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... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/gfortran/bin/gcc accepts -g... yes
checking for /usr/local/gfortran/bin/gcc option to accept ISO C89... none needed
checking dependency style of /usr/local/gfortran/bin/gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /usr/local/gfortran/bin/gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... rm: conftest.dSYM: is a directory
BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from /usr/local/gfortran/bin/gcc object... rm: conftest.dSYM: is a directory
ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor... /usr/local/gfortran/bin/gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /usr/local/gfortran/bin/gcc supports -fno-rtti -fno-exceptions... no
checking for /usr/local/gfortran/bin/gcc option to produce PIC... -fno-common -DPIC
checking if /usr/local/gfortran/bin/gcc PIC flag -fno-common -DPIC works... yes
checking if /usr/local/gfortran/bin/gcc static flag -static works... no
checking if /usr/local/gfortran/bin/gcc supports -c -o file.o... yes
checking if /usr/local/gfortran/bin/gcc supports -c -o file.o... (cached) yes
checking whether the /usr/local/gfortran/bin/gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc... (cached) /usr/local/gfortran/bin/gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/local/gfortran/bin/gcc accepts -g... (cached) yes
checking for /usr/local/gfortran/bin/gcc option to accept ISO C89... (cached) none needed
checking dependency style of /usr/local/gfortran/bin/gcc... (cached) gcc3
checking whether /usr/local/gfortran/bin/gcc and cc understand -c and -o together... yes
checking for inline... inline
checking for ANSI C header files... (cached) yes
checking for working alloca.h... yes
checking for alloca... yes
checking size of void*... 4
checking whether we are using the GNU Fortran compiler... yes
checking whether /usr/local/gfortran/bin/gfortran accepts -g... yes
checking whether we are using the GNU Fortran compiler... (cached) yes
checking whether /usr/local/gfortran/bin/gfortran accepts -g... (cached) yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for /usr/local/gfortran/bin/gfortran option to produce PIC... -fno-common
checking if /usr/local/gfortran/bin/gfortran PIC flag -fno-common works... yes
checking if /usr/local/gfortran/bin/gfortran static flag -static works... no
checking if /usr/local/gfortran/bin/gfortran supports -c -o file.o... yes
checking if /usr/local/gfortran/bin/gfortran supports -c -o file.o... (cached) yes
checking whether the /usr/local/gfortran/bin/gfortran linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin10.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking for Fortran flag to compile .f90 files... none
configure: Using FCFLAGS="-ffree-form -g -ffree-line-length-none  -O2 -mtune=native -march=native -mfpmath=sse"
checking how to get verbose linking output from /usr/local/gfortran/bin/gfortran... -v
checking for Fortran libraries of /usr/local/gfortran/bin/gfortran...  -L/usr/local/gfortran/lib/gcc/i686-apple-darwin10/4.6.1 -L/usr/local/gfortran/lib/gcc/i686-apple-darwin10/4.6.1/../../.. -lgfortran -lquadmath -lm
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking whether the compiler accepts very long lines... yes
checking whether the compiler accepts "line-number" lines cast by the preprocessor... yes
checking fortran 90 modules extension... mod
checking for the size of a Fortran integer... rm: intsizetest.x.dSYM: is a directory
4 bytes
checking for which C type corresponds to Fortran integer... rm: ccfortranint.x.dSYM: is a directory
int
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating testsuite/Makefile
config.status: creating build/Makefile
config.status: creating build/libxc.pc
config.status: creating build/libxc.spec
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
touch configure-stamp
libxc-1.0 has been configured.
rm -f libxc-1.0/src/libxc.f90
cd libxc-1.0/src && make libxc.f90 \
    AM_CPPFLAGS="-P -std=c99"
cpp   -P -std=c99 ./libxc_master.F90 > ../src/libxc.f90
cd libxc-1.0 && make
make  all-recursive
Making all in build
make[7]: Nothing to be done for `all'.
Making all in src
make  all-am
/bin/sh ../libtool  --tag=FC --tag=F77  --mode=compile /usr/local/gfortran/bin/gfortran  -ffree-form -g -ffree-line-length-none  -O2 -mtune=native -march=native -mfpmath=sse -c -o libxc_la-libxc.lo  `test -f 'libxc.f90' || echo './'`libxc.f90
libtool: ignoring unknown tag F77
libtool: compile:  /usr/local/gfortran/bin/gfortran -ffree-form -g -ffree-line-length-none -O2 -mtune=native -march=native -mfpmath=sse -c libxc.f90 -o libxc_la-libxc.o
libxc.f90:30:

module xc_f90_ ## types_m
1
Error: Unclassifiable statement at (1)
libxc.f90:34.17:

  integer, public, parameter :: xc_f90_kind = selected_real_kind(14)
                 1
Error: PUBLIC attribute at (1) is not allowed outside of the specification part of a module
libxc.f90:37.2:

  type xc_f90_ ## pointer_t
  1
Error: Unclassifiable statement at (1)
libxc.f90:38.11:

    private
           1
Error: PRIVATE statement at (1) is only allowed in the specification part of a module
libxc.f90:40.5:

  end type xc_f90_ ## pointer_t
     1
Error: Expecting END PROGRAM statement at (1)
libxc.f90:42.3:

end module xc_f90_ ## types_m
   1
Error: Expecting END PROGRAM statement at (1)
libxc.f90:46:

module xc_f90_ ## lib_m
1
Error: Unclassifiable statement at (1)
libxc.f90:48.13:

  use xc_f90_ ## types_m
             1
Error: Syntax error in USE statement at (1)
libxc.f90:49.19:

  use libxc_funcs_m
                   1
libxc.f90:39.30:

    integer, pointer :: buffer
                              2
Error: USE statement at (1) cannot follow data declaration statement at (2)
libxc.f90:51.15:

  implicit none
               1
libxc.f90:39.30:

    integer, pointer :: buffer
                              2
Error: IMPLICIT NONE statement at (1) cannot follow data declaration statement at (2)
libxc.f90:53.8:

  public
        1
Error: PUBLIC statement at (1) is only allowed in the specification part of a module
libxc.f90:95.28:

    integer function xc_f90_ ## info_number(info)
                            1
Error: Expected formal argument list in function definition at (1)
libxc.f90:96.17:

      use xc_f90_ ## types_m
                 1
Error: Syntax error in USE statement at (1)
libxc.f90:97.6:

      type(xc_f90_ ## pointer_t), intent(in) :: info
      1
Error: Unclassifiable statement at (1)
libxc.f90:98.7:

    end function xc_f90_ ## info_number
       1
Error: Expecting END INTERFACE statement at (1)
libxc.f90:100.28:

    integer function xc_f90_ ## info_kind(info)
                            1
Internal Error at (1):
insert_bbt(): Duplicate key found!
make[8]: *** [libxc_la-libxc.lo] Error 1
make[7]: *** [all] Error 2
make[6]: *** [all-recursive] Error 1
make[5]: *** [all] Error 2
make[4]: *** [build-stamp] Error 2
make[3]: *** [package-ready] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


After this "make testin_1" is not working:

echo "Running built-in test in_1"
Running built-in test in_1
cd tests ; /usr/bin/perl .././tests/Scripts/run-basic-tests.pl built-in in_1 /Users/nikhilsivadas/Downloads/abinit-6.10.3
sh: ../../../src/98_main/abinit: No such file or directory

Please advise on what to do,
Thank you

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 30, 2012 1:16 pm

export PATH=/usr/local/gfortran/bin:$PATH if not done already and add FCCPP=/usr/local/gfortran/bin/cpp to configure flags

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Thu Jan 10, 2013 7:08 pm

Hello, I'm attempting to compile abinit 7.0.4 on OSX Mountain Lion, and I ran into the same issue nikhilsd was having. I was able to get past that compiler error using the configure flags suggested, but I have run into another error that I do not know how to resolve.

I'm running configure with the following options:
CC=/usr/local/gfortran/bin/gcc FCCPP=/usr/local/gfortran/bin/cpp --enable-mpi --with-mpi-prefix=/usr/local/Cellar/open-mpi/1.6.3

Here are the last couple lines of output from the compiler:

Code: Select all

Basics:
  Prefix:                 /Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports
  Fortran90 compiler:     gfortran
  Fortran90 flags:        -ffree-form -g -ffree-line-length-none   -O2 -mtune=native -march=native -mfpmath=sse -g -O2 -I/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/include -I/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/include
  Linker flags:           
  Linked libraries:       -L/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/lib -lnetcdf -L/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/lib -lnetcdf
  Installed module dir:   /Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/include
  Installed lib dir:      /Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/lib
  Installed doc dir:      ${datarootdir}/doc/${PACKAGE_TARNAME}

cd sources/etsf_io-1.0.4 && make -j 4
Making all in src/low_level
gfortran -I/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/include -I. -ffree-form -g -ffree-line-length-none   -O2 -mtune=native -march=native -mfpmath=sse -g -O2 -I/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/include -I/Users/michalplucinski/Downloads/abinit-7.0.4/tmp/fallbacks/exports/include  -c -o etsf_io_low_level.o  etsf_io_low_level.f90
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:115:no such instruction: `vmovsd (%rsi), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:129:no such instruction: `vmulsd (%rax), %xmm0,%xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:131:no such instruction: `vmovsd %xmm1, (%rax)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:148:no such instruction: `vmovsd (%rsi), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:174:no such instruction: `vmulsd (%rdx), %xmm0,%xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:176:no such instruction: `vmovsd %xmm1, (%rdx)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:207:no such instruction: `vmovsd (%rsi), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:252:no such instruction: `vmulsd (%rdx), %xmm0,%xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:254:no such instruction: `vmovsd %xmm1, (%rdx)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:294:no such instruction: `vmovsd (%rsi), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:350:no such instruction: `vmulsd (%rdx), %xmm0,%xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:352:no such instruction: `vmovsd %xmm1, (%rdx)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:401:no such instruction: `vmovsd (%rsi), %xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:483:no such instruction: `vmulsd (%rax), %xmm1,%xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:485:no such instruction: `vmovsd %xmm0, (%rax)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:548:no such instruction: `vmovsd (%rsi), %xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:645:no such instruction: `vmulsd (%rax), %xmm1,%xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:647:no such instruction: `vmovsd %xmm0, (%rax)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:699:no such instruction: `vmovsd (%rsi), %xmm1'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:839:no such instruction: `vmulsd (%rax), %xmm1,%xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:841:no such instruction: `vmovsd %xmm0, (%rax)'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:37272:no such instruction: `vmovss 1336(%rsp), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:37277:no such instruction: `vucomiss (%r15), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:37550:no such instruction: `vucomiss LC152(%rip), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:37841:no such instruction: `vmovss LC157(%rip), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:37845:no such instruction: `vucomiss 0(%rbp), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:38288:no such instruction: `vmovss LC157(%rip), %xmm0'
/var/folders/sy/tn179p_x5vz2x4pqpwfx_bg80000gn/T//ccgcglTn.s:38289:no such instruction: `vucomiss 0(%rbp), %xmm0'
make[5]: *** [etsf_io_low_level.o] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [stamps/etsf_io-build-stamp] Error 2
make[2]: [all-local] Error 2 (ignored)
Checking build of etsf_io fallback
test -e stamps/etsf_io-install-stamp
make[2]: *** [all-local] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Any help with this error would be much appreciated! :)
Thanks!

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

Re: abinit-6.10.3 error message with make command

Post by pouillon » Sun Jan 13, 2013 6:20 pm

Looks like you installed a version of GCC compiled for another architecture.

Try to configure with the following options: --enable-optim="yes" CFLAGS_OPTIM="-O2" FCFLAGS_OPTIM="-O2".
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 6:35 pm

Thank you very much for your help. I managed to compile and install abinit with the settings you recommended. However, when running make tests_min and tests_acc, I am getting a lot of "Segmentation fault: 11" errors.

How can I check the version of GCC that is being used, if it is compiled for another architecture. I installed a version of gfortran recently, but it used a default osx installer. Perhaps it is an issue with using mountain lion if the installer was for lion?

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 6:46 pm

Hi Michal,

The sad story is that Apple provided backend assembler (a deprecated "as") doesn't generate AVX instructions although Apple manufactures computers with AVX enabled processors. I assume that you installed fortran compiler binaries that are by default hard linked to the the culprit /usr/bin/as ... that's the reason why many "net" provided compilers execs fail even if you have a good assembler in your path.
Yann's suggestion may work i.e. to disable the native optimizations at the price of a slight speed penalty ... I would be delighted to know if it does in order to amend the config files.
If it doesn't, you may have success by trying to first export AS="clang -x assembler" which will use the build-in assembler of clang but I'm not sure that your fortran compiler follows the AS environment variable directive. Another solution would be to install macports gcc46 or gcc47 compiler suite (or homebrew) that uses a recent version of the binutils.

Kind regards,

Alain

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 6:54 pm

Regarding the segfaults, would you be so kind to paste here the output of an

Code: Select all

otool -L abinit
where abinit points to the location of the abinit binary (it should live in src/98_main/...). I wouldn't be surprised if there were references to Apple vecLib BLAS or LAPACK.
If it does, you may have success with the --with-linalg-flavor="none" ... at a significant performance penalty.

Kind regards,

Alain

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 7:11 pm

Hello Alain,

Here are the results of running otool, LAPACK and BLAS are mentioned as you suspected.
Michals-MacBook-Pro:98_main michalplucinski$ otool -L abinit
abinit:
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libmpi_f77.1.dylib (compatibility version 2.0.0, current version 2.6.0)
/usr/local/lib/libmpi.1.dylib (compatibility version 2.0.0, current version 2.6.0)
/usr/local/gfortran/lib/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/usr/local/gfortran/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/gfortran/lib/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)

Should I attempt to recompile and install abinit with a homebrew or macports provided compiler?

Thank you very much for your help,
Michal
Last edited by MichalP on Mon Jan 14, 2013 7:17 pm, edited 1 time in total.

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 7:15 pm

It's not a problem with the installer. The AVX problem comes from the gfortran binaries compiled with the default /usr/bin/as that is outdated.
The segfault problem has another origin ... my assumptions are either a wrong BLAS/LAPACK detection (otool will tell) or a ZDOTx bug. No need to run the whole test suite to figure out; a make tests_v1 already shows a bunch of segfaults.

... follow-up in a few minutes :-)

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 7:36 pm

Should I recompile with the setting --with-linalg-flavor="none" or do I have any other options that would have lower performance penalties?

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 7:52 pm

The situation is tricky ...
First of all you (well, abinit configure linalg routines) have fished for the vecLib BLAS and LAPACK that are buggy (and not supporting Fortran) as you can see in the first two lines of otool output.

Now if I suggest to switch to macports, you'll be in trouble with the MPI libraries you installed in /usr/local (that are autodetected too) because they are calling your /usr/local/gfortran/bin/gfortran backend. So in order to switch to macports, you'll need to install several packages i.e. gcc47, openmpi (the gcc47 variant of openmpi i.e. specify port install openmpi +gcc47) and atlas (the gcc47 variant of atlas package i.e. specify port install atlas +gcc47). And then configure abinit with the right options to avoid the autodetection nightmare i.e. --with-mpi-prefix=/opt/local --with-linalg-flavor="atlas" --with-linalg-libs="-L/opt/local/lib -llapack -lcblas -lf77blas -latlas" (add Yann's suggestions to get rid of the mfpmath setting). Please check the messages at the end of the configure step that the intended libraries are effectively used.
All this can take some time especially if macports doesn't find pre-compiled packages for your OSX version - you'll need a suitable xcode too if not already installed)

The fastest way to build an abinit binary with what you already have on your system is to use --with-linalg-flavor="none" to force the use of the build-in linalg package at the price of a speed penalty. Please check again the end of the configure step and the abinit binary after the make with otool that there are no reference to the vecLib framework.
The tests_v1 is enough to test for a segfault.

Kind regards,

Alain

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 8:04 pm

I recompiled with the setting --with-linalg-flavor="none", and that seems to have gotten rid of the seg faults. Running tests_v1, the majority complete in 0-3 seconds, with the longest taking 23 seconds and the 2nd longest 7s. Would you think it's worth it to recompile with a different version of gcc, how significant a performance increase would I see?
The version of open-mpi I'm using is provided by homebrew, and was installed using the homebrew provided gfortran complier, not the default OSX one. If I was to recompile abinit from scratch, would it make sense to link to that compiler, or would switching to macports make more sense? I do have xcode installed with command line tools enabled.

Thanks,
Michal

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 8:43 pm

It's difficult to estimate the performance gain because it is very related to the kind of problem i.e. the part of the code you're running and the way you run it. For example, if you study large systems with little k-point sets, the k-point parallelization will be poor and you'll benefit from atlas multithreading capabilities. The most efficient optimization would be to use FFTW3 library - its performance in terms of speed is much better that the internal FFT. Unfortunately, fftw3 distributed by macports disables its fortran support so you'll need to build your own FFTW3 libraries to work with abinit. So is it suitable to use a laptop for large production work that will benefit from speed optimization and, if yes, it would be advisable to complement the macports installation with another external fftw3.
But yes, developers devote a significant time to adapt Abinit to optimized libraries because it provides a significant speed gain (... thanks Matteo).

Now I read that you're a user of homebrew. I have no experience with it but it looks a very well maintained project. So I assume that you can also add to your existing homebrew installation optimized BLAS/LAPACK (atlas or gotoblas or openblas) and optimized FFT (but check that homebrew doesn't disable fortran support as macports does - for very stupid reasons) libs. And you'll have to adapt the configure options I gave (and add --with-fftw-flavor="fftw3" --with-fft-libs="-L/usr/local/lib/fftw -lfftw3" ... check the -L param, I don't know where homebrew stores fftw3 libs, as written here you should have a /usr/local/lib/fftw/libfftw3.dylib file).

Alain

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 8:45 pm

Don't mix homebrew with macports. They have many duplicates so installing both will be a source of many problems. Again homebrew should provide similar packages as macports.

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Mon Jan 14, 2013 8:57 pm

Look http://braumeister.org/search for clues ... I see a suitable fftw but no optimized lapack/blas in homebrew - it would be a pity. If it is true, I don't regret my macports installation.

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 9:10 pm

homebrew does have openblas, does that also include lapack or would I need another package for that? It also has a separate lapack package.

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 9:53 pm

Here are the settings I am using:

FC=usr/local/bin/gfortran/ CC=/usr/local/gfortran/bin/gcc FCCPP=/usr/local/gfortran/bin/cpp --enable-mpi="yes" --enable-optim="yes" CFLAGS_OPTIM="-O2" FCFLAGS_OPTIM="-O2" --with-mpi-prefix="/usr/local/Cellar/open-mpi/1.6.3" --with-fft-flavor="fftw3" --with-fft-libs="-L/usr/local/Cellar/fftw/3.3.2/lib -lfftw3" --with-linalg-flavor="goto" --with-linalg-libs="-L/usr/local/Cellar/openblas/0.2.5/lib -lopenblas"

I have gotten openblas and fftw through home-brew, but configure is giving me an error that actual fft support is broken and the specified libraries do not work. I presume this means I need to compile my own version of fftw and is related to a lack of fortran support? Blas and lapack are both supported according to configure.

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: abinit-6.10.3 error message with make command

Post by gmatteo » Mon Jan 14, 2013 11:38 pm

Could you post the section of config.log where the build system reports that the fftw3 support is broken?

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Mon Jan 14, 2013 11:57 pm

Code: Select all

configure:33167: checking for the requested FFT support
configure:33169: result: fftw3
configure:33571: /Users/michalplucinski/Downloads/abinit-7.0.4/tmp/config/wrappers/wrap-mpiLFC -o conftest  -g -ffree-line-length-none         conftest.F90 -L/usr/local/Cellar/fftw/3.3.2/lib -lfftw3 -L/usr/local/Cellar/fftw/3.3.2/lib -lfftw3       >&5
Undefined symbols for architecture x86_64:
  "_dfftw_execute_", referenced from:
      _MAIN__ in ccVCae52.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
configure:33571: $? = 1
configure: failed program was:
|       program main
|
|         call dfftw_execute
|
|       end
configure:34275: checking for the actual FFT support
configure:34277: result: broken
configure:34322: error: the specified FFT libraries do not work


Here it is

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: abinit-6.10.3 error message with make command

Post by gmatteo » Tue Jan 15, 2013 10:20 am

Your fftw3 library does not provide the Fortran binding dfftw_execute.
I suggest to compile your version of fftw3 from source

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Tue Jan 15, 2013 3:06 pm

Hi Michal, Matteo

I had a look on the homebrew ruby script that is used to build its fftw package (at https://github.com/mxcl/homebrew/blob/m ... la/fftw.rb)
It says:
...
args << "--disable-fortran" unless which 'gfortran'
...
So you should have fortran support unless you have installed fftw before fortran (or gfortran is not in your path). Would you be so kind to try again

without the FC=usr/local/bin/gfortran/ CC=/usr/local/gfortran/bin/gcc part; it's the MPI wrappers that should call the right compilers (furthermore FC setting is wrong here)
with an export PATH=/usr/local/gfortran/bin:/usr/local/Cellar/open-mpi/1.6.3/bin:$PATH before the configure command
and with an export DYLD_LIBRARY_PATH=/usr/local/Cellar/open-mpi/1.6.3/lib:/usr/local/Cellar/fftw/3.3.2/lib:/usr/local/Cellar/openblas/0.2.5/lib:$DYLD_LIBRARY_PATH before configure

Do you have a file named /usr/local/Cellar/fftw/3.3.2/lib/libfftw3f.dylib or similar?
Would you please add the output of nm /usr/local/Cellar/fftw/3.3.2/lib/libfftw3.3.dylib |grep dfftw_execute ... if it says T _dfftw_execute_ then it is fine.

and yes, if you look at https://github.com/Homebrew/homebrew-sc ... penblas.rb your openblas comes with full lapack. The other lapack package is probably the plain netlib one so don't mix them.

Alain

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Tue Jan 15, 2013 6:09 pm

I do indeed have the file libfftw3f.dylib. When I search the output of nm libfftw3.3.dylib, I can find T _fftw_execute_ but dfftw cannot be found.

I get the same error after removing FC and CC and adding the two lines to my path and library path before running configure.

I attempted to reinstall fftw now that I know gfortran is in the path, but it didn't make any difference.

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

Re: abinit-6.10.3 error message with make command

Post by Alain_Jacques » Wed Jan 16, 2013 12:37 am

Hi Michal,

I just installed fftw-3.3.3 (I was using 3.3.2 before) with the following configuration ...
./configure --prefix=/opt/fftw-3.3.3 --enable-sse2 --enable-shared CC=/opt/gcc-4.6/bin/gcc-4.6 CPP=/opt/gcc-4.6/bin/cpp-4.6 F77=/opt/gcc-4.6/bin/gfortran-4.6

and a nm /opt/fftw-3.3.3/lib/libfftw3.3.dylib |grep dfftw_execute outputs 00000000000d1b60 T _dfftw_execute_ which means that the function is there and is defined. Try something similar by adapting prefix, CC, CPP and F77 to your own system and it should work. Do not forget to clean the reference to homebrew fftw from your DYLD_LIBRARY_PATH variable.

Alain

MichalP
Posts: 14
Joined: Thu Jan 10, 2013 7:02 pm

Re: abinit-6.10.3 error message with make command

Post by MichalP » Wed Jan 16, 2013 5:02 pm

Thank you, installing fftw from source worked.

Here is the summary from configure:

Code: Select all

Summary of important options:

  * C compiler      : gnu version
  * Fortran compiler: gnu version 4.6
  * architecture    :   ( bits)

  * debugging       : basic
  * optimizations   : yes

  * OpenMP enabled  : no (collapse: ignored)
  * MPI    enabled  : yes
  * MPI-IO enabled  : yes
  * GPU    enabled  : no (none)

  * TRIO   flavor = netcdf-fallback+etsf_io-fallback
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = netlib-fallback (libs: ignored)
  * ALGO   flavor = none (libs: ignored)
  * FFT    flavor = fftw3 (libs: user-defined)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

LINALG is set to netlib, not openblas as I set it.

Here are my configure options:
../configure FCCPP=/usr/local/gfortran/bin/cpp --enable-mpi="yes" --enable-optim="yes" CFLAGS_OPTIM="-O2" FCFLAGS_OPTIM="-O2" --with-mpi-prefix="/usr/local/Cellar/open-mpi/1.6.3" --with-fft-flavor="fftw3" --with-fft-libs="-L/usr/local/fftw-3.3.3/lib -lfftw3" --with-linalg-flavor="goto" --with-linalg-libs="-L/usr/local/Cellar/openblas/0.2.5/lib -llapack -lcblas -lf77blas -latlas -lopenblas"

What should I do to ensure LINALG is set properly?

Here is the selection of configure output pertaining to linear algebra support:

checking for the requested linear algebra support... goto
checking whether to select a fallback for linear algebra... no
checking for BLAS support in specified libraries... no
checking for AXPBY support in specified BLAS libraries... no
checking for gemm3m in specified libraries... no
checking for mkl_imatcopy in specified libraries... no
checking for mkl_omatcopy in specified libraries... no
checking for mkl_omatadd in specified libraries... no
checking for LAPACK support in specified libraries... no
checking for BLACS support in specified libraries... no
checking for ScaLAPACK support in specified libraries... no
checking for MAGMA (version>=1.1.0) support in specified libraries... checking TEST... no
checking whether we have a serial linear algebra support... no
configure: WARNING: falling back to internal linear algebra libraries
checking whether we have a MPI linear algebra support... no
checking whether we have a GPU linear algebra support... no
checking for the actual linear algebra support... netlib-fallback

For some reason LAPACK and BLAS support is not present in these libraries. How can I double check what is supported in the openblas libraries?

Thanks,
Michal
Last edited by MichalP on Thu Jan 17, 2013 4:01 pm, edited 1 time in total.

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: abinit-6.10.3 error message with make command

Post by gmatteo » Wed Jan 16, 2013 5:37 pm

Hello Michal,

In order to understand what's going wrong, we need the section of config.log
that checks for the presence of BLAS and LAPACK routines in your libraries.

Locked