Closed crazyzlj closed 6 years ago
After some try-and-trial, finally, I find out the solution. The key point is creating hostfile
dynamically.
Here is the step-by-step and hope it helpful for others.
deap_scoop_lsf_demo.lsf
.
#!/bin/sh
#BSUB -J TEST_SCOOP
#BSUB -q rhel6normal
source ~/.bash_profile
cd /wps/home/zhulj/demo/scoop_test
export PATH=/home/zhulj/soft/python-2.7.13/bin:$PATH
SCOOPHOSTFILE=hosts$LSB_JOBID
rm -f $SCOOPHOST_FILE
touch $SCOOPHOST_FILE
echo "# SCOOP hostfile created by LSF on date
"
if [ -f $SCOOPHOST_FILE ]; then
:
else
echo "$0: can't create $SCOOPHOST_FILE"
exit 1
fi
HOST=""
NUM_PROC=""
FLAG=""
TOTAL_CPUS=0
for TOKEN in $LSB_MCPU_HOSTS
do
if [ -z "$FLAG" ]; then # -z means string is empty
HOST="$TOKEN"
FLAG="0"
else
NUM_PROC="$TOKEN"
FLAG="1"
fi
if [ "$FLAG" = "1" ]; then
_x=0
if [ $_x -lt $NUM_PROC ]; then
TOTAL_CPUS=expr "$TOTAL_CPUS" + "$NUM_PROC"
echo "$HOST $NUM_PROC" >> $SCOOPHOST_FILE
fi
FLAG=""
HOST=""
NUM_PROC=""
fi
done
echo "Your SCOOP boot hostfile looks like:" echo "TOTAL_CPUS: ${TOTAL_CPUS}"
script=onemax_island_scoop.py
python -m scoop --debug --hostfile $SCOOPHOSTFILE $script > testscoop$LSB_JOBID.stdout.log
+ cd to the directory of `deap_scoop_lsf_demo.lsf`.
+ Submit job by `bsub` with the specification of processor number.
```shell
$ bsub -n 48 ./deap_scoop_lsf_demo.lsf
The hostfile
created is something like this. Be caution, no other lines should be existed in this file.
b10n07.cluster.com 12
b06n03.cluster.com 12
b07n12.cluster.com 8
b07n06.cluster.com 12
b07n03.cluster.com 4
It would still be great to support LSF! Can this issue be reopened?
It would still be great to support LSF! Can this issue be reopened?
Currently, the above solution I posted can work. It would be great if SCOOP can support LSF natively.
Hi, I have developed my algorithm using DEAP with SCOOP and tested on our little cluster using PBS system. Now, I want to run on our big cluster which installed IBM LSF. Since I cannot specify the accessible hosts, I found SCOOP cannot detect the LSF system. Then, I found the following instruction.
So, I wonder if there any possibility to support IBM LSF system?
Thank you very much!