Open16
BinaryBuilder.jlでHPhiをbuildしたい
- 32 bit OSはsupportしていない (https://github.com/issp-center-dev/HPhi/issues/77)
- BLAS/LAPACK必須.
-
OpenBLAS_jll
はFortran用のPATHが解決できない模様 -
MKL_jll
は動くがarm系のarchをsupportしていない -
OpenBLAS_jll
+LAPACK_jll
で何とかなるか...?
-
i686
, armv6l
, armv7l
は32bit
musl
はglibcの代わりになる(サポートしているかは不明)
cd HPhi-3.5.1
cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -S . -Bbuild -DCONFIG=gcc -DENABLE_MPI=OFF
cmake --build build -j16
cmake --build build --target install
-
find_package(MPI COMPONENTS Fortran REQUIRED)
にした方が良い?
-- Check for working Fortran compiler: /workspace/destdir/bin/mpif90 - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestFortranCompiler.cmake:54 (message):
The Fortran compiler
"/workspace/destdir/bin/mpif90"
is not able to compile a simple test program.
It fails with the following output:
crossbuild特有の問題っぽい?↓
x86_64-linux-musl
+OpenBLAS_jll
+OpenMPI_jll
作業log
cmake -S./HPhi-3.5.2/ -Bbuild -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DBLAS_LIBRARIES=$libdir/libopenblas64_.so -DLAPACK_LIBRARIES=$libdir/libopenblas64_.so -DCMAKE_Fortran_COMPILER=mpif90
enable_language(C Fortran)
はenable_language(Fortran)
にした方が良いっぽい
修正
sed -i -e "s/C Fortran/Fortran/" HPhi-3.5.2/CMakeLists.txt
$includedir
と$libdir
に必要なpathが入っている
platform一覧
[ ] Platform("i686", "linux"; libc = "glibc")
[ ] Platform("x86_64", "linux"; libc = "glibc")
[ ] Platform("aarch64", "linux"; libc = "glibc")
[ ] Platform("armv6l", "linux"; call_abi = "eabihf", libc = "glibc")
[ ] Platform("armv7l", "linux"; call_abi = "eabihf", libc = "glibc")
[ ] Platform("powerpc64le", "linux"; libc = "glibc")
[ ] Platform("i686", "linux"; libc = "musl")
[ ] Platform("x86_64", "linux"; libc = "musl")
[ ] Platform("aarch64", "linux"; libc = "musl")
[ ] Platform("armv6l", "linux"; call_abi = "eabihf", libc = "musl")
[ ] Platform("armv7l", "linux"; call_abi = "eabihf", libc = "musl")
[ ] Platform("x86_64", "macos"; )
[ ] Platform("aarch64", "macos"; )
[ ] Platform("x86_64", "freebsd"; )
[ ] Platform("i686", "windows"; )
[ ] Platform("x86_64", "windows"; )
64bitかつx86_64
かaarch64
だけ残す
[ ] Platform("x86_64", "linux"; libc = "glibc")
[ ] Platform("aarch64", "linux"; libc = "glibc")
[ ] Platform("x86_64", "linux"; libc = "musl")
[ ] Platform("aarch64", "linux"; libc = "musl")
[ ] Platform("x86_64", "macos"; )
[ ] Platform("aarch64", "macos"; )
[ ] Platform("x86_64", "freebsd"; )
[ ] Platform("x86_64", "windows"; )
-
musl
はいけるのか? -
windows
はいけるのか? -
freebsd
はいけるのか?
いけるのかよくわかないのを外す
[ ] Platform("x86_64", "linux"; libc = "glibc")
[ ] Platform("aarch64", "linux"; libc = "glibc")
[ ] Platform("x86_64", "macos"; )
[ ] Platform("aarch64", "macos"; )
3.5.2のgzipアドレス
Platform("x86_64", "linux"; libc = "glibc")
sed -i -e "s/C Fortran/Fortran/" HPhi-3.5.2/CMakeLists.txt
cmake -S./HPhi-3.5.2/ -Bbuild -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DBLAS_LIBRARIES=$libdir/libopenblas64_.so -DLAPACK_LIBRARIES=$libdir/libopenblas64_.so -DCMAKE_Fortran_COMPILER=mpifort
cmake --build build --parallel ${nproc}
失敗
Fatal Error: Cannot open module file ‘mpi.mod’ for reading at (1): No such file or directory
link path ($libdir
=/workspace/destdir/lib
)をわからせる必要がある
LAPACK関連のpathも見つけられてないっぽいので-lopenblas
fortran optionが必要かも?