compilation error!
Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan, Nicola Spallanzani
Forum rules
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
-
- Posts: 20
- Joined: Wed Feb 10, 2016 12:56 am
Re: compilation error!
Thank you Andrea for helping,
i have checked if i have cc compilers in make.sys for quantum espresso and it looks i have it. see the attached file.
but when I do :
./configure FC=ifort CC=icc
i got this error:
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/yambo/yambo-3.4.1-rev61':
configure: error: C compiler cannot create executables
See `config.log' for more details
also i tried :
./configure FC=ifort CC=icc CPP="icc -E"
and got this error:
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/yambo/yambo-3.4.1-rev61':
configure: error: C compiler cannot create executables
See `config.log' for more details
i have checked if i have cc compilers in make.sys for quantum espresso and it looks i have it. see the attached file.
but when I do :
./configure FC=ifort CC=icc
i got this error:
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/yambo/yambo-3.4.1-rev61':
configure: error: C compiler cannot create executables
See `config.log' for more details
also i tried :
./configure FC=ifort CC=icc CPP="icc -E"
and got this error:
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in `/home/yambo/yambo-3.4.1-rev61':
configure: error: C compiler cannot create executables
See `config.log' for more details
You do not have the required permissions to view the files attached to this post.
Jaret Qi
Ph.D candidate
NMSU-USA
Ph.D candidate
NMSU-USA
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: compilation error!
Now I would:
* post the current config.log
* check if icc is working (try to compile a trivial program, getting inspired by config.log)
* quantum espresso uses cc and not icc.
Try to figure out where cc is pointing ( it may be a link. Try with "which cc" )
* try ./configure CC=cc FC=ifort in yambo
* post the current config.log
* check if icc is working (try to compile a trivial program, getting inspired by config.log)
* quantum espresso uses cc and not icc.
Try to figure out where cc is pointing ( it may be a link. Try with "which cc" )
* try ./configure CC=cc FC=ifort in yambo
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
-
- Posts: 20
- Joined: Wed Feb 10, 2016 12:56 am
Re: compilation error!
I've got /usr/bin/ccandrea.ferretti wrote:Try with "which cc" )
but the same error .andrea.ferretti wrote: * try ./configure CC=cc FC=ifort in yambo
I did your recipe published somewhere in this forum;
./configure \
> --with-blas="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
> --with-lapack=" -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
> --with-iotk="/home/ferretti/espresso-5.2.0/iotk" \
> PFC="mpif90" \
> FC="mpif90" \
> F90="mpif90" \
> F77="ifort" \
> CC="cc" \
> LDFLAGS="-nofor_main"
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for gcc... cc
checking whether the C compiler works... no
configure: error: in `/home/yambo/yambo-3.4.1-rev61':
configure: error: C compiler cannot create executables
See `config.log' for more details
Jaret Qi
Ph.D candidate
NMSU-USA
Ph.D candidate
NMSU-USA
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: compilation error!
All of this seems to point to the fact the cc compiler is not working.
In order to confirm this, try to run cc (as well as ifort):
cc -v
ifort -v
Even if you have a working built of QE, something may have changed in your installation
and the compilers may no longer work (this is what configure is suggesting).
Before going on it is important you try to compile basic c and f90 programs such as:
test.c:
test.f90:
Also, don't forget to post your current config.log
Andrea
In order to confirm this, try to run cc (as well as ifort):
cc -v
ifort -v
Even if you have a working built of QE, something may have changed in your installation
and the compilers may no longer work (this is what configure is suggesting).
Before going on it is important you try to compile basic c and f90 programs such as:
test.c:
Code: Select all
#include<stdio.h>
int main ()
{
printf("hello world\n");
}
Code: Select all
program test
write(*,*) "hello world"
end program
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
-
- Posts: 20
- Joined: Wed Feb 10, 2016 12:56 am
Re: compilation error!
Thank you for your reply, it looks compilers are working good. Take a look:
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.6 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.6.2 (SUSE Linux)
home@whisper:~/test-compilers> ls
c-test.c
home@whisper:~/test-compilers> cc c-test.c -o test
home@whisper:~/test-compilers> ls
c-test.c test*
home@whisper:~/test-compilers> ./test
hello world!
home@whisper:~/test-compilers> ls
c-test.c f90-test.f90 test*
home@whisper:~/test-compilers> gfortran -o hello-f90 f90-test.f90
home@whisper:~/test-compilers> ls
c-test.c f90-test.f90 hello-f90* test*
home@whisper:~/test-compilers> ./hello-f90
Hello World!
Using built-in specs.andrea.ferretti wrote:
cc -v
Andrea
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.6 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.6.2 (SUSE Linux)
ifort version 12.1.4andrea.ferretti wrote: ifort -v
Andrea
home@whisper:~/test-compilers> vi c-test.candrea.ferretti wrote:
test.c:AndreaCode: Select all
#include<stdio.h> int main () { printf("hello world\n"); }
home@whisper:~/test-compilers> ls
c-test.c
home@whisper:~/test-compilers> cc c-test.c -o test
home@whisper:~/test-compilers> ls
c-test.c test*
home@whisper:~/test-compilers> ./test
hello world!
home@whisper:~/test-compilers> vi f90-test.f90andrea.ferretti wrote:
test.f90:AndreaCode: Select all
program test write(*,*) "hello world" end program
home@whisper:~/test-compilers> ls
c-test.c f90-test.f90 test*
home@whisper:~/test-compilers> gfortran -o hello-f90 f90-test.f90
home@whisper:~/test-compilers> ls
c-test.c f90-test.f90 hello-f90* test*
home@whisper:~/test-compilers> ./hello-f90
Hello World!
Jaret Qi
Ph.D candidate
NMSU-USA
Ph.D candidate
NMSU-USA
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: compilation error!
Hi Jarek,
thanks for reporting. Besides ifort and cc (gnu) working, I then suspect icc is also working.
The fact that yambo configure complains about cc not working is probably due then to a negative "interference" with other flags...
Nevertheless, the following works in my case:
Please also note that the configure distributed with yambo 3.4.1-rev61 is becoming deprecated while an updated configure procedure is released with yambo-3.4.2, that can be downloaded here:
http://www.yambo-code.org/files/yambo-s ... est.tar.gz
with this new configure, a simpler configuration should work:
thanks for reporting. Besides ifort and cc (gnu) working, I then suspect icc is also working.
The fact that yambo configure complains about cc not working is probably due then to a negative "interference" with other flags...
Nevertheless, the following works in my case:
Code: Select all
./configure \
FC=ifort \
F90=ifort \
F77=ifort \
CC=icc \
CPP="icc -E" \
CPPFLAGS="-ansi" \
FCFLAGS="-O3" \
LDFLAGS=-nofor_main
http://www.yambo-code.org/files/yambo-s ... est.tar.gz
with this new configure, a simpler configuration should work:
Code: Select all
./configure FC=ifort CC=icc
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
-
- Posts: 20
- Joined: Wed Feb 10, 2016 12:56 am
Re: compilation error!
I tried :
Code: Select all
./configure FC=ifort CC=icc
>>./configure FC=ifort CC=icc
>> make all
but got errors;
>>>[Making wf_and_fft]<<<
make[1]: Entering directory `/home/yambo/yambo-stable/src/wf_and_fft'
fft_setup.F fft_3d.F sgfft.F(18): error: incorrectly formed universal character name
! Fourier Transform, Comp. Phys. Commun. \underline{76}, 294 (1993)
^
make[1]: *** [sgfft.o] Error 2
make[1]: Leaving directory `/home/yambo/yambo-stable/src/wf_and_fft'
make: *** [yambo] Error 2
And please see .log file
You do not have the required permissions to view the files attached to this post.
Jaret Qi
Ph.D candidate
NMSU-USA
Ph.D candidate
NMSU-USA
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: compilation error!
very nice error !!!
Actually this does not show up in my case (same version, intel compilers + parallel environment).
If you want to workaround the problem try to compile using FFTW3 (e.g. from mkl)
it should be enough to add
--wth-fft-libs="-mkl"
to the configure flags
This will also result in a much more performing build
of course, issue a make clean_all before doing anything.
Since it is interesting to understand what happened to your current compilation, please send in
sgfft.F, config/setup, config/report
Andrea
Actually this does not show up in my case (same version, intel compilers + parallel environment).
If you want to workaround the problem try to compile using FFTW3 (e.g. from mkl)
it should be enough to add
--wth-fft-libs="-mkl"
to the configure flags
This will also result in a much more performing build
of course, issue a make clean_all before doing anything.
Since it is interesting to understand what happened to your current compilation, please send in
sgfft.F, config/setup, config/report
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
-
- Posts: 20
- Joined: Wed Feb 10, 2016 12:56 am
Re: compilation error!
Sorry but I got confused, how to include everything. I tried this :
/configure FC=ifort CC=icc \
--wth-fft-libs="-mkl"
Thank you Andrea for your patience.
/configure FC=ifort CC=icc \
--wth-fft-libs="-mkl"
Thank you Andrea for your patience.
Jaret Qi
Ph.D candidate
NMSU-USA
Ph.D candidate
NMSU-USA
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: compilation error!
exactly:
does it work ?
Code: Select all
./configure FC=ifort CC=icc --wth-fft-libs="-mkl"
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it