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
1 merge request!170Make view12/14/15 parallel (one slice per job)
...@@ -58,6 +58,8 @@ parser.add_argument('-t', '--tag', type=str, ...@@ -58,6 +58,8 @@ parser.add_argument('-t', '--tag', type=str,
parser.add_argument('--timeout', type=int, parser.add_argument('--timeout', type=int,
default=60, default=60,
help='Timeout in seconds') help='Timeout in seconds')
parser.add_argument('passthrough', nargs='*')
args = parser.parse_args() args = parser.parse_args()
...@@ -157,7 +159,7 @@ prim_file = os.path.abspath(prim_file) ...@@ -157,7 +159,7 @@ prim_file = os.path.abspath(prim_file)
owd = os.getcwd() owd = os.getcwd()
os.chdir(args.dawn_dir) os.chdir(args.dawn_dir)
subprocess.run(['pwd']) 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']) subprocess.run(['ls', '-lrth'])
# upload the results # upload the results
......
...@@ -18,7 +18,7 @@ tan () ...@@ -18,7 +18,7 @@ tan ()
function print_the_help { function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> " echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: " echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)" echo " -t,--tag filename tag (default: view1)"
exit exit
...@@ -48,12 +48,16 @@ do ...@@ -48,12 +48,16 @@ do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
*) # unknown option -[a-zA-Z]*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
print_the_help print_the_help
shift # past argument shift # past argument
;; ;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
...@@ -90,9 +94,10 @@ make_slice(){ ...@@ -90,9 +94,10 @@ make_slice(){
rm "${FILE_TAG}_temp0.prim" rm "${FILE_TAG}_temp0.prim"
rm "${FILE_TAG}.prim" rm "${FILE_TAG}.prim"
} }
for zzz in $(seq 50 50 2000) ;
for zzz in $@ ;
do do
make_slice ${zzz} & make_slice ${zzz}
done done
wait wait
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
function print_the_help { function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> " echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: " echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)" echo " -t,--tag filename tag (default: view1)"
exit exit
...@@ -53,12 +53,16 @@ do ...@@ -53,12 +53,16 @@ do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
*) # unknown option -[a-zA-Z]*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
print_the_help print_the_help
shift # past argument shift # past argument
;; ;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
...@@ -102,7 +106,8 @@ make_slice(){ ...@@ -102,7 +106,8 @@ make_slice(){
rm "${FILE_TAG}_temp0.prim" rm "${FILE_TAG}_temp0.prim"
rm "${FILE_TAG}.prim" rm "${FILE_TAG}.prim"
} }
for zzz in $(seq 100 200 2000) ;
for zzz in $@ ;
do do
make_slice ${zzz} make_slice ${zzz}
done done
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
function print_the_help { function print_the_help {
echo "USAGE: $0 -i <PRIM_FILE> " echo "USAGE: $0 -i <PRIM_FILE> <slices ...> "
echo " OPTIONS: " echo " OPTIONS: "
echo " -t,--tag filename tag (default: view1)" echo " -t,--tag filename tag (default: view1)"
exit exit
...@@ -53,12 +53,16 @@ do ...@@ -53,12 +53,16 @@ do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
*) # unknown option -[a-zA-Z]*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
print_the_help print_the_help
shift # past argument shift # past argument
;; ;;
*) # positional options
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac esac
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
...@@ -104,7 +108,7 @@ make_slice(){ ...@@ -104,7 +108,7 @@ make_slice(){
rm "${FILE_TAG}.prim" rm "${FILE_TAG}.prim"
} }
for zzz in $(seq 100 200 2000) ; for zzz in $@ ;
do do
make_slice ${zzz} make_slice ${zzz}
done done
......
dawn_view_12:detector: dawn_view_12:detector:
extends: .views extends: .views
script: 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: view_12:
stage: collect stage: collect
......
dawn_view_14:detector: dawn_view_14:detector:
extends: .views extends: .views
script: 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: view_14:
stage: collect stage: collect
......
dawn_view_15:detector: dawn_view_15:detector:
extends: .views extends: .views
script: 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: view_15:
stage: collect 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