Skip to content
Open
Show file tree
Hide file tree
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
44 changes: 44 additions & 0 deletions scripts/test_ipmu_gw/gw_queue_check_various_mps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# The shell script which interprets this job script.
# Any option for qsub can be described like this,
# with #PBS
#PBS -S /bin/bash


# Merge STDERR to STDOUT
#PBS -j oe

# Path of the redirect of STDOUT by the batch job.
#PBS -o check_various_mps_sampled_case5_test_result

# No mail will be sent for the job.
#PBS -m p

#PBS -l nodes=1:ppn=28
#PBS -l walltime=72:00:00

# Name of queue;
# run qmgr -c "p s" to get the list of available queues.
#PBS -q mini

# Name of the job
# - within 15 characters length,
# - without white space characters,
# - and with the first character alphabetic.
# It is shown in the list which "qstat" generates
#PBS -N sampled_case5_test

cd /work/kiyoyabe/pfs/survey_simulations/scripts/check_netflow_processing_time_201905/scripts
source /home/kiyoyabe/gurobi/gurobi_811.env


# example (changing MIPFocus from 0 to 3)
rm -f ../logs/idl_ge_single_sampled_case5_fixed_net_test_mipfocus?_seed??.log

./run_gurobi_cl.sh -m idl_ge_single_unsampled_case5_fixed_net.mps -l idl_ge_single_sampled_case5_fixed_net_test_mipfocus0 -g 0.01 -t 28 -p 2 -e 4 -d 0 -r 0.8 -f 0 -c -1 -n 5
./run_gurobi_cl.sh -m idl_ge_single_unsampled_case5_fixed_net.mps -l idl_ge_single_sampled_case5_fixed_net_test_mipfocus1 -g 0.01 -t 28 -p 2 -e 4 -d 0 -r 0.8 -f 1 -c -1 -n 5
./run_gurobi_cl.sh -m idl_ge_single_unsampled_case5_fixed_net.mps -l idl_ge_single_sampled_case5_fixed_net_test_mipfocus2 -g 0.01 -t 28 -p 2 -e 4 -d 0 -r 0.8 -f 2 -c -1 -n 5
./run_gurobi_cl.sh -m idl_ge_single_unsampled_case5_fixed_net.mps -l idl_ge_single_sampled_case5_fixed_net_test_mipfocus3 -g 0.01 -t 28 -p 2 -e 4 -d 0 -r 0.8 -f 3 -c -1 -n 5

# for options for run_gurobi_cl.sh, run ./run_gurobi_cl.sh -h
90 changes: 90 additions & 0 deletions scripts/test_ipmu_gw/run_gurobi_cl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/bin/bash

function usage {

cat <<EOM
Usage: $(basename "$0") [OPTION]...

-m <MPS FILENAME> : MPS FILE NAME
-l <LOG NAME> : LOG NAME for LOGFILE
-g <MIPGap> : MIPGap value (default:0.01)
-t <Threads> : Number of Threads (default:28)
-p <Presolve> : Presolve (default:-1)
-e <Method> : Method (default:-1)
-d <DegenMoves> : DegenMoves (default:-1)
-r <Heuristics> : Heuristics (default:0.05)
-f <MIPFocus> : MIPFocus (default:0)
-c <Cuts> : Cuts (default:-1)
-n <Nseed> : Number of seeds (default:5)
-h : Display help
EOM

exit 2
}


mps_dir=../data/
log_dir=../logs/

# init parameters

mps=idl_ge_single_sampled_case1_fixed_net.mps
logname=idl_ge_single_sampled_case1_fixed_net_fiducial
mipgap=0.01
threads=28
presolve=-1
method=-1
degenmoves=-1
heuristics=0.05
mipfocus=0
cuts=-1
nseed=5

while getopts "m:l:g:t:p:e:d:r:f:c:n:" optKey; do
case "$optKey" in
m)
mps=$OPTARG
;;
l)
logname=$OPTARG
;;
g)
mipgap=$OPTARG
;;
t)
threads=$OPTARG
;;
p)
presolve=$OPTARG
;;
e)
method=$OPTARG
;;
d)
degenmoves=$OPTARG
;;
r)
heuristics=$OPTARG
;;
f)
mipfocus=$OPTARG
;;
c)
cuts=$OPTARG
;;
n)
nseed=$OPTARG
;;
h|*)
usage
;;
esac
done

for seed in `seq -f %02g 1 $nseed`
do
arguments="MIPGap=$mipgap Threads=$threads Seed=$seed Presolve=$presolve Method=$method DegenMoves=$degenmoves Heuristics=$heuristics MIPFocus=$mipfocus Cuts=$cuts LogFile=$log_dir${logname}_seed$seed.log ${mps_dir}$mps"
command="gurobi_cl $arguments "
echo $command
$command
done