Skip to content

Commit

Permalink
remove Singularity hack
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Jul 7, 2018
1 parent db6f9bb commit 8e30a24
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 41 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ out_tmpdir*/
runs/
*.simg
slurm-*.out
steps/*.cwl
19 changes: 4 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
all: run
SHELL=bash
RUN := $(PWD)/runs/run_$(shell date +%F-%H-%M-%S)
SINGULARITY_PREFIX=$(shell echo "singularity, exec, $(PWD)/prefactor.simg, " | sed -e 's/[\/&]/\\&/g')
ARCHIVE=ftp://ftp.astron.nl/outgoing/EOSC/datasets/
TINY=L591513_SB000_uv_delta_t_4.MS
PULSAR=GBT_Lband_PSR.fil
Expand Down Expand Up @@ -44,7 +43,7 @@ data/$(SMALL)/: data/$(SMALL_ARCHIVE)
small: data/$(SMALL)/
echo "data/$(SMALL)/ is downloaded"

run-udocker: .virtualenv/bin/udocker steps/ndppp_prep_cal.cwl .virtualenv/bin/cwltool
run-udocker: .virtualenv/bin/udocker .virtualenv/bin/cwltool
mkdir -p $(RUN)
.virtualenv/bin/cwltool \
--user-space-docker-cmd `pwd`/.virtualenv/bin/udocker \
Expand All @@ -53,7 +52,7 @@ run-udocker: .virtualenv/bin/udocker steps/ndppp_prep_cal.cwl .virtualenv/bin/cw
prefactor.cwl \
jobs/job_20sb.yaml > >(tee $(RUN)/output) 2> >(tee $(RUN)/log >&2)

run: .virtualenv/bin/cwltool steps/ndppp_prep_cal.cwl
run: .virtualenv/bin/cwltool
mkdir -p $(RUN)
.virtualenv/bin/cwltool \
--leave-tmpdir \
Expand All @@ -62,7 +61,7 @@ run: .virtualenv/bin/cwltool steps/ndppp_prep_cal.cwl
prefactor.cwl \
jobs/job_2sb.yaml > >(tee $(RUN)/output) 2> >(tee $(RUN)/log >&2)

toil: data/$(SMALL)/ .virtualenv/bin/cwltoil steps/ndppp_prep_cal.cwl
toil: data/$(SMALL)/ .virtualenv/bin/cwltoil
mkdir -p $(RUN)/results
.virtualenv/bin/toil-cwl-runner \
--logFile $(RUN)/log \
Expand All @@ -73,12 +72,11 @@ toil: data/$(SMALL)/ .virtualenv/bin/cwltoil steps/ndppp_prep_cal.cwl
prefactor.cwl \
jobs/job_20sb.yaml | tee $(RUN)/output

slurm: data/$(SMALL) .virtualenv/bin/cwltoil singularity
slurm: data/$(SMALL) .virtualenv/bin/cwltoil
mkdir -p $(RUN)/results
.virtualenv/bin/toil-cwl-runner \
--batchSystem=slurm \
--preserve-environment PATH \
--no-container \
--logFile $(RUN)/log \
--outdir $(RUN)/results \
--jobStore file://$(RUN)/job_store \
Expand All @@ -93,7 +91,6 @@ mesos: data/$(SMALL)
--batchSystem=mesos \
--mesosMaster=145.100.59.50:5050 \
--preserve-environment PATH \
--no-container \
--logFile $(RUN)/log \
--outdir $(RUN)/results \
--jobStore file://$(RUN)/job_store \
Expand All @@ -107,11 +104,3 @@ prefactor.simg:
singularity build prefactor.simg docker://kernsuite/prefactor

singularity: prefactor.simg
for i in `ls steps/*.in`; do sed 's/CMD_PREFIX/$(SINGULARITY_PREFIX)/g' $$i> $${i:0:-3}; done

no-singularity:
for i in `ls steps/*.in`; do sed 's/CMD_PREFIX//g' $$i> $${i:0:-3}; done

steps/ndppp_prep_cal.cwl:
$(error "Run '$ make singularity' or '$ make no-singularity' first")

14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ optional:
* [Singularity](http://singularity.lbl.gov/)


# preperations

You first need to preprocess the CWL files since the standard
doesn't support Singularity yet. If you want to use singularity run:

```bash
$ make singularity
```

otherwise run:
```bash
$ make no-singularity
```

# usage

To run the pipeline with the example dataset just run:
Expand Down
2 changes: 1 addition & 1 deletion steps/ampl.cwl.in → steps/ampl.cwl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXpython, /usr/lib/prefactor/scripts/amplitudes_losoto_3.py]
baseCommand: [python, /usr/lib/prefactor/scripts/amplitudes_losoto_3.py]

label: "Smooth amplitudes"

Expand Down
2 changes: 1 addition & 1 deletion steps/calib_cal.cwl.in → steps/calib_cal.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIX/usr/bin/calibrate-stand-alone]
baseCommand: [/usr/bin/calibrate-stand-alone]

label: "BBS calibrate"

Expand Down
2 changes: 1 addition & 1 deletion steps/createmap_cal.cwl.in → steps/createmap_cal.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXpython,
baseCommand: [python,
/usr/lib/python2.7/dist-packages/lofarpipe/recipes/plugins/PipelineStep_createMapfile.py,
createmap_cal.mapfile]

Expand Down
2 changes: 1 addition & 1 deletion steps/examine-npys.cwl.in → steps/examine-npys.cwl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXpython, /usr/lib/prefactor/scripts/examine_npys.py]
baseCommand: [python, /usr/lib/prefactor/scripts/examine_npys.py]

hints:
DockerRequirement:
Expand Down
2 changes: 1 addition & 1 deletion steps/fitclock.cwl.in → steps/fitclock.cwl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXpython, /usr/lib/prefactor/scripts/fit_clocktec_initialguess_losoto.py]
baseCommand: [python, /usr/lib/prefactor/scripts/fit_clocktec_initialguess_losoto.py]

label: "Separate clock/TEC"

Expand Down
2 changes: 1 addition & 1 deletion steps/h5imp_cal.cwl.in → steps/h5imp_cal.cwl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXpython, /usr/lib/prefactor/scripts/losotoImporter.py, losoto.h5]
baseCommand: [python, /usr/lib/prefactor/scripts/losotoImporter.py, losoto.h5]

label: "Convert solutions to H5parm"

Expand Down
2 changes: 1 addition & 1 deletion steps/ndppp_prep_cal.cwl.in → steps/ndppp_prep_cal.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXNDPPP, msout=calibrated.MS]
baseCommand: [NDPPP, msout=calibrated.MS]

label: "DPPP flag and average"

Expand Down
2 changes: 1 addition & 1 deletion steps/phase.cwl.in → steps/phase.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cwlVersion: v1.0
class: CommandLineTool

baseCommand: [CMD_PREFIXpython]
baseCommand: [python]

label: "Find global phase offset"

Expand Down
2 changes: 1 addition & 1 deletion steps/plot_cal_phases.cwl.in → steps/plot_cal_phases.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cwlVersion: v1.0
class: CommandLineTool

baseCommand: [CMD_PREFIXlosoto]
baseCommand: [losoto]

label: "Plot raw calibration results"

Expand Down
2 changes: 1 addition & 1 deletion steps/plots.cwl.in → steps/plots.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

cwlVersion: v1.0
class: CommandLineTool
baseCommand: [CMD_PREFIXpython]
baseCommand: [python]

label: "Plot clock, TEC, amplitude"

Expand Down
2 changes: 1 addition & 1 deletion steps/sky_cal.cwl.in → steps/sky_cal.cwl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cwlVersion: v1.0
class: CommandLineTool

baseCommand: [CMD_PREFIXpython]
baseCommand: [python]

label: "Find calibrator skymodel"

Expand Down

0 comments on commit 8e30a24

Please sign in to comment.