t-sakashita / rokko

Integrated Interface for libraries of eigenvalue decomposition
Boost Software License 1.0
10 stars 2 forks source link

ScaLAPACKのビルドのエラー #592

Closed t-sakashita closed 3 years ago

t-sakashita commented 3 years ago

rokko/3rd-party/install/ScaLAPACK/macos.sh

[ 33%] Building Fortran object CMakeFiles/scalapack.dir/SRC/psstedc.f.o
/opt/local/bin/mpif90 -DAdd_ -Dscalapack_EXPORTS  -O2 -DNDEBUG -O2 -fPIC -c /Users/sakashitatatsuya/build/scalapack-2.1.0/SRC/psstedc.f -o CMakeFiles/scalapack.dir/SRC/psstedc.f.o
/Users/sakashitatatsuya/build/scalapack-2.1.0/SRC/psstebz.f:778:65:

  775 |             CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', 1, 1, TORECV, 1, 0,
      |                                                         2        
......
  778 |                CALL IGEBR2D( ONEDCONTEXT, 'ALL', ' ', TORECV, 1, IWORK,
      |                                                                 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make[2]: *** [CMakeFiles/scalapack.dir/SRC/psstebz.f.o] Error 1
t-sakashita commented 3 years ago

https://github.com/spack/spack/issues/17713 https://github.com/spack/spack/issues/19964

t-sakashita commented 3 years ago

-DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch"を付けると、ビルドが成功した。 0782d7150517a9ef435cf5c1f2dbd45caa7d877d

https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html

t-sakashita commented 3 years ago

コンパイラのバージョン

mpif90 --version
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.