Skip to content

Emeli's steps for using workflows #9

@ejanderson1

Description

@ejanderson1

Overview:

  • Adrien's workflow code can be used to send batch jobs to the HPC
  • Can specify multiple scenarios to test in one script
  • Replaces using separate sim.R, runSim.sh, and mainSim.sh files and submitting your job using bash
  • Note: there may be a better way to do some of the steps below - this is just how I have been using it (@AdrienLeGuillou maybe you can comment if anything is incorrect)

Before you begin

  • Add workflows/ to your gitignore
  • This ensures that your workflow folder won't be pushed to GitHub, which can mess things up on the HPC (I believe)

Step 1 - create workflow script

Step 2 - run workflow script

  • Running the script saves a workflows folder in your project
  • Inside the workflows folder is another folder with the name you give your workflow when you create it (more on this later)

Step 3 - create wf directory on HPC

  • Create a workflows directory in your project on the HPC. You can do this by logging into the HPC, going to your project directory, and using the mkdir command or you can run the following from terminal when not logged into the HPC:
    ssh <user>@clogin01.sph.emory.edu "mkdir -p ~/projects/BigNets/workflows" where you insert the location that you want your workflows folder in place of the BigNets code on the right.

Step 4 - copy wf files to HPC

  • The next step is to copy what is in your local workflows folder to the workflows folder on the HPC:
    scp -r workflows/[name_of_wf] <user>@clogin01.sph.emory.edu:/projects/epimodel/[user name]/[your project name]/workflows/
  • Again this should be done in terminal when not logged into the HPC

Step 5 - check that your copying worked

  • Now you can login to the HPC and move to your project directory
  • Check that the workflows folder is there and that your workflow is inside it:
    ls -lh workflows
  • If you pushed any changes to GitHub recently, you can run git pull now as well

Step 6 - submit batch job

  • Once you confirm your workflow is on the HPC you can run it
  • This involves 2 pieces of code:
  1. Run:
    chmod +x workflows/[name_of_wf]/start_workflow.sh

  2. Then:
    ./workflows/[name_of_wf]/start_workflow.sh

  • At this point you should receive a batch number confirming that your code was submitted. If you did not, then something went wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions