Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/WIPACrepo/pyglidein
Browse files Browse the repository at this point in the history
  • Loading branch information
briedel committed Sep 30, 2022
2 parents e081b1a + 1477950 commit 5c8b48c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

<!--next-version-placeholder-->

## v1.1.19 (2022-09-29)


## v1.1.18 (2022-09-29)


## v1.1.17 (2022-09-29)


## v1.1.16 (2022-09-29)


Expand Down
2 changes: 1 addition & 1 deletion pyglidein/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# is zero for an official release, positive for a development branch,
# or negative for a release candidate or beta (after the base version
# number has been incremented)
__version__ = "1.1.16"
__version__ = "1.1.19"
version_info = (
int(__version__.split(".")[0]),
int(__version__.split(".")[1]),
Expand Down
22 changes: 19 additions & 3 deletions pyglidein/glidein_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,35 @@ fi
CVMFS="True"

# GPU type detection
OLD_GPUS=$GPUS
GPU_NAMES=""
if [ $GPUS != 0 ]; then
if command -v nvidia-smi >/dev/null; then
if [ "$GPUS" = "all" ]; then
GPU_NAMES=$(nvidia-smi --query-gpu=name --format=csv,noheader|sed ':a;N;$!ba;s/\n/,/g');
else
GPU2=$(echo "$GPUS"|sed 's/CUDA//g'|sed 's/OCL//g');
if [ $GPUS = 1 ]; then
GPU2=$(nvidia-smi --query-gpu=index --format=csv,noheader);
GPUS=CUDA$GPU2;
else
GPU2=$(echo "$GPUS"|sed 's/CUDA//g'|sed 's/OCL//g');
fi
GPU_NAMES=$(nvidia-smi --query-gpu=name --format=csv,noheader --id=$GPU2|sed ':a;N;$!ba;s/\n/,/g');
fi
else
# GPUs might exist but nvidia-smi is not available. re-set $GPUS
GPUS=0
fi
fi
fi

if [ [ "$GPUS" = 0 ] && [ "$OLD_GPUS" != "$GPUS" ] ]; then
echo "Attemping at GPU_NAMES detection has failed"
exit 1
fi


if [ "$GPU_NAMES" != "" ]; then
echo "Starting pyglidein with GPUS=$GPUS with GPU_NAMES=$GPU_NAMES"
fi

##
Expand Down Expand Up @@ -134,7 +150,7 @@ export _condor_NUM_SLOTS_TYPE_1=1
export _condor_SLOT_TYPE_1_PARTITIONABLE="True"
#export _condor_SLOT_TYPE_1_CONSUMPTION_POLICY="True"
#export _condor_SLOT_TYPE_1_CONSUMPTION_GPUs="quantize(ifThenElse(target.RequestGpus =!= undefined,target.RequestGpus,0),{0})";
if [ $SITE -eq "Anvil" ]; then
if [ "$SITE" = "Anvil" ]; then
export _condor_NETWORK_INTERFACE='172.18.*'
export _condor_MASTER_DEBUG=D_HOSTNAME:2,D_ALWAYS:2
fi
Expand Down

0 comments on commit 5c8b48c

Please sign in to comment.