Skip to content

Commit

Permalink
Update SLURM helpers scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JCapul committed May 22, 2019
1 parent f4a7ca1 commit 3aca9ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tools/pdwfs-slurm
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ if [ "$command" == init ]; then
Initialize a new pdwfs session by launching multiple Redis instances
on compute nodes and creating a session environment file to be sourced.
This command must be executed after pdwfs-slurm init:
The following command must be executed after pdwfs-slurm init:
$ source pdwfs.session
where:
-h show this help
-N number of nodes (default: 1)
-n number of Redis instances PER node (default: 1)
-p port of central Redis instance (default: 34000)
-i network interface on which Redis servers shall bind to (default to first from `hostname -I`)"
-i network interface on which Redis servers shall bind to (default to first from 'hostname -I')"

while getopts ':hN:n:p:i:' opt; do
case "$opt" in
Expand Down Expand Up @@ -146,7 +146,7 @@ if [ "$command" == init ]; then
fi

# launch the remote instances
srun -N $nNodes -n $nNodes -c $nInstances --exclusive --mem=0 redis.srun -i $nic -n $nInstances $CENTRAL_REDIS &
srun -N $nNodes --ntasks-per-node 1 -c $nInstances --exclusive redis.srun -i $nic -n $nInstances $CENTRAL_REDIS &
if [[ "$?" != "0" ]]; then
fail "[PDWFS][init] Error: failed to launch the remote Redis instances"
fi
Expand Down
4 changes: 2 additions & 2 deletions tools/redis.srun
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ stop-redis() {
ip=`get-ip $nic`
addr=$ip:$port
if [[ -n "$verbose" ]]; then
echo "[PDWFS] Stopping Redis instance on $addr"
echo "[PDWFS] Stopping Redis instance on `hostname` at $addr"
fi
redis-cli -h $ip -p $port shutdown
redis-cli -u redis://$centralRedis srem addr $addr > /dev/null
Expand All @@ -97,7 +97,7 @@ start-redis() {
ip=`get-ip $nic`
addr=$ip:$port
if [[ -n "$verbose" ]]; then
echo "[PDWFS] Starting Redis instance on $addr"
echo "[PDWFS] Starting Redis instance on `hostname` at $addr"
fi
redis-server --daemonize yes --save "" --protected-mode no --bind $ip --port $port > /dev/null
redis-cli -u redis://$centralRedis sadd addr $addr > /dev/null
Expand Down

0 comments on commit 3aca9ae

Please sign in to comment.