Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!
#!/bin/bash

#### Deriving signatures from input matrix

Expand Down Expand Up @@ -73,21 +73,20 @@ for ITER in $(seq 1 $ITERS); do

echo $ITER

pids=()
for PAR in $(seq 1 $PARALLEL); do

UUID=$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 6 | head -n 1)
OUTPATH="${UUID}"
mkdir -p $OUTPATH
python $SCRIPTPATH --data $INPUTMATRIX --max_iter=$MAXITER --output_dir $OUTPATH $REGULARISATIONS --labeled --K0 $K0 > ${OUTPATH}/${UUID}_log.txt &
pids[${PAR}]=$!

done

sleep 4
PYRUN=`nvidia-smi | grep -c python`
while [[ $PYRUN != 0 ]]; do
sleep 2
PYRUN=`nvidia-smi | grep -c python`
for pid in ${pids[*]}; do
wait $pid
done

done
echo "NMF finished. Goodbye!"
echo "NMF finished. Goodbye!"