yambo 5.3.0 on macOS @arm

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
sitangshu
Posts: 191
Joined: Thu Jan 05, 2017 8:08 am

yambo 5.3.0 on macOS @arm

Post by sitangshu » Tue Apr 22, 2025 3:30 pm

Hi,

I was trying to install Yambo version 5.3.0 on macOS with apple@arm (processor: apple m4). The configuration is smooth and I hoped that installation should also be smooth. I checked the bin folder and found the binaries are properly installed.
The log files of yambo, p2y and ypp, all look clean to me, but none of the ypp binaries are working.
On the terminal, there is some illegal operation remarks during:

Code: Select all

	[driver] ypp
	[driver] ypp (link)
	[lib/qe_pseudo] qe_pseudo (setup)
	[lib/slatec] slatec (setup)
	[lib/math77] math77 (setup)
	[lib/local] local (setup)
	[src/driver] driver (setup)
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file ... target_directory
cp: illegal option -- u
...
... Many similar lines here*****
...
cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file ... target_directory
cp: illegal option -- u
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-aclpSsvXx] source_file ... target_directory
	[src/tools] tools (setup)
	[src/modules] modules (setup)
	[src/memory] memory (setup)
	[src/allocations] allocations (setup)
	[src/matrices] matrices (setup)
	[src/linear_algebra] linear_algebra (setup)
	[src/parallel] parallel (setup)
	[src/parser] parser (setup)
	[src/communicate] communicate (setup)
	[src/output] output (setup)
	[src/common] common (setup)
	[src/timing] timing (setup)
	[src/Yio] Yio (setup)
	[src/io] io (setup)
	[src/io_parallel] io_parallel (setup)
	[src/setup] setup (setup)
	[src/interface] interface (setup)
	[src/stop_and_restart] stop_and_restart (setup)
	[src/bz_ops] bz_ops (setup)
grep: /proc/cpuinfo: No such file or directory
	[src/driver] input_file
	[src/driver] launcher
	[src/driver] options_maker
	[src/driver] options_control
	[src/driver] tool_init
	[src/driver] lib_Y_driver.a (lib)
	[interfaces/int_modules] int_modules (setup)
grep: /proc/cpuinfo: No such file or directory
	[interfaces/int_modules] mod_xc2y
	[interfaces/int_modules] mod_com2y
	[interfaces/int_modules] mod_wf2y
	[interfaces/int_modules] libint_modules.a (lib)
	[interfaces/a2y] a2y (setup)
grep: /proc/cpuinfo: No such file or directory
	[interfaces/a2y] netcdf_data
	[interfaces/a2y] a2y_wf
	[interfaces/a2y] a2y_kb_pp
	[interfaces/a2y] a2y
	[interfaces/a2y] a2y_db1
	[interfaces/a2y] a2y (link)
	[lib/qe_pseudo] qe_pseudo (setup)
	[lib/slatec] slatec (setup)
	[lib/math77] math77 (setup)
	[lib/local] local (setup)
	[src/driver] driver (setup)
I checked the p2y and yambo binaries and, they are working.
When I write ypp on terminal, I get :

Code: Select all

Sitangshus-iMac:bin sitangshubhattacharya$ ypp
Trace/BPT trap: 5
Can't decode, what happened with ypps. Any help?

Regards,
Sitangshu
Sitangshu Bhattacharya
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/

User avatar
Nicola Spallanzani
Posts: 93
Joined: Thu Nov 21, 2019 10:15 am

Re: yambo 5.3.0 on macOS @arm

Post by Nicola Spallanzani » Tue Apr 22, 2025 4:00 pm

Dear Sitangshu,
could you please send me some additional information on how you installed Yambo?
Which compilers, MPI, and libraries are you using? How did you install them?
Which configure line did you launch?

Here is a recipe that works on MacBook Air with M1 and M2 processors:
https://wiki.yambo-code.eu/wiki/index.p ... acOS_(ARM)
Please, let us know if this also works for you.

Best,
Nicola
Nicola Spallanzani, PhD
S3 Centre, Istituto Nanoscienze CNR and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu

sitangshu
Posts: 191
Joined: Thu Jan 05, 2017 8:08 am

Re: yambo 5.3.0 on macOS @arm

Post by sitangshu » Wed Apr 23, 2025 8:09 am

Hi Dr. Nicola,

Thanks for your reply.
I configured with : ./configure FC=gfortran MPIFC=mpif90 MPIF77=mpif77 MPICC=mpicc --enable-mpi --enable-slepc-linalg --enable-hdf5-par-io --enable-hdf5-p2y-support --enable-dp
My system do not have intel, but arm M4 with Darwin Kernel Version 24.4.0.

I am also attaching the list.txt with content of brew list --versions. These are seems to be all good.

I am attaching the config.log file and the log directory. In line no. 169 of config.log, although there is: conftest.c:47:10: fatal error: 'malloc.h' file not found. could this be the cause?

Yes, I did followed the page you directed. But I did not installed this version at the first place. Instead, I installed 5.3.0. Later, I installed the former one. But the ypp issue remain same for both these versions.

Regards,
Sitangshu
You do not have the required permissions to view the files attached to this post.
Sitangshu Bhattacharya
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/

User avatar
Nicola Spallanzani
Posts: 93
Joined: Thu Nov 21, 2019 10:15 am

Re: yambo 5.3.0 on macOS @arm

Post by Nicola Spallanzani » Wed Apr 23, 2025 2:19 pm

Hi Sitangshu,
the problem could be related to the usage of the clang executable instead of the gnu-gcc one.

So pay attention on all the variable definitions:

Code: Select all

export OMPI_CC=/opt/homebrew/bin/gcc-14
./configure \
   CC=gcc-14 \
   CPP="gcc-14 -E -P" \
   MPICC=mpicc \
   FC=gfortran-14 \
   F77=gfortran-14 \
   FPP="gfortran-14 -E -P" \
   MPIFC=mpifort \
   --enable-mpi ...
In addition, I see that you have installed version 7.0.0 of libxc using Homebrew. This version is not yet supported by Yambo. To solve this issue, you can install version 6.2.2 by downloading the old formula of the package:

Code: Select all

wget https://raw.githubusercontent.com/Homebrew/homebrew-core/704f7cf7fb583685c406739eae47cff3aa5f9cb2/Formula/lib/libxc.rb
brew install ./libxc.rb
Furthermore, there is also an issue with the "cp" command on macOS, as it is not the GNU version by default. I recommend installing the GNU coreutils via Homebrew. Note that the GNU version of cp is called gcp (with the "g" standing for GNU). Therefore, in the file

Code: Select all

sbin/compilation/object_save_and_restore.sh
you need to replace all occurrences of "cp -u" with "gcp -u".

Let me know if you need more help.
Nicola
Nicola Spallanzani, PhD
S3 Centre, Istituto Nanoscienze CNR and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu

sitangshu
Posts: 191
Joined: Thu Jan 05, 2017 8:08 am

Re: yambo 5.3.0 on macOS @arm

Post by sitangshu » Thu Apr 24, 2025 9:27 am

Thanks Nicola,

I just tried to implement your suggestions. Seems now it is stuck with slepC compilation error. I check the log, it says:

Code: Select all

make[5]: warning: -jN forced in submake: disabling jobserver mode.
makefile:28: lib/slepc/conf/slepcvariables: No such file or directory
makefile:29: /Users/sitangshubhattacharya/Softwares/yambo/lib/slepc/slepc-3.22.2//lib/slepc/conf/slepcvariables: No such file or directory
/Users/sitangshubhattacharya/Softwares/yambo/lib/slepc/slepc-3.22.2/lib/slepc/conf/slepc_rules:14: /Users/sitangshubhattacharya/Softwares/yambo/lib/slepc/slepc-3.22.2//lib/slepc/conf/slepcrules: No such file or directory
make[6]: *** No rule to make target `/Users/sitangshubhattacharya/Softwares/yambo/lib/slepc/slepc-3.22.2//lib/slepc/conf/slepcrules'.  Stop.
make[5]: *** [install] Error 2
Any suggestions?
Regards,
Sitangshu
Sitangshu Bhattacharya
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/

sitangshu
Posts: 191
Joined: Thu Jan 05, 2017 8:08 am

Re: yambo 5.3.0 on macOS @arm

Post by sitangshu » Thu Apr 24, 2025 3:26 pm

ok, so i installed both petsc and slepc seperately. the paths are:

Code: Select all

export PETSC_DIR=$HOME/opt/ext-libs/petsc
export SLEPC_DIR=$HOME/opt/ext-libs/slepc
export PETSC_ARCH=arch-darwin-c-opt
but the yambo ./configure do not detect the slepc libs:

Code: Select all

> MATH: (FFTW_OMP v3) 
#
# [E] BLAS      : -L/opt/homebrew/opt/openblas/lib -lopenblas (for petsc: -L/opt/homebrew/opt/openblas/lib -lopenblas)
# [E] LAPACK    : -L/opt/homebrew/opt/openblas/lib -lopenblas (for petsc: -L/opt/homebrew/opt/openblas/lib -lopenblas)
# [E] SCALAPACK : -L/opt/homebrew/opt/scalapack/lib -lscalapack 
# [E] BLACS     : -L/opt/homebrew/opt/scalapack/lib -lscalapack
# [E] FFT       : -L/opt/homebrew/opt/fftw/lib -lfftw3 -lfftw3_omp
#                 -I/opt/homebrew/opt/fftw/include
# [E] PETSC     : -L/Users/sitangshubhattacharya/opt/ext-libs/petsc/lib -lpetsc -ldl -lstdc// 
#                 -I/Users/sitangshubhattacharya/opt/ext-libs/petsc/include 
# [C] SLEPC     : (LIB)/single/lib/libslepc.a 
#                 -I(LIB)/single/include 
What I am missing here:

Code: Select all

export OMPI_CC=/opt/homebrew/bin/gcc-14
export PETSC_DIR=$HOME/opt/ext-libs/petsc
export SLEPC_DIR=$HOME/opt/ext-libs/slepc
export PETSC_ARCH=arch-darwin-c-opt
export OPT=/opt/homebrew/opt

./configure \
  CC=gcc-14 \
  CPP="gcc-14 -E -P" \
  MPICC=mpicc \
  FC=gfortran-14 \
  F77=gfortran-14 \
  FPP="gfortran-14 -E -P" \
  MPIFC=mpifort \
  --enable-mpi \
  --enable-open-mp \
  --disable-hdf5-par-io \
  --enable-time-profile \
  --enable-memory-profile \
  --enable-msgs-comps \
  --with-blas-libs="-L$OPT/openblas/lib -lopenblas" \
  --with-lapack-libs="-L$OPT/openblas/lib -lopenblas" \
  --with-libxc-path=$OPT/libxc \
  --with-fft-path=$OPT/fftw \
  --with-hdf5-path=$OPT/hdf5 \
  --with-netcdf-path=$OPT/netcdf \
  --with-netcdff-path=$OPT/netcdf-fortran \
  --enable-par-linalg \
  --with-scalapack-libs="-L$OPT/scalapack/lib -lscalapack" \
  --with-blacs-libs="-L$OPT/scalapack/lib -lscalapack" \
  --with-petsc-path=$HOME/opt/ext-libs/petsc \
  --with-slepc-libs=$HOME/opt/ext-libs/slepc\lib \
  --with-slepc-incs=$HOME/opt/ext-libs/slepc\include \
  --with-slepc-path=$HOME/opt/ext-libs/slepc \
  --with-slepc-libdir=$HOME/opt/ext-libs/slepc\lib \
  --with-extlibs-path=$HOME/opt/ext-libs 
Regards
Sitangshu
Sitangshu Bhattacharya
Indian Institute of Information Technology-Allahabad
India
Web-page: http://profile.iiita.ac.in/sitangshu/
Institute: http://www.iiita.ac.in/

batman
Posts: 14
Joined: Sun Jun 20, 2021 2:04 pm

Re: yambo 5.3.0 on macOS @arm

Post by batman » Fri Apr 25, 2025 6:36 am

Dear Sitangshu,
sitangshu wrote: Tue Apr 22, 2025 3:30 pm I checked the p2y and yambo binaries and, they are working.
When I write ypp on terminal, I get :

Code: Select all

Sitangshus-iMac:bin sitangshubhattacharya$ ypp
Trace/BPT trap: 5
Can't decode, what happened with ypps. Any help?
This is very likely due to buggy ypp executables. A bug was fixed couple of days ago specifically for ypp. May be you could give it a try by cloning yambo directly from offical GitHub repository. You can do this by:

Code: Select all

git clone https://github.com/yambo-code/yambo
Then you can compile how you did it in the first place (where you could see all executables). Careful with libxc version as pointed out by Nicola. Better to leave it to yambo and allow for internal compilation.



Best regards,
Murali
Muralidhar Nalabothula
Doctoral student at Department of Physics and Materials Science,
Université du Luxembourg

Post Reply