Skip to content

Commit 192e939

Browse files
eschnettamontoison
andauthored
SCALAPACK32: New version 2.2.2 (#12231)
* SCALAPACK32: New version 2.2.2 * SCALAPACK32: Remove superfluous dependency * SCALAPACK32: Require GCC 5 * SCALAPACK32: Avoid unsupported architectures * Compile SCALAPACK32 with LBT --------- Co-authored-by: Alexis Montoison <[email protected]>
1 parent 71224ab commit 192e939

File tree

3 files changed

+24
-68
lines changed

3 files changed

+24
-68
lines changed

S/SCALAPACK32/build_tarballs.jl

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,28 @@ const YGGDRASIL_DIR = "../.."
44
include(joinpath(YGGDRASIL_DIR, "platforms", "mpi.jl"))
55

66
name = "SCALAPACK32"
7-
version = v"2.2.1"
8-
scalapack_version = v"2.2.0"
7+
version = v"2.2.2"
98

109
sources = [
11-
GitSource("https://github.com/Reference-ScaLAPACK/scalapack", "0128dc24c6d018b61ceaac080640014e1d5ec344"),
12-
DirectorySource("./bundled")
10+
GitSource("https://github.com/Reference-ScaLAPACK/scalapack", "25935e1a7e022ede9fd71bd86dcbaa7a3f1846b7"),
11+
DirectorySource("bundled")
1312
]
1413

1514
# Bash recipe for building across all platforms
1615
script = raw"""
1716
mkdir -p ${libdir}
1817
cd $WORKSPACE/srcdir/scalapack
1918
20-
# the patch prevents running foreign executables, which fails on most platforms
21-
# we instead set CDEFS manually below
22-
for f in ${WORKSPACE}/srcdir/patches/*.patch; do
23-
atomic_patch -p1 ${f}
24-
done
25-
2619
# use Make instead of CMake to compile SCALAPACK on Windows platforms
2720
# CMake is unable to detect Microsoft-MPI
28-
cp ${WORKSPACE}/srcdir/patches/SLmake.inc SLmake.inc
21+
cp ${WORKSPACE}/srcdir/files/SLmake.inc SLmake.inc
2922
3023
if [[ "${target}" == *mingw* ]]; then
3124
make lib
32-
$FC -shared $(flagon -Wl,--whole-archive) libscalapack32.a $(flagon -Wl,--no-whole-archive) -lopenblas -L$libdir -lmsmpi -o ${libdir}/libscalapack32.${dlext}
25+
$FC -shared $(flagon -Wl,--whole-archive) libscalapack32.a $(flagon -Wl,--no-whole-archive) -lblastrampoline-5 -L$libdir -lmsmpi -o ${libdir}/libscalapack32.${dlext}
3326
else
3427
CPPFLAGS=()
35-
CFLAGS=()
28+
CFLAGS=(-Wno-error=implicit-function-declaration)
3629
FFLAGS=(-ffixed-line-length-none)
3730
3831
# Add `-fallow-argument-mismatch` if supported
@@ -42,14 +35,20 @@ else
4235
fi
4336
rm -f empty.*
4437
45-
OPENBLAS=(-lopenblas)
38+
# Add `-fcray-pointer` if supported
39+
: >empty.f
40+
if gfortran -c -fcray-pointer empty.f >/dev/null 2>&1; then
41+
FFLAGS+=(-fcray-pointer)
42+
fi
43+
rm -f empty.*
4644
45+
LBT=(-lblastrampoline)
4746
MPILIBS=()
48-
if grep -q MPICH "${prefix}/include/mpi.h"; then
47+
if [[ ${bb_full_target} == *mpich* ]]; then
4948
MPILIBS=(-lmpifort -lmpi)
50-
elif grep -q MPItrampoline "${prefix}/include/mpi.h"; then
49+
elif [[ ${bb_full_target} == *mpitrampoline* ]]; then
5150
MPILIBS=(-lmpitrampoline)
52-
elif grep -q OMPI_MAJOR_VERSION $prefix/include/mpi.h; then
51+
elif [[ ${bb_full_target} == *openmpi* ]]; then
5352
MPILIBS=(-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi)
5453
fi
5554
@@ -59,13 +58,12 @@ else
5958
-DCMAKE_Fortran_FLAGS="${CPPFLAGS[*]} ${FFLAGS[*]}"
6059
-DCMAKE_C_FLAGS="${CPPFLAGS[*]} ${CFLAGS[*]}"
6160
-DCMAKE_BUILD_TYPE=Release
62-
-DBLAS_LIBRARIES="${OPENBLAS[*]} ${MPILIBS[*]}"
63-
-DLAPACK_LIBRARIES="${OPENBLAS[*]}"
61+
-DBLAS_LIBRARIES="${LBT[*]} ${MPILIBS[*]}"
62+
-DLAPACK_LIBRARIES="${LBT[*]}"
6463
-DSCALAPACK_BUILD_TESTS=OFF
6564
-DBUILD_SHARED_LIBS=ON
66-
-DMPI_BASE_DIR="${prefix}")
67-
68-
export CDEFS="Add_"
65+
-DMPI_BASE_DIR="${prefix}"
66+
-DCDEFS=Add_)
6967
7068
mkdir build
7169
cd build
@@ -106,14 +104,7 @@ augment_platform_block = """
106104

107105
platforms = expand_gfortran_versions(supported_platforms())
108106

109-
platforms, platform_dependencies = MPI.augment_platforms(platforms; MPItrampoline_compat="5.2.1")
110-
111-
# Avoid platforms where the MPI implementation isn't supported
112-
# OpenMPI
113-
platforms = filter(p -> !(p["mpi"] == "openmpi" && arch(p) == "armv6l" && libc(p) == "glibc"), platforms)
114-
# MPItrampoline
115-
platforms = filter(p -> !(p["mpi"] == "mpitrampoline" && libc(p) == "musl"), platforms)
116-
platforms = filter(p -> !(p["mpi"] == "mpitrampoline" && Sys.isfreebsd(p)), platforms)
107+
platforms, platform_dependencies = MPI.augment_platforms(platforms)
117108

118109
# The products that we will ensure are always built
119110
products = [
@@ -123,10 +114,11 @@ products = [
123114
# Dependencies that must be installed before this package can be built
124115
dependencies = [
125116
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
126-
Dependency(PackageSpec(name="OpenBLAS32_jll", uuid="656ef2d0-ae68-5445-9ca0-591084a874a2"))
117+
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"), compat="5.4.0"),
127118
]
128119
append!(dependencies, platform_dependencies)
129120

130121
# Build the tarballs.
122+
# We need at least GCC 5 for MPICH
131123
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
132-
augment_platform_block, julia_compat="1.6")
124+
augment_platform_block, julia_compat="1.9", preferred_gcc_version=v"5")
File renamed without changes.

S/SCALAPACK32/bundled/patches/scalapack.patch

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)