Merge branch '117-openblas-0-3-13' into 'master'

Resolve "OpenBLAS 0.3.13"

Closes #117

See merge request Pmodules/buildblocks!161
This commit is contained in:
2021-02-24 13:45:15 +01:00
3 changed files with 65 additions and 51 deletions

View File

@@ -3,59 +3,11 @@
pbuild::set_download_url "http://github.com/xianyi/$P/archive/v${V_PKG}.tar.gz"
pbuild::add_to_group 'Compiler'
pbuild::compile_in_sourcetree
pbuild::install_docfiles 'LICENSE' 'README.md'
#pbuild::set_supported_compilers 'gcc' 'intel' 'clang-macos'
pbuild::configure() {
case ${COMPILER} in
gcc )
CC='gcc'
;;
intel )
CC='icc'
;;
clang-macos )
CC='gcc'
;;
* )
die 3 "Oops: unknown compiler: ${COMPILER}"
;;
esac
cat <<EOF > "${SRC_DIR}/make.inc"
SHELL = /bin/sh
PLAT =
DRVOPTS = \$(NOOPT)
ARCHFLAGS= -ru
EOF
echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule"
if pbuild::use_flag "avx"; then
echo "NO_AVX = 0" >> "${SRC_DIR}/Makefile.rule"
else
echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule"
fi
if pbuild::use_flag "avx2"; then
echo "NO_AVX2 = 0" >> "${SRC_DIR}/Makefile.rule"
else
echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule"
fi
if pbuild::use_flag "omp"; then
echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule"
else
echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule"
fi
}
pbuild::post_configure_Darwin() {
sed -i.bak "s/MACOSX_DEPLOYMENT_TARGET=.*/MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET/" \
"${SRC_DIR}/Makefile.system"
}
pbuild::post_install() {
# We have to build shared libs and remove them here.
# Building with NOSHARED gives an error during install -
# due to a bug in the Makefile(s).
rm -f "${PREFIX}/lib/"lib*.{so,dylib}
rm -f "${PREFIX}/lib/"lib*.{so,dylib}.*
pbuild::pre_configure() {
pbuild::add_configure_args "-DCMAKE_BUILD_TYPE=Release"
pbuild::add_configure_args "-DDYNAMIC_ARCH=ON"
}

61
Compiler/OpenBLAS/build-0.3.10 Executable file
View File

@@ -0,0 +1,61 @@
#!/usr/bin/env modbuild
pbuild::set_download_url "http://github.com/xianyi/$P/archive/v${V_PKG}.tar.gz"
pbuild::add_to_group 'Compiler'
pbuild::compile_in_sourcetree
pbuild::install_docfiles 'LICENSE' 'README.md'
#pbuild::set_supported_compilers 'gcc' 'intel' 'clang-macos'
pbuild::configure() {
case ${COMPILER} in
gcc )
CC='gcc'
;;
intel )
CC='icc'
;;
clang-macos )
CC='gcc'
;;
* )
die 3 "Oops: unknown compiler: ${COMPILER}"
;;
esac
cat <<EOF > "${SRC_DIR}/make.inc"
SHELL = /bin/sh
PLAT =
DRVOPTS = \$(NOOPT)
ARCHFLAGS= -ru
EOF
echo "USE_SIMPLE_THREADED_LEVEL3 = 1" >> "${SRC_DIR}/Makefile.rule"
if pbuild::use_flag "avx"; then
echo "NO_AVX = 0" >> "${SRC_DIR}/Makefile.rule"
else
echo "NO_AVX = 1" >> "${SRC_DIR}/Makefile.rule"
fi
if pbuild::use_flag "avx2"; then
echo "NO_AVX2 = 0" >> "${SRC_DIR}/Makefile.rule"
else
echo "NO_AVX2 = 1" >> "${SRC_DIR}/Makefile.rule"
fi
if pbuild::use_flag "omp"; then
echo "USE_THREAD = 1" >> "${SRC_DIR}/Makefile.rule"
else
echo "USE_THREAD = 0" >> "${SRC_DIR}/Makefile.rule"
fi
}
pbuild::post_configure_Darwin() {
sed -i.bak "s/MACOSX_DEPLOYMENT_TARGET=.*/MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET/" \
"${SRC_DIR}/Makefile.system"
}
pbuild::post_install() {
# We have to build shared libs and remove them here.
# Building with NOSHARED gives an error during install -
# due to a bug in the Makefile(s).
rm -f "${PREFIX}/lib/"lib*.{so,dylib}
rm -f "${PREFIX}/lib/"lib*.{so,dylib}.*
}

View File

@@ -9,3 +9,4 @@ OpenBLAS/0.3.7 stable gcc/{7.4.0,8.3.0,9.2.0}
OpenBLAS/0.3.9 stable gcc/{7.5.0,8.4.0,9.3.0,10.1.0}
OpenBLAS/0.3.10 stable gcc/{7.5.0,8.4.0,9.3.0,10.1.0}
OpenBLAS/0.3.13 unstable gcc/{7.5.0,8.4.0,9.3.0,10.2.0} b:cmake/3.15.5 b:binutils/2.29