#!/usr/bin/env bash
# ------------------------------------------------------------------------------
# This script pulls all results from all or a specific profiling results folder.
# ------------------------------------------------------------------------------

#rsync -avh --delete lumi:ectrans-dwarf/profiling/$fullname/ $fullname

if [ -z "$1" ]; then
    echo "Pulling all results.."

    # Create list of versions and pull one by one.
    declare -a versions=("32" "64" "128" "192" "256")

    for v in "${versions[@]}"; do
        fullname="res-gpu_prof_nproma_$v"
        echo "Pulling $fullname.."
        rsync -avh --delete lumi:ectrans-dwarf/profiling/$fullname/ $fullname
    done
else
    echo "Pulling specific results $1:.."
    rsync -avh --delete lumi:ectrans-dwarf/profiling/$1/ $1
fi
