Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions repos/spack_repo/builtin/packages/acfl/detection_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,22 @@ paths:
echo "InstalledDir: /usr/bin"
platforms: [linux]
results: []

- layout: # does not detect ATfL
- executables:
- "bin/armclang"
- "bin/armclang++"
script: |
echo "Arm Toolchain for Linux 20.1 clang version 20.1.0"
echo "Target: aarch64--linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /opt/arm/arm-toolchain-for-linux-20.1/bin"
- executables:
- "bin/armflang"
script: |
echo "Arm Toolchain for Linux 20.1 flang version 20.1.0"
echo "Target: aarch64--linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /opt/arm/arm-toolchain-for-linux-20.1/bin"
platforms: [linux]
results: []
30 changes: 17 additions & 13 deletions repos/spack_repo/builtin/packages/armpl_gcc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ class ArmplGcc(Package):

conflicts("%msvc", msg="Not compatible with MSVC compiler.")

variant("examples", default=True, description="Build and run ArmPL examples after install")
variant("ilp64", default=False, description="use ilp64 specific Armpl library")
variant("shared", default=True, description="enable shared libs")
variant(
Expand All @@ -417,11 +418,11 @@ class ArmplGcc(Package):
provides("lapack")
provides("fftw-api@3")

depends_on("c", type="build")
depends_on("fortran", type="build")
requires("^[virtuals=c,fortran] gcc", msg="armpl-gcc is only compatible with the GCC compiler")

depends_on("gmake", type="build")
with when("+examples"):
depends_on("c", type="build")
depends_on("fortran", type="build")
depends_on("gmake", type="build")
requires("^[virtuals=c,fortran] gcc", msg="armpl-gcc examples require GCC toolchain")

# Run the installer with the desired install directory
def install(self, spec, prefix):
Expand Down Expand Up @@ -476,13 +477,16 @@ def blas_libs(self):
recursive=True,
)

# Link the same libraries as the gcc used for Arm PL
armpl_libs += find_libraries(
["libgomp", "libm"],
root=self["gcc"].prefix,
shared=self.spec.satisfies("+shared"),
recursive=True,
)
# Link the same libraries as the gcc used for Arm PL, but only when
# building/running examples. Avoid injecting GCC runtimes by default
# to keep non-GCC toolchains (e.g., ATfL) conflict-free.
if self.spec.satisfies("+examples"):
armpl_libs += find_libraries(
["libgomp", "libm"],
root=self["gcc"].prefix,
shared=self.spec.satisfies("+shared"),
recursive=True,
)

return armpl_libs

Expand Down Expand Up @@ -520,7 +524,7 @@ def setup_run_environment(self, env: EnvironmentModifications) -> None:
else:
env.prepend_path("LD_LIBRARY_PATH", join_path(armpl_dir, "lib"))

@run_after("install")
@run_after("install", when="+examples")
def check_install(self):
armpl_dir = get_armpl_prefix(self.spec)
suffix = get_armpl_suffix(self.spec)
Expand Down
53 changes: 53 additions & 0 deletions repos/spack_repo/builtin/packages/atfl/detection_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
paths:
- layout:
- executables:
- "bin/armclang"
- "bin/armclang++"
script: |
echo "Arm Toolchain for Linux 20.1 clang version 20.1.0"
echo "Target: aarch64--linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /opt/arm/arm-toolchain-for-linux-20.1/bin"
- executables:
- "bin/armflang"
script: |
echo "Arm Toolchain for Linux 20.1 flang version 20.1.0"
echo "Target: aarch64--linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /opt/arm/arm-toolchain-for-linux-20.1/bin"
platforms: [linux]
results:
- spec: [email protected]
extra_attributes:
compilers:
c: ".*/bin/armclang$"
cxx: ".*/bin/armclang[+][+]$"
fortran: ".*/bin/armflang$"

# Negative tests: ensure ATfL does not detect other compilers
- layout: # does not detect upstream clang/LLVM
- executables:
- "bin/clang"
- "bin/clang++"
script: |
echo "clang version 20.1.0 (https://github.com/llvm/llvm-project abcdef)"
echo "Target: x86_64-unknown-linux-gnu"
echo "Thread model: posix"
echo "InstalledDir: /usr/bin"
platforms: [linux]
results: []

- layout: # does not detect ACfL
- executables:
- "bin/armclang"
- "bin/armclang++"
- "bin/armflang"
script: |
echo "Arm C/C++/Fortran Compiler version 19.3.1 (build number 75) (based on LLVM 7.0.2)"
echo "Target: aarch64--linux-gnu"
echo "Thread model: posix"
echo "InstalledDir:"
echo "/opt/arm/arm-hpc-compiler-19.3.5_Generic-AArch64_RHEL-7_aarch64-linux/bin"
platforms: [linux]
results: []

Loading
Loading