Skip to content

Commit

Permalink
MILLEPEDE: Allow pede to compile on macos (m2)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Schlepper <[email protected]>
  • Loading branch information
f3sch committed Aug 21, 2024
1 parent 9571763 commit 32851d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions millepede-ii.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ tag: "V04-16-00"
source: https://gitlab.desy.de/claus.kleinwort/millepede-ii.git
requires:
- zlib
- openmp
- "openmp:(?!osx.*)"
- OpenBLAS
- "GCC-Toolchain:(?!osx)"
- "gfortran-system:(osx.*)"

build_requires:
- alibuild-recipe-tools
---
Expand All @@ -16,13 +18,17 @@ rsync -av --delete --exclude="**/.git" ${SOURCEDIR}/ .

case $ARCHITECTURE in
osx*)
[[ ! $ZLIB_ROOT ]] && ZLIB_ROOT=`brew --prefix zlib` ;;
[[ ! $ZLIB_ROOT ]] && ZLIB_ROOT=$(brew --prefix zlib)

Check notice on line 21 in millepede-ii.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Prefer explicit -n to check non-empty string (or use =/-ne to check boolean/integer). [SC2244]
[[ ! $GFORTRAN ]] && GFORTRAN=gfortran

Check notice on line 22 in millepede-ii.sh

View workflow job for this annotation

GitHub Actions / alidistlint

Prefer explicit -n to check non-empty string (or use =/-ne to check boolean/integer). [SC2244]
;;
esac

make pede\
${ZLIB_ROOT:+ ZLIB_INCLUDES_DIR=${ZLIB_ROOT}/include ZLIB_LIBS_DIR=${ZLIB_ROOT}/lib}\
${OPENBLAS_ROOT:+ SUPPORT_LAPACK64=yes LAPACK64=OPENBLAS LAPACK64_LIBS_DIR=${OPENBLAS_ROOT}/lib LAPACK64_LIB=openblas}

${OPENBLAS_ROOT:+ SUPPORT_LAPACK64=yes LAPACK64=OPENBLAS LAPACK64_LIBS_DIR=${OPENBLAS_ROOT}/lib LAPACK64_LIB=openblas}\
${GFORTRAN:+ GCC=${GFORTRAN}}


rsync -a --delete pede ${INSTALLROOT}/bin/

#ModuleFile
Expand Down
2 changes: 1 addition & 1 deletion openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "%(tag_basename)s"
tag: "v0.3.27"
source: https://github.com/xianyi/OpenBLAS.git
requires:
- openmp
- "openmp:(?!osx.*)"
- "GCC-Toolchain:(?!osx)"
build_requires:
- CMake
Expand Down

0 comments on commit 32851d7

Please sign in to comment.