Re: MacOS installation error, OpenMX-3.9 ( No.5 )
Date: 2022/04/19 19:19
Name: Takeru Nakashima

>>1
Dear Yamaguchi-san

Hello, I'm trying to compile openmx(3.9)+patch(3.9.9) in m1 mac too,
following to your comments, Yamaguchi-san.
(using homebrew)

---------------------------- >>>
2. native with Homebrew (Clang+GFortran+OpenMPI+ScaLAPACK+FFTW)
CC = mpicc -O3 -Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/13.0.0/include -Wno-error=implicit-function-declaration -Dnosse -I/opt/homebrew/Cellar/fftw/3.3.10/include
FC = mpif90 -O3 -ffast-math -march=native -fopenmp -Dnosse -fallow-argument-mismatch
LIB= -L/opt/homebrew/Cellar/scalapack/2.1.0_3/lib -lscalapack -llapack -lblas -L/opt/homebrew/Cellar/fftw/3.3.10/lib -lfftw3 -lmpi_mpifh -L/opt/homebrew/Cellar/llvm/13.0.0_1/lib -lomp -lpthread -L/opt/homebrew/Cellar/gcc/11.2.0_3/lib/gcc/11 -lgfortran
---------------------------- <<<

and get the similar error as comment 2, >>2
so I replaced "Set_ProExpn_VNA.c" uploaded in comment No3. >>3
But, the duplicate symbol errors appeared as follows
Can I ask you how to solve this problems?
------------------------------------------------------------- >>>
...
duplicate symbol '_GridZ_EH0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
duplicate symbol '_GridY_EH0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
duplicate symbol '_GridX_EH0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
duplicate symbol '_Max_TGN_EH0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
duplicate symbol '_TGN_EH0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
duplicate symbol '_Slater_F0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
duplicate symbol '_NPT_WV_F0' in:
openmx.o
Cluster_DFT_Optical_ScaLAPACK.o
ld: 214343 duplicate symbols for architecture arm64
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [openmx] Error 1
---------------------------------------------------------------- <<<
I would appreciate if you help me.

Sincerely,
Takeru Nakashima