From 8f44cbfcb988621ffec9f546f87b66b6b84c0fc2 Mon Sep 17 00:00:00 2001 From: Christos Choutouridis Date: Sun, 16 Feb 2025 23:42:10 +0200 Subject: [PATCH] HW3: Small changes to build and analyze scripts --- homework_3/analyse/extract_results.sh | 6 +++--- homework_3/hpc/submitJobs.sh | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/homework_3/analyse/extract_results.sh b/homework_3/analyse/extract_results.sh index 0024c7a..4d09d53 100755 --- a/homework_3/analyse/extract_results.sh +++ b/homework_3/analyse/extract_results.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash # Check if a directory argument is given if [[ -z "$1" ]]; then @@ -19,8 +19,8 @@ printf "%s\n" "--------------------------------------" # Loop through code versions for VERSION in V0 V1 V2; do - printf "\n%-15s %s\n" "Code version:" "$VERSION" - printf "%-10s %-18s %-18s %-18s\n" "" "Total" "Mem-xch" "Sorting" + printf "\n%-14s %s\n" "Code version:" "$VERSION" + printf "%-8s %-18s %-18s %-18s\n" "" "Total" "Mem-xch" "Sorting" for Q in {20..30}; do FILE=$(grep -l "\[Log\]: Code version: $VERSION" "$LOG_DIR"/* | xargs grep -l "Q=$Q") diff --git a/homework_3/hpc/submitJobs.sh b/homework_3/hpc/submitJobs.sh index 0b6ed8f..4ce0fc9 100755 --- a/homework_3/hpc/submitJobs.sh +++ b/homework_3/hpc/submitJobs.sh @@ -1,9 +1,22 @@ #!/usr/bin/env bash + +# +# Run the following command from the directory where the slurm files should be created +# +# Invocation ./submitJobs.sh +# + +# Check if a directory argument is given +if [[ -z "$1" ]]; then + echo "Usage: $0 " + exit 1 +fi + # Submission parameters QOS="small" PARTITION="ampere" # ampere gpu -SCRIPT_DIR="hpc" # Directory containing the job scripts +SCRIPT_DIR="$1" # Directory containing the job scripts # Range of values for the -q parameter VERSIONS=("V0" "V1" "V2")