task1
This commit is contained in:
@@ -5,28 +5,54 @@
|
||||
#SBATCH --ntasks=1
|
||||
#SBATCH --cpus-per-task=56
|
||||
#SBATCH --time=00:20:00
|
||||
#SBATCH --output=results/%x-%j.out
|
||||
#SBATCH --error=results/%x-%j.err
|
||||
#SBATCH --output=stdio/%x-%j.out
|
||||
#SBATCH --error=stdio/%x-%j.err
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "${SLURM_SUBMIT_DIR}"
|
||||
ROOT_DIR="${SLURM_SUBMIT_DIR}"
|
||||
|
||||
module purge
|
||||
|
||||
mkdir -p results
|
||||
|
||||
LINPACK_DIR="${LINPACK_DIR:-/linux/share/mkl/benchmarks/linpack}"
|
||||
LINPACK_DIR="${LINPACK_DIR:-$HOME/LINPACK}"
|
||||
LINPACK_INPUT="${LINPACK_INPUT:-lininput_xeon64}"
|
||||
|
||||
if [ ! -x "${LINPACK_DIR}/xlinpack_xeon64" ]; then
|
||||
echo "Intel LINPACK binary not found: ${LINPACK_DIR}/xlinpack_xeon64"
|
||||
echo "If the path differs on the cluster, submit with:"
|
||||
echo "sbatch --export=ALL,LINPACK_DIR=/path/to/linpack scripts/run_intel_linpack.slurm"
|
||||
if [ ! -d "${LINPACK_DIR}" ]; then
|
||||
echo "LINPACK directory not found: ${LINPACK_DIR}"
|
||||
echo "Prepare Intel LINPACK in your home directory first."
|
||||
echo "Example:"
|
||||
echo " mkdir -p \$HOME/LINPACK"
|
||||
echo " tar -xzf \$HOME/linpack.tgz -C \$HOME/LINPACK"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
resolve_linpack_dir() {
|
||||
if [ -x "${LINPACK_DIR}/xlinpack_xeon64" ]; then
|
||||
printf '%s\n' "${LINPACK_DIR}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local found
|
||||
found="$(find "${LINPACK_DIR}" -name xlinpack_xeon64 2>/dev/null | head -n 1 || true)"
|
||||
if [ -n "${found}" ]; then
|
||||
dirname "${found}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
if ! LINPACK_DIR="$(resolve_linpack_dir)"; then
|
||||
echo "Intel LINPACK binary not found under: ${LINPACK_DIR}"
|
||||
echo "Check archive contents with:"
|
||||
echo " find ${LINPACK_DIR} -name xlinpack_xeon64 2>/dev/null"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "${LINPACK_DIR}"
|
||||
|
||||
chmod +x ./* || true
|
||||
chmod -x ./*.* || true
|
||||
mkdir -p stdio
|
||||
|
||||
echo "===== account info ====="
|
||||
whoami
|
||||
hostname
|
||||
@@ -51,8 +77,8 @@ fi
|
||||
|
||||
echo
|
||||
echo "===== intel linpack ====="
|
||||
echo "LINPACK_DIR=${LINPACK_DIR}"
|
||||
export OMP_NUM_THREADS="${SLURM_CPUS_PER_TASK:-56}"
|
||||
export MKL_NUM_THREADS="${SLURM_CPUS_PER_TASK:-56}"
|
||||
|
||||
cd "${LINPACK_DIR}"
|
||||
./xlinpack_xeon64 "${LINPACK_INPUT}"
|
||||
srun ./xlinpack_xeon64 "${LINPACK_INPUT}"
|
||||
|
||||
Reference in New Issue
Block a user