4.2.1 can't compile on seemingly any system (linux)

Having trouble compiling the Yambo source? Using an unusual architecture? Problems with the "configure" script? Problems in GPU architectures? This is the place to look.

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
Fariba
Posts: 4
Joined: Wed Jun 02, 2021 10:51 am

Compile error yambo-5.0.2

Post by Fariba » Wed Jun 09, 2021 9:14 am

Hi
I wish to compile yambo-5.0.2 . It crashes with the following error

Fatal Error: petsc/finclude/petscsys.h: No such file or directory

I would appreciate you comments

Thank you
Fariba
IASBS

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by Daniele Varsano » Wed Jun 09, 2021 9:48 am

Dear Fariba,
in order to spot the problem we would need you to attach the config.log file.
Anyway, petsc are needed if you want to link slepc libraries, are you sure you need them?
If not, you can avoid to include the --enable-slepc-linalg command line when configuring the code.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Fariba
Posts: 4
Joined: Wed Jun 02, 2021 10:51 am

Compile error yambo-5.0.2

Post by Fariba » Wed Jun 09, 2021 1:38 pm

Hi Daniele
Thank you for the comment.
please find the two log files from different systems in the attachment.

Regards
Fariba
IASBS
You do not have the required permissions to view the files attached to this post.

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by Daniele Varsano » Wed Jun 09, 2021 1:48 pm

Dear Fariba,
as suggested before try to reconfigure yambo without the slepc support.

So remove the --enable-slepc-linalg.
Note, that it's repeated twice in your command line.

If the problem persist, post here the error and config.log file.
Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Fariba
Posts: 4
Joined: Wed Jun 02, 2021 10:51 am

Compile error yambo-5.0.2

Post by Fariba » Wed Jun 09, 2021 2:22 pm

Hi Daniele
I have compiled yambo in one of the systems. In the other system the error is as following. The log file is in the attachment.
""<command-line>:0:14: warning: ISO C99 requires whitespace after the macro name
make[1]: Entering directory '/data/home/nazari/yambo-5.0.2/lib/qe_pseudo'
Makefile:102: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
make[1]: Leaving directory '/data/home/nazari/yambo-5.0.2/lib/qe_pseudo'
make: *** [config/mk/actions/compile_yambo.mk:2: yambo] Error 2""

Regards
Fariba
You do not have the required permissions to view the files attached to this post.

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by Daniele Varsano » Wed Jun 09, 2021 2:46 pm

Dear Fariba,
it seems you have a pre-processor problem.
You can try to set it as CPP="gcc -E"

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Fariba
Posts: 4
Joined: Wed Jun 02, 2021 10:51 am

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by Fariba » Wed Jun 09, 2021 3:37 pm

Hi Daniele

I have still faced with the following error after using CPP='gcc -E'.

>>>[Making qe_pseudo]<<<
<command-line>:0:14: warning: ISO C99 requires whitespace after the macro name
make[1]: Entering directory '/data/home/nazari/yambo-5.0.2/lib/qe_pseudo'
Makefile:102: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
make[1]: Leaving directory '/data/home/nazari/yambo-5.0.2/lib/qe_pseudo'
make: *** [config/mk/actions/compile_yambo.mk:2: yambo] Error 2
Regards
Fariba
IASBS
You do not have the required permissions to view the files attached to this post.

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by andrea.ferretti » Fri Jun 11, 2021 10:28 pm

Dear Andrew,

eventually I was able to compile yambo-4.2.1 on a workstation with CentOS, using gfortran 7.3.1, after having fixed a few issues, as detailed below.
* I configured without any flag, as plain as ./configure
* the first error came when trying to download the iotk library. Apparently yambo 4.2.1 had an issue that was later fixed

edit the file yambo/lib/archive/package.list and change the lines corresponding to iotk as follows:

Code: Select all

#tarball_iotk=iotk-y1.2.1.tar.gz
tarball_iotk=iotk-y1.2.2.tar.gz

#url_iotk=https://github.com/yambo-code/yambo/files/783147/$(tarball_iotk)
url_iotk=https://github.com/yambo-code/yambo/files/962173/$(tarball_iotk)
* compilation then goes well until linking, which in my case failed (scripting issue?)

I had to fix around lines 120 of yambo/sbin/make_makefile.sh according to:

Code: Select all

cat << EOF >> $cdir/Makefile
\$(target): \$(dep_file) \$(objs)
        \$(driver)
        \$(link)
        \$(modmove)
        \$(dircheck)
        @mv \$@ \$(exec_prefix)
EOF
(basically I had some extra \$ symbols I had to remove)

SIDE NOTE:
yambo 4.2.1 is a quite old version, I strongly recommend to use either 4.5.x or 5.0.x
unless you have some good reasons to do otherwise (perhaps you've already mentioned)

take care
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

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by Daniele Varsano » Sat Jun 12, 2021 8:30 am

Dear Andrea,

the post asking from help is from Fariba who's trying to compile yambo-5.0.x I guess.
You answered to an old post by Andrew of more than 4 years old.

This confusion happens when posting question on the wrong subform or as a reply of old posts where the problem is not exactly the same as in this case when an old release of the code is indicated.

Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

andrea.ferretti
Posts: 206
Joined: Fri Jan 31, 2014 11:13 am

Re: 4.2.1 can't compile on seemingly any system (linux)

Post by andrea.ferretti » Sat Jun 12, 2021 10:38 am

good point :-)
moving to the next question now
(indeed, it would have been definitely more effective to have a new forum thread)

now, coming to the Fariba's question, I tend to agree with Daniele, the offending lines are those related to CPP, in particular these lines look suspicious to me:

CPP='gcc -E'
CPPFLAGS=''
CPPFLAGS_yambo='-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /data/home/nazari/anaconda3/include'

CPP is ok, but CPPFLAGS seems to get some values from the environment.
I would try to unset the variable before configuring...

Something like the following works in my case:

export CPPFLAGS=""

Code: Select all

./configure \
   --disable-mpi \
   --enable-open-mp \
   --enable-msgs-comps \
   --enable-time-profile \
   --enable-memory-profile \
   --with-blas-libs="-L/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
   --with-lapack-libs="-L/lib/intel64 -Wl,--no-as-needed -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl" \
   FC=gfortran CC=gcc F77=gfortran CPP="gcc -E" 
 
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

Post Reply