Problem with compiling abinit 6.10.2 on iMac 2011

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
xiangpisai
Posts: 19
Joined: Thu Mar 24, 2011 3:02 pm

Problem with compiling abinit 6.10.2 on iMac 2011

Post by xiangpisai » Sun Dec 04, 2011 1:40 am

Hi everyone,
I am trying to compile abinit 6.10.2 on an iMac 2011 with a Core i-5 quad core CPU. I did the following steps:
1. Install Xcode
2. Install Gfortran binary from GNU website
3. Download, untar, and configure abinit package with the following options: --with-dft-flavor="none" --with-trio-flavor="none"
4. make
I was able to run configure successfully, however when I type make, it gave me an instant error with the following message:

gfortran -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -ffree-form -J/Users/pzhu/Downloads/abinit-6.10.2/src/mods -O2 -mtune=native -march=native -mfpmath=sse -g -ffree-line-length-none -c -o io.o io.F90
gfortran -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -ffree-form -J/Users/pzhu/Downloads/abinit-6.10.2/src/mods -O2 -mtune=native -march=native -mfpmath=sse -g -ffree-line-length-none -c -o iorho.o iorho.F90
gfortran -DHAVE_CONFIG_H -I. -I../.. -I../../src/incs -I../../src/incs -ffree-form -J/Users/pzhu/Downloads/abinit-6.10.2/src/mods -O2 -mtune=native -march=native -mfpmath=sse -g -ffree-line-length-none -c -o numeric.o numeric.F90
/var/folders/yf/1q2hhgzx1_x1p4w1slhywwvw0000gn/T//cckEZVGR.s:172:no such instruction: `vmovsd LC2(%rip), %xmm0'
/var/folders/yf/1q2hhgzx1_x1p4w1slhywwvw0000gn/T//cckEZVGR.s:174:no such instruction: `vcvtsi2sd %eax, %xmm2,%xmm2'
/var/folders/yf/1q2hhgzx1_x1p4w1slhywwvw0000gn/T//cckEZVGR.s:175:no such instruction: `vdivsd %xmm2, %xmm0,%xmm2'
/var/folders/yf/1q2hhgzx1_x1p4w1slhywwvw0000gn/T//cckEZVGR.s:179:no such instruction: `vmulsd LC3(%rip), %xmm2,%xmm0'
/var/folders/yf/1q2hhgzx1_x1p4w1slhywwvw0000gn/T//cckEZVGR.s:180:no such instruction: `vmovsd %xmm2, (%rsp)'

There are a lot of similar errors.
BTW: when I do the same thing with my 2010 Macbook Air with a C2D processor, it works like a charm.

Does anyone know what problem is about? Thank you so much for answering!
Sincerely,
xiangpisai

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

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by jbeuken » Mon Dec 05, 2011 10:29 am

Hi,

I suppose that your iMac2011 runs under Lion (10.7.x)...

I download and install the binaries found on : http://gcc.gnu.org/wiki/GFortranBinaries#MacOS ( gcc v4.6.2 )

I add/ajust in my environment :

Code: Select all

export PATH=/usr/local/gfortran/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:$DYLD_LIBRARY_PATH


my build.ac is :

Code: Select all

CC="gcc"
FC="gfortran"
F77="gfortran"
CXX="g++"
CPP="cpp"

enable_64bit_flags="yes"
enable_debug="no"
enable_mpi="no"
enable_mpi_io="no"
with_trio_flavor="none"
with_dft_flavor="none"
enable_gw_dpc="yes"
enable_maintainer_checks="no"
enable_test_timeout="yes"
enable_gui_build="no"


and I runs

Code: Select all

./configure --with-config-file=./build.ac
make mj4
cd tests; make tests_in


and it works...

note that I also try with all plugins but there is a problem with wannier ( some tests failed )...

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

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

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by jbeuken » Tue Dec 06, 2011 2:54 pm

Dear xiangpisai,

which is the version of your OS ?
the error can be explained if the version is 10.6.7 or less...

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

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

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by pouillon » Tue Dec 06, 2011 3:53 pm

The error message you get seems to indicate that you installed the GFortran binaries for another architecture, which causes the assembly stage to fail.

This should work much better as soon as you install the correct GFortran binary.

In the meantime, a temporary workaround could be to configure with generic optimization flags, e.g.:

Code: Select all

../configure CFLAGS_OPT="-O2" FCFLAGS_OPT="-O2" ...

Of course, this will decrease significantly the performance of Abinit, and there is no guarantee that it will be sufficient to let you build the whole package.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

xiangpisai
Posts: 19
Joined: Thu Mar 24, 2011 3:02 pm

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by xiangpisai » Wed Dec 07, 2011 2:28 am

jbeuken wrote:Hi,

I suppose that your iMac2011 runs under Lion (10.7.x)...

I download and install the binaries found on : http://gcc.gnu.org/wiki/GFortranBinaries#MacOS ( gcc v4.6.2 )

I add/ajust in my environment :

Code: Select all

export PATH=/usr/local/gfortran/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:$DYLD_LIBRARY_PATH


my build.ac is :

Code: Select all

CC="gcc"
FC="gfortran"
F77="gfortran"
CXX="g++"
CPP="cpp"

enable_64bit_flags="yes"
enable_debug="no"
enable_mpi="no"
enable_mpi_io="no"
with_trio_flavor="none"
with_dft_flavor="none"
enable_gw_dpc="yes"
enable_maintainer_checks="no"
enable_test_timeout="yes"
enable_gui_build="no"


and I runs

Code: Select all

./configure --with-config-file=./build.ac
make mj4
cd tests; make tests_in


and it works...

note that I also try with all plugins but there is a problem with wannier ( some tests failed )...

jmb

Hi jmb,
Thank you so much for the reply!
I tried your method but I got the same error, just as the first thread. I think I will need further help with the problem. Thank you again!
Sincerely,
Xiangpisai

xiangpisai
Posts: 19
Joined: Thu Mar 24, 2011 3:02 pm

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by xiangpisai » Wed Dec 07, 2011 2:30 am

jbeuken wrote:Dear xiangpisai,

which is the version of your OS ?
the error can be explained if the version is 10.6.7 or less...

jmb

hi jbeuken,
I am currently using the latest version of Mac OS, should be 10.7.1. I am sure I upgraded to Lion the first day it came out :)

xiangpisai
Posts: 19
Joined: Thu Mar 24, 2011 3:02 pm

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by xiangpisai » Wed Dec 07, 2011 2:34 am

pouillon wrote:The error message you get seems to indicate that you installed the GFortran binaries for another architecture, which causes the assembly stage to fail.

This should work much better as soon as you install the correct GFortran binary.

In the meantime, a temporary workaround could be to configure with generic optimization flags, e.g.:

Code: Select all

../configure CFLAGS_OPT="-O2" FCFLAGS_OPT="-O2" ...

Of course, this will decrease significantly the performance of Abinit, and there is no guarantee that it will be sufficient to let you build the whole package.

Hi pouillon,
Thank you so much for your reply! I double checked my downloaded file and I am pretty sure that it is the correct version---64bit, for Lion. BTW: if you see the end of my first post, I said that the same steps work flawlessly for my Macbook Air which is also running Lion. It is really weird. I am suspecting there are something wrong with my CPU, lol. BTW: I tried your method but it seems that it won't finish.
Sincerely,
xiangpisai

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

Re: Problem with compiling abinit 6.10.2 on iMac 2011

Post by pouillon » Wed Dec 07, 2011 1:28 pm

This is not so much a question of 32/64 bits, but much more of processor architecture. Your processor is lacking the AVX instruction set, that the compiler is expecting. This means that you should install a version of GCC recompiled for your architecture.

Please see the following and links therein for details: http://en.wikipedia.org/wiki/Advanced_Vector_Extensions.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

Locked