compilation error with gnu

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
Post Reply
Deep
Posts: 3
Joined: Wed Jun 09, 2021 12:09 pm

compilation error with gnu

Post by Deep » Wed Jun 23, 2021 4:48 am

Dear yambo community,

We are trying to compile the yambo code in our workstation with Ubuntu 18.04 and gnu compiler. We want to use this with quantum espresso for GW and BSE calculation. I have followed these two simple steps;
1. ./configure (a look of terminal after this is also attached with configure.png)
2. make all ( a look of terminal after implementing this is also attached with make_all.png)
However we have been using quantum espresso ( qe6.7) here in this workstation and its parallel compilation was done smoothly without any error. But the compilation of yambo is becoming challenging. I have also attached the config.log file here which was created after compilation.
The compilation is done in a seperate folder not in qe folder (is it fine) or has it to be done in qe folder?

Kindly guide us to compile and use Yambo.


Regards
Deep Jyoti Sapkota
Physics Department
IIT Jodhpur
INDIA
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: compilation error with gnu

Post by Daniele Varsano » Wed Jun 23, 2021 8:52 am

Dear Deep,

first, if you do not have already done, I suggest you to download the last release of the code:
git clone git@github.com:yambo-code/yambo.git yambo

the compilation is totally independent from the QE folder and compilation. It seems you have problem with the netcdf library.
If the problem persists by using the last release, please post here the error and attach the config.log file.
Do not attach png image as it is important to inspect the whole file, you can upload it using the attachment button below, eventually renaming its suffix if .log is not allowed.

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/

Deep
Posts: 3
Joined: Wed Jun 09, 2021 12:09 pm

Re: compilation error with gnu

Post by Deep » Wed Jun 23, 2021 12:34 pm

Dear Dr. Daniele Varsano,

We tried the latest version of Yambo 5.0.3 here. I followed the same ./configure and make all subsequently. But I got the same error and so I have attached the config.log file here.
And after compilation the error viewed as ;
#####
use netcdf
1
Fatal Error: Can't open module file ‘netcdf.mod’ for reading at (1): No such file or directory
compilation terminated.
Makefile:176: recipe for target 'mod_pars.o' failed
make[2]: *** [mod_pars.o] Error 1
make[2]: Leaving directory '/home/iit-j/software/yambo-5.0.3/src/modules'
config/mk/actions/compile_yambo.mk:2: recipe for target 'yambo' failed
make[1]: *** [yambo] Error 2
make[1]: Leaving directory '/home/iit-j/software/yambo-5.0.3'
yambo build failed
#####

Kindly guide us.

Thank You

Regards
Deep Jyoti Sapkota
IIT Jodhpur
INDIA
You do not have the required permissions to view the files attached to this post.

User avatar
Davide Sangalli
Posts: 614
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: compilation error with gnu

Post by Davide Sangalli » Wed Jun 23, 2021 10:16 pm

Dear Deep Jyoti Sapkota,
it is likely that the netcdf compilation of the internal library failed,
Then the compilation of the code went on and it results in a missing netcdf module.

What happens if you run

Code: Select all

make netcdf
and/or

Code: Select all

make netcdff
Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

Deep
Posts: 3
Joined: Wed Jun 09, 2021 12:09 pm

Re: compilation error with gnu

Post by Deep » Thu Jun 24, 2021 8:09 am

Dear Davide Sangalli and all community members,

I have tried the above suggested command but it does not find any make rule:
make: *** No rule to make target 'netcdf'. Stop.
and I have also tried installing netcdf using the below command also;
sudo apt-get install netcdf
But again after compilation it is showing the same error.

Kindly suggest me a proper way to do this. I am unable to understand that quantum espresso detect everthing during compilation by itself but this yambo code is showing error during installation.

Thank You

Regards
Deep Jyoti Sapkota
Physics
IIT Jodhpur India

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

Re: compilation error with gnu

Post by andrea.ferretti » Mon Jun 28, 2021 10:41 am

Dear Deep Jyoti Sapkota,

some comments:
* the failure of your compilation is related to the internal compilation of the netcdf library, which is not used by Quantum ESPRESSO, and therefore does not represent an issue for QE. We are trying to simplify the software stack of yambo IO, still it requires hdf5, netcdf, netcdff at the moment.
* (1) you are configuring using ./configure , so providing no flags, turning the compilation of most required library internal.
* (2) if you want to use external netcdf (you mentioned you have downloaded netcdf via apt-get), you need to tell configure by specifying flags for netcdf, netcdff hdf5.

Path (1)
compilation without flags: it works in my case on a linux machine using gfortran 7.3.1; this is what I did:
* make distclean (in case you have made some previous attempts)
* ./configure
* make -j4 yambo

here I used j4 in order to have a fast-enough compilation without messing up with dependencies (sometimes it happens, if many threads are invoked, eg by using make -j yambo )

Path (1) bis
if you want to first compile internal libraries:
* make distclean
* ./configure
* make -j4 hdf5
* make -j4 netcdf
* make -j4 yambo
(you have just split the previous compilation into pieces... allowing one to inspect which bit fails)

Path (2)
Compilation using external libraries: Here you need to specify the location of the external libraries to configure. As an example, here are the flags I use on one of my machines:

Code: Select all

./configure \
  --with-fft-path="/opt/fftw/3.3.6-gnu" \
  --with-libxc-path="/opt/libxc/2.2.3-gnu" \
  --with-netcdf-path="/opt/netcdf/4.4.1.1-hdf5-gnu" \
  --with-netcdff-path="/opt/netcdff/4.4.4-gnu" \
  --with-hdf5-path="/opt/hdf5/1.8.18-gnu" \
  --with-blas-libs=" -lblas" \
  --with-lapack-libs=" -llapack" \
  --with-scalapack-libs=" -L/opt/scalapack/2.0.1-openmpi-gnu/lib -lscalapack" \
  --with-blacs-libs=" -L/opt/scalapack/2.0.1-openmpi-gnu/lib -lscalapack" \
  --enable-open-mp \
  --enable-time-profile \
  --enable-memory-profile \
  --enable-msgs-comps
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

Post Reply