Repository navigation
Expand file tree
/
Copy pathcompile_fftw_examples.sh
More file actions
executable file
·63 lines (60 loc) · 2.26 KB
/
Copy pathcompile_fftw_examples.sh
File metadata and controls
executable file
·63 lines (60 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/bash
################################################################################
# Config
################################################################################
if command -v spack &> /dev/null; then
echo "Spack command found, checking for environments..."
# Get current hostname
HOSTNAME=$(hostname -s)
if [[ "$HOSTNAME" == "ipvs-epyc1" ]]; then
module load gcc/14.2.0
# Check if the spack environment exists
SPACK_ENV=hpxfft_x86_epyc
if spack env list | grep -q "${SPACK_ENV}"; then
echo "Found ${SPACK_ENV} environment, activating it."
spack env activate ${SPACK_ENV}
fi
elif [[ "$HOSTNAME" == "sven0" || "$HOSTNAME" == "sven1" ]]; then
echo "tbd."
elif [[ $(uname -i) == "aarch64" ]]; then
spack load gcc@14.2.0
# Check if the spack environment exists
SPACK_ENV=hpxfft_arm_ookami
if spack env list | grep -q "${SPACK_ENV}"; then
echo "Found ${SPACK_ENV} environment, activating it."
spack env activate ${SPACK_ENV}
fi
elif [[ "$HOSTNAME" == "simcl1n1" || "$HOSTNAME" == "simcl1n2" ]]; then
module load gcc/14.1.0
# Check if the spack environment exists
SPACK_ENV=hpxfft_x86_simcl
if spack env list | grep -q "${SPACK_ENV}"; then
echo "Found ${SPACK_ENV} environment, activating it."
spack env activate ${SPACK_ENV}
fi
elif [[ "$HOSTNAME" == buran0[0-9] || "$HOSTNAME" == buran1[0-5] ]]; then
module load gcc/14.2.0
# Check if the spack environment exists
SPACK_ENV=hpxfft_x86_buran
if spack env list | grep -q "${SPACK_ENV}"; then
echo "Found ${SPACK_ENV} environment, activating it."
spack env activate ${SPACK_ENV}
fi
else
echo "Hostname is $HOSTNAME — no action taken."
fi
else
echo "Spack command not found. Building example without Spack."
# Assuming that Spack is not required on given system
fi
################################################################################
# Compilation
################################################################################
cd examples/fftw
BUILD_DIR=build
CMAKE_COMMAND=cmake
rm -rf $BUILD_DIR && mkdir $BUILD_DIR && cd $BUILD_DIR
$CMAKE_COMMAND .. -DCMAKE_BUILD_TYPE=Release
make -j
mkdir -p $BUILD_DIR/result/runtimes
mkdir -p $BUILD_DIR/result/plans