madminer-tool / madminer-workflow

Madminer complete cloud-based analysis
MIT License
4 stars 4 forks source link

Define REANA workflow physics scripts #14

Closed Sinclert closed 4 years ago

Sinclert commented 4 years ago

This PR performs a big refactor on how the shell script commands are run on the REANA workflow. The main goal of the refactor is to move all the shell script commands from the steps.yml file into proper .sh files, so that they can be run locally for debugging purposes.

This PR only covers the "physics" use-case steps. A future PR will do the same but for the "ml" workflow shell script commands.

As promised, now the "physics steps" can be run locally 🌟

Example step 1:

docker-images/docker-madminer-physics/scripts/1_configurate.sh \
    -p docker-images/docker-madminer-physics \
    -i reana/inputs/input.yml

Example step 2:

docker-images/docker-madminer-physics/scripts/2_generate.sh \
    -p docker-images/docker-madminer-physics \
    -s code/mg_processes/signal \
    -j 6 \
    -c docker-images/docker-madminer-physics/data/madminer_config.h5

Example step 3:

docker-images/docker-madminer-physics/scripts/3_pythia.sh \
    -p docker-images/docker-madminer-physics \
    -m software/MG5_aMC_v2_6_7 \
    -s code/mg_processes/signal \
    -l code/logs \
    -z docker-images/docker-madminer-physics/folder_0.tar.gz # Run number 0

During the refactor, additional modifications have been performed:

irinaespejo commented 4 years ago

Hi @Sinclert, this is great! Thank you for your time and effort in the refactor ! What do you mean by "As promised, now the "physics steps" can be run locally "?

Sinclert commented 4 years ago

Hi @irinaespejo ,

I was just referring to the initial goal of the refactor: having .sh files that facilitates its execution on the local computer.

Before this, if a developer wanted to replicate what happens inside the REANA workflow, there was no option but to sequentially copy & paste all the shell commands, within the old steps.yml file.

irinaespejo commented 4 years ago

Got it thank you!