"scripts/convert_of_weights_to_jax.py" did not exist on "a35c44f52af2ef129def0f0294897b9be5bf46b6"
slurm_test_mgpu.sh 605 Bytes
Newer Older
Gus-Guo's avatar
Gus-Guo committed
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

set -x

PARTITION=$1
GPUS=$2
GPUS_PER_NODE=$GPUS
PY_ARGS=${@:3}
JOB_NAME=eval
SRUN_ARGS=${SRUN_ARGS:-""}

12
13
14
15
16
17
18
19
20
while true
do
    PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 ))
    status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)"
    if [ "${status}" != "0" ]; then
        break;
    fi
done
echo $PORT
21

Gus-Guo's avatar
Gus-Guo committed
22
23
24
25
26
27
28
srun -p ${PARTITION} \
    --job-name=${JOB_NAME} \
    --gres=gpu:${GPUS_PER_NODE} \
    --ntasks=${GPUS} \
    --ntasks-per-node=${GPUS_PER_NODE} \
    --kill-on-bad-exit=1 \
    ${SRUN_ARGS} \
29
    python -u test.py --launcher slurm --tcp_port $PORT ${PY_ARGS}
Gus-Guo's avatar
Gus-Guo committed
30