Skip to content
Snippets Groups Projects
Commit f295e43e authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Make view12/14/15 parallel (one slice per job)

parent 950aa602
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,8 @@ parser.add_argument('-t', '--tag', type=str,
parser.add_argument('--timeout', type=int,
default=60,
help='Timeout in seconds')
parser.add_argument('passthrough', nargs='*')
args = parser.parse_args()
......@@ -157,7 +159,7 @@ prim_file = os.path.abspath(prim_file)
owd = os.getcwd()
os.chdir(args.dawn_dir)
subprocess.run(['pwd'])
subprocess.run(['./generate_eps', '-t', args.tag, '-i', prim_file])
subprocess.run(['./generate_eps', '-t', args.tag, '-i', prim_file] + args.passthrough)
subprocess.run(['ls', '-lrth'])
# upload the results
......
......@@ -18,7 +18,7 @@ tan ()
function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> "
echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)"
exit
......@@ -48,12 +48,16 @@ do
shift # past argument
shift # past value
;;
*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later
-[a-zA-Z]*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1"
print_the_help
shift # past argument
;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
......@@ -90,9 +94,10 @@ make_slice(){
rm "${FILE_TAG}_temp0.prim"
rm "${FILE_TAG}.prim"
}
for zzz in $(seq 50 50 2000) ;
for zzz in $@ ;
do
make_slice ${zzz} &
make_slice ${zzz}
done
wait
......
......@@ -23,7 +23,7 @@
function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> "
echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)"
exit
......@@ -53,12 +53,16 @@ do
shift # past argument
shift # past value
;;
*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later
-[a-zA-Z]*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1"
print_the_help
shift # past argument
;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
......@@ -102,7 +106,8 @@ make_slice(){
rm "${FILE_TAG}_temp0.prim"
rm "${FILE_TAG}.prim"
}
for zzz in $(seq 100 200 2000) ;
for zzz in $@ ;
do
make_slice ${zzz}
done
......
......@@ -23,7 +23,7 @@
function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> "
echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)"
exit
......@@ -53,12 +53,16 @@ do
shift # past argument
shift # past value
;;
*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later
-[a-zA-Z]*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1"
print_the_help
shift # past argument
;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
......@@ -104,7 +108,7 @@ make_slice(){
rm "${FILE_TAG}.prim"
}
for zzz in $(seq 100 200 2000) ;
for zzz in $@ ;
do
make_slice ${zzz}
done
......
dawn_view_12:detector:
extends: .views
script:
- ./bin/make_dawn_views -t view12 -d scripts/view12 -D
- ./bin/make_dawn_views -t view12 -d scripts/view12 -D -- ${SLICE}
- ls -lrth *
- ls -lrth images/*
parallel:
matrix:
- SLICE: ["100", "300", "500", "700", "900", "1100", "1300", "1500", "1700", "1900"]
view_12:
stage: collect
......
dawn_view_14:detector:
extends: .views
script:
- ./bin/make_dawn_views -t view14 -d scripts/view14 -D
- ./bin/make_dawn_views -t view14 -d scripts/view14 -D -- ${SLICE}
- ls -lrth *
- ls -lrth images/*
parallel:
matrix:
- SLICE: ["100", "300", "500", "700", "900", "1100", "1300", "1500", "1700", "1900"]
view_14:
stage: collect
......
dawn_view_15:detector:
extends: .views
script:
- ./bin/make_dawn_views -t view15 -d scripts/view15 -D
- ./bin/make_dawn_views -t view15 -d scripts/view15 -D -- ${SLICE}
- ls -lrth *
- ls -lrth images/*
parallel:
matrix:
- SLICE: ["100", "300", "500", "700", "900", "1100", "1300", "1500", "1700", "1900"]
view_15:
stage: collect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment