Error when compile yambo4.5.2 on powerpc64

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

Moderators: Davide Sangalli, Daniele Varsano, andrea.ferretti, andrea marini, Conor Hogan, myrta gruning

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
young
Posts: 15
Joined: Wed Apr 03, 2019 3:50 pm

Error when compile yambo4.5.2 on powerpc64

Post by young » Fri Oct 23, 2020 6:23 am

Dear developers,

When I compile yambo-4.5.2 on Red Hat Enterprise Linux 7, I got errors in configure step:
./configure FC=mpif90 CC=gcc
#######################
uname -m = ppc64le
uname -r = 4.14.0-115.29.1.el7a.ppc64le
uname -s = Linux
uname -v = #1 SMP Tue Jul 28 22:41:18 UTC 2020
/usr/bin/uname -p = ppc64le
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch = ppc64le
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = ppc64le
UNAME_RELEASE = 4.14.0-115.29.1.el7a.ppc64le
UNAME_SYSTEM = Linux
UNAME_VERSION = #1 SMP Tue Jul 28 22:41:18 UTC 2020
configure: error: cannot guess build type; you must specify one


#######################

Then I specify the build: ./configure FC=mpif90 CC=gcc --build=ppc64le
#####################################
checking whether we are using the GNU Fortran compiler... yes
checking whether mpif90 accepts -g... yes
checking if the current OS is supported... no
configure: Platform <powerpc64le-unknown-none> is not supported.
configure: Please contact the Yambo team at yambo@yambo-code.org
configure: providing either a list of compilers and options or
configure: a guest account on this machine.
configure: error: stopping
#######################################


**********************************************************************
The information of platform:
(1) the compiler (IBM Spectrum MPI 10.3)
(2) the architecture (IBM Power 9)
(3) the problems occur compiling in serial and parallel
(4) the version of Yambo-4.5.2

Type system CPU
Power 9 Red Hat Enterprise Linux 7 2x 20 core 3.15 GHz IBM Power 9
********************************************************************

Would you like to tell me how to solved it.

Best
Ke
Ke Yang
PHD student
Rensselaer polytechnic institute, troy, NY, US
Hunan university, changsha, Hunan, China

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

Re: Error when compile yambo4.5.2 on powerpc64

Post by andrea.ferretti » Fri Oct 30, 2020 10:42 am

Dear Ke,

thanks for reporting.
This was a known issue fixed in the development branch but not percolated into the public release.
We have updated the gpl repository (https://github.com/yambo-code/yambo/, branch 4.5) and created a new tag/release
yambo-4.5.3 .

Pls let us know if this works also in your case.

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

young
Posts: 15
Joined: Wed Apr 03, 2019 3:50 pm

Re: Error when compile yambo4.5.2 on powerpc64

Post by young » Sat Oct 31, 2020 7:12 am

Hello Andrea,
Thanks for you response. I have downloaded the Yambo-4.5.5, and solved previous problem. But, I meet a new Error in configure process by GNU compiler. Could I use GNU to compile Yambo?

#############################
./configure FC=mpif90
checking for Fortran flag to compile .f90 files... none
checking for mpif90 kind and version... unknown unknown
checking for specific mpif90 flags... -q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970
checking for specific Open-MP flags...
checking for specific gcc flags... -q64 -O2 -g
checking for specific unoptimized flags... -q64 -O0 -g
checking for specific NETCDF flags...
checking how to get verbose linking output from mpif90... configure: WARNING: compilation failed

checking for Fortran libraries of mpif90...
checking for dummy main to link with Fortran libraries... unknown
configure: error: in `/gpfs/u/home/POPC/POPChnzs/barn/Yambo/yambo-4.5.3':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details

##########################################################

Best
You do not have the required permissions to view the files attached to this post.
Ke Yang
PHD student
Rensselaer polytechnic institute, troy, NY, US
Hunan university, changsha, Hunan, China

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

Re: Error when compile yambo4.5.2 on powerpc64

Post by andrea.ferretti » Mon Nov 02, 2020 10:45 am

Dear Ke,

it seems that configure mixes in flags of IBM xlf with the gnu compiler.
You can try the following:

* try to unload any module related to xlf (if you have modules available)
* and possibly load gnu modules (gcc & gfortran)
* try to specify either nothing to configure,
* or to add more fields, eg
PFC=mpif90 FC=gfortran CC=gcc PCC=mpicc
* or simply:
FC=gfortran CC=gcc

let us know
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

young
Posts: 15
Joined: Wed Apr 03, 2019 3:50 pm

Re: Error when compile yambo4.5.2 on powerpc64

Post by young » Wed Nov 04, 2020 6:58 am

Dear Andrea,
Thanks for your reply. I met the same Error, although I unload all of Modules except for gfortran and gcc. Following is some information for compiler:

./configure FC=gfortran CC=gcc
###################################################
checking for vim... vim
checking for gcc... 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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for struct mallinfo.arena... yes
checking for malloc.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking whether make sets $(MAKE)... yes
checking for the size of a pointer... 8 bytes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking build system type... powerpc64le-unknown-linux-gnu
checking host system type... powerpc64le-unknown-linux-gnu
checking for GNU make... make
checking for ar... ar
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking if the current OS is supported... yes
configure: WIDESETUP: using build_os="linux"
configure: WIDESETUP: using F90SUFFIX=".f90"
configure: WIDESETUP: using AR="ar"
configure: WIDESETUP: using AR_FLAGS="-ru"
checking for Fortran flag to compile .f90 files... none
checking for gfortran kind and version... gfortran GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-37) unknown
checking for specific gfortran flags... -q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970
checking for specific Open-MP flags...
checking for specific gcc flags... -q64 -O2 -g
checking for specific unoptimized flags... -q64 -O0 -g
checking for specific NETCDF flags...
checking how to get verbose linking output from gfortran... configure: WARNING: compilation failed

checking for Fortran libraries of gfortran...
checking for dummy main to link with Fortran libraries... unknown
configure: error: in `/gpfs/u/home/POPC/POPChnzs/barn/Yambo/yambo-4.5.3':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details

############################################################

########################
gfortran -v

Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/ppc64le-redhat-linux/4.8.5/lto-wrapper
Target: ppc64le-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-ppc64le-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-ppc64le-redhat-linux/cloog-install --enable-gnu-indirect-function --enable-secureplt --with-long-double-128 --enable-targets=powerpcle-linux --disable-multilib --with-cpu-64=power8 --with-tune-64=power8 --build=ppc64le-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-37) (GCC)

############################################

Best
Ke
Ke Yang
PHD student
Rensselaer polytechnic institute, troy, NY, US
Hunan university, changsha, Hunan, China

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

Re: Error when compile yambo4.5.2 on powerpc64

Post by Daniele Varsano » Wed Nov 04, 2020 8:48 am

Dear Ke,
can you check if your mpif90 wrapper is pointing to the gnu compiler?
mpif90 --version

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: 140
Joined: Fri Jan 31, 2014 11:13 am

Re: Error when compile yambo4.5.2 on powerpc64

Post by andrea.ferretti » Wed Nov 04, 2020 12:54 pm

Dear Ke,

Code: Select all

checking for gfortran kind and version... gfortran GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-37) unknown
checking for specific gfortran flags... -q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970
I was able to reproduce your problem.
Basically I think it is a bug of the configure script, which does not support gfortran on powerpc (and then reverts to default flags, from ibm xlf).
I've just added the standard gnu gfortran support and it works in my case with external libraries (though I found some issues when compiling internal netcdf).
Let me checking this a big more and then I'll push the fix.

here is the patch I am using:

Code: Select all

diff --git a/config/acx_fortran_flags.m4 b/config/acx_fortran_flags.m4
index 6efa2f0..fc0eec4 100644
--- a/config/acx_fortran_flags.m4
+++ b/config/acx_fortran_flags.m4
@@ -327,6 +327,14 @@ powerpc64*linux* )
     NETCDFFLAGS="-DpgiFortran"
     DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame"
     ;;
+  *gfortran*)
+    SYSFLAGS="-O3 -g -mtune=native"
+    FUFLAGS="-O0 -g -mtune=native"
+    FCMFLAG=""
+    OMPFLAGS="-fopenmp"
+    NETCDFFLAGS="-DgFortran"
+    DEBUG_FLAGS="-g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow"
+    ;;
   *)
     CFLAGS="-q64 -O2 -g"
     SYSFLAGS="-q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970"
than you have to regenerate configure. Just cd into yambo main folder, and issue autoconf
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

young
Posts: 15
Joined: Wed Apr 03, 2019 3:50 pm

Re: Error when compile yambo4.5.2 on powerpc64

Post by young » Thu Nov 12, 2020 5:30 am

Dear Andrea,
Thanks for you help. After doing the patch, I can compile Yambo CPU Version successfully using PFC=mpif90 FC=gfortran CC=gcc PCC=mpicc parameter. But When I compile the GPU version, I still meet an error:

###################################################
./configure PFC=mpif90 FC=gfortran CC=gcc PCC=mpicc --disable-keep-extlibs --enable-cuda=x --enable-nvtx=/usr/local/cuda-10.2/bin/nvcc --enable-memory-profile --enable-msgs-comps

Error is:
: gfortran: error: unrecognized command line option ‘-Mcuda=x’
gfortran: error: unrecognized command line option ‘-Mcudalib=cufft,cublas,cusolver’


The GPU is
4x NVIDIA Tesla V100 GPUs with 16 GiB of memory each
Cuda 10.2
#####################################################

It seems that is gfortran issue, but when I use FC=mpif90, even failed when compile CPU version

Could you help me? Thanks in advance!
Ke Yang
PHD student
Rensselaer polytechnic institute, troy, NY, US
Hunan university, changsha, Hunan, China

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

Re: Error when compile yambo4.5.2 on powerpc64

Post by andrea.ferretti » Thu Nov 12, 2020 9:46 am

Dear Ke,

at the moment, yambo can be compiled with GPU support *only* using the PGI / nvidia SDK compiler. This is because the
programming model used is based on CUDA Fortran. AFAIK, IBM xlf also supports some CUDA Fortran, but CUF kernels, largely used in yambo,
are not available, so basically xlf cannot be used.
We are working on a OpenACC/OpenMP5 support (still going to take some time).

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