Skip to content

Commit

Permalink
Merge pull request #36 from UM-Bridge/hpc-fix
Browse files Browse the repository at this point in the history
Fix execution issues in LoadBalancer
  • Loading branch information
linusseelinger committed Dec 15, 2023
2 parents de6ab77 + 395cfa9 commit 113c8b8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion hpc/model.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#SBATCH --time=00:10:00
#SBATCH --mem=1gb
#SBATCH --output=./sub-jobs/%j.out
#SBATCH --error=./sub-jobs/%j.err


# start the server named "server"
server_file="./server" # Assume your server files are placed in the project root directory, named "server"
Expand All @@ -29,7 +31,14 @@ port=$(get_avaliable_port)
export PORT=$port

mkdir -p ./urls

$server_file &

while ! curl -s "http://$(hostname):$port/Info" > /dev/null; do
sleep 1
done

echo "http://$(hostname):$port" > ./urls/url-$SLURM_JOB_ID.txt # send the url to load-balancer

$server_file
sleep infinity

0 comments on commit 113c8b8

Please sign in to comment.