Closed jaehoonkoo closed 2 years ago
It seems to be that you somehow still uses Clang, but the script was meant to use GNU only. Can you attach your modified config_macbook.zsh?
I am retying by installing from scratch. I am getting the error in 2.2.2 GPTune C code. I can see that AppleClang is picked for C compiler identification. Should it be changed?
conda create --name gptune python=3.7 conda activate gptune
git clone https://github.com/gptune/GPTune.git cd GPTune export GPROOT=$PWD
export PYTHONWARNINGS=ignore export CCC=/usr/local/bin/mpicc export CCCPP=/usr/local/bin/mpic++ export FTN=/usr/local/bin/mpif90 export RUN=/usr/local/bin/mpirun export BLAS_LIB=/usr/local/Cellar/openblas/0.3.19/lib/libblas.dylib export LAPACK_LIB=/usr/local/Cellar/lapack/3.10.0/lib/liblapack.dylib export SCALAPACK_LIB=/usr/local/Cellar/scalapack/2.1.0_3/lib/libscalapack.dylib
pip install --upgrade --user -r requirements_mac.txt
cd $GPROOT mkdir -p build cd build cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_COMPILER=$CCCPP -DCMAKE_C_COMPILER=$CCC -DCMAKE_Fortran_COMPILER=$FTN -DTPL_BLAS_LIBRARIES=$BLAS_LIB -DTPL_LAPACK_LIBRARIES=$LAPACK_LIB -DTPL_SCALAPACK_LIBRARIES=$SCALAPACK_LIB make
Then, I got the following errors.
(gptune) ➜ build (master) ✔ cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_COMPILER=$CCCPP -DCMAKE_C_COMPILER=$CCC -DCMAKE_Fortran_COMPILER=$FTN -DTPL_BLAS_LIBRARIES=$BLAS_LIB -DTPL_LAPACK_LIBRARIES=$LAPACK_LIB -DTPL_SCALAPACK_LIBRARIES=$SCALAPACK_LIB -- The C compiler identification is AppleClang 12.0.0.12000032 -- The CXX compiler identification is AppleClang 12.0.0.12000032 -- The Fortran compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/local/bin/mpicc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/local/bin/mpic++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Checking whether Fortran compiler has -isysroot -- Checking whether Fortran compiler has -isysroot - yes -- Checking whether Fortran compiler supports OSX deployment target flag -- Checking whether Fortran compiler supports OSX deployment target flag - yes -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Check for working Fortran compiler: /usr/local/bin/mpif90 - skipped -- Include /Users/jkoo/research/github/GPTune/cmake/setup_external_macros.cmake -- gptuneclcm will be built as a shared library. -- Performing Test qoptmatmul -- Performing Test qoptmatmul - Failed -- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) -- Found OpenMP_CXX: -Xclang -fopenmp (found version "4.5") -- Found OpenMP_Fortran: -fopenmp (found version "4.5") -- Could NOT find OpenMP (missing: OpenMP_C_FOUND) (found version "4.5") -- Using TPL_BLAS_LIBRARIES='/usr/local/Cellar/openblas/0.3.19/lib/libblas.dylib' -- Using TPL_LAPACK_LIBRARIES='/usr/local/Cellar/lapack/3.10.0/lib/liblapack.dylib' -- Using TPL_SCALAPACK_LIBRARIES='/usr/local/Cellar/scalapack/2.1.0_3/lib/libscalapack.dylib' -- Could NOT find MPI_C (missing: MPI_C_WORKS) -- Found MPI_CXX: /usr/local/bin/mpic++ (found version "3.1") -- Found MPI_Fortran: /usr/local/bin/mpif90 (found version "3.1") -- Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1") -- Found Python3: /usr/local/Frameworks/Python.framework/Versions/3.9/bin/python3.9 (found version "3.9.9") found components: Interpreter Development Development.Module Development.Embed -- Python3 interpreter: /usr/local/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -- Python3 installation directory: /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages -- GPTune will be installed in the default location: /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages -- Configuring done -- Generating done -- Build files have been written to: /Users/jkoo/research/github/GPTune/build
(gptune) ➜ build (master) ✗ make [ 7%] Building C object CMakeFiles/_gptuneclcm.dir/gptuneclcm/lcm.c.o error: invalid argument '-std=c++11' not allowed with 'C' make[2]: [CMakeFiles/_gptuneclcm.dir/gptuneclcm/lcm.c.o] Error 1 make[1]: [CMakeFiles/_gptuneclcm.dir/all] Error 2 make: *** [all] Error 2
Setting the following export CCC=/usr/local/bin/mpicc export CCCPP=/usr/local/bin/mpic++ export FTN=/usr/local/bin/mpif90 will pick clang for c and c++ and gfortran for fortran. I think it's always more consistent to use GNU for all of them. And you do need to install openmpi for source using GNU compilers. I see you commented the installation of openmpi, which was causing failure of your two trials. More specifically, you don't have /Users/jkoo/research/github/GPTune/openmpi-4.0.1/bin and /Users/jkoo/research/github/GPTune/openmpi-4.0.1/lib installed correctly.
I would suggest fixing the openmpi build first. Indeed, building openmpi from source using gnu compilers is slow. But you only need to do it once. Once it's done, you can set MPIFromSource=0 at line 13, and then edit line 62-70 accordingly, and then run config_macbook.zsh.
Thank you for your comments.
I was able to fix it on my macOS Monterey 12.1 (21C52)
, such as:
brew reinstall gcc
brew reinstall gfortran
add /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib to PATH, LD_LIBRARY_PATH, LIBRARY_PATH, DYLD_LIBRARY_PATH
Hi @liuyangzhuan,
I am trying to install GPTune on Mac os (with sudo access).
I am using config_macbook.zsh by running
zsh config_macbook.zsh
.I set options for my settings. However, I have several errors while installing.
Is there any tutorial to provide a clean version of installing gptune on macOS or linux? Any help will be appreciated.