{"id":20596279,"url":"https://github.com/ulhpc/launcher-scripts","last_synced_at":"2025-04-14T23:50:26.447Z","repository":{"id":147481722,"uuid":"8714383","full_name":"ULHPC/launcher-scripts","owner":"ULHPC","description":"(DEPRECATED) A set of launcher scripts to be used with OAR and Slurm for running jobs on the UL HPC platform","archived":false,"fork":false,"pushed_at":"2020-10-23T15:42:46.000Z","size":104,"stargazers_count":14,"open_issues_count":0,"forks_count":14,"subscribers_count":23,"default_branch":"devel","last_synced_at":"2025-03-28T11:51:06.868Z","etag":null,"topics":["hpc","launcher","oar","slurm"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ULHPC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-03-11T22:05:30.000Z","updated_at":"2022-12-09T11:01:29.000Z","dependencies_parsed_at":"2023-07-24T19:00:37.151Z","dependency_job_id":null,"html_url":"https://github.com/ULHPC/launcher-scripts","commit_stats":{"total_commits":92,"total_committers":11,"mean_commits":8.363636363636363,"dds":0.6195652173913043,"last_synced_commit":"1c13d6bb333c29b55068e4f48c06ddec2330c6e5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ULHPC%2Flauncher-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ULHPC%2Flauncher-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ULHPC%2Flauncher-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ULHPC%2Flauncher-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ULHPC","download_url":"https://codeload.github.com/ULHPC/launcher-scripts/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981259,"owners_count":21193144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hpc","launcher","oar","slurm"],"created_at":"2024-11-16T08:16:07.052Z","updated_at":"2025-04-14T23:50:26.412Z","avatar_url":"https://github.com/ULHPC.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"-*- mode: markdown; mode: auto-fill; fill-column: 80 -*-\n`README` -- [HPC @ UL](http://hpc.uni.lu)\n\n        Time-stamp: \u003cMer 2013-04-03 17:40 svarrette\u003e\n\n-------------------\n\n# UL HPC Launcher scripts\n\n## Synopsis\n\nThis repository holds a set of launcher scripts to be used on the\n[UL HPC](https://hpc.uni.lu) platform. \nThey are provided for users of the infrastructure to make their life easier (and\nhopefully more efficient) on the following typical workflows: \n\n* Embarrassingly parallel run for repetitive and/or multi-parametric jobs over a\n  Java/C/C++/Ruby/Perl/Python/R script, corresponding (normally) to the\n  following cases: \n  \n * serial (or sequential) tasks having all similar duration, run on one node\n * serial (or sequential) tasks having varying durations, run on one node\n * serial (or sequential) tasks having varying durations, run on multiple nodes\n\n* MPI run on n processes (ex: [HPL](https://github.com/ULHPC/tutorials/tree/devel/advanced/HPL)) with abstraction of the MPI stack, MPI script, option to compile the code etc.\n* MPI run on n process per node (ex: [OSU Micro-benchmarks](https://github.com/ULHPC/tutorials/tree/devel/advanced/OSU_MicroBenchmarks))\n\nWe propose here two types of contributions:\n\n* a set of `bash` scripts examples that users can use as a startup example to\nadapt for their own workflow\n* **NOT YET IMPLEMENTED** a more generic ruby script interfaced by a YAML\n    configuration file which hold the specificity of each users.\n\n## General considerations\n\nThe [UL HPC](https://hpc.uni.lu) platform offers parallel computing resource, so\nit's important you make an *efficient* use of the computing nodes, even when\nprocessing serial jobs. \nIn particular, you should avoid to submit purely serial jobs to the OAR queue as\nit would waste the computational power (11 out of 12 cores is you reserve one\nnode on `gaia` for instance).\n\n## Running a bunch of serial tasks on a single node\n\nA *bad* behaviour in this context is illustrated in\n`bash/serial/NAIVE_AKA_BAD_launcher_serial.sh` where you'll recognize a pattern\nyou perhaps use in your own script: \n\n     for i in `seq 1 ${NB_TASKS}`; do  \n        ${TASK} $i\n     done \n\nIf you're more familiar with UNIX, you can perhaps argue we can fork separate\nprocesses using the bash `\u0026` (ampersand) builtin control operator and the `wait`\ncommand. \nThis is illustrated in `bash/serial/launcher_serial_ampersand.sh` and\ncorresponds to the following pattern:\n\n     for i in `seq 1 ${NB_TASKS}`; do  \n        ${TASK} $i \u0026\n     done \n     wait\n\nThis approach is straightforward and is sufficient assuming (1) you don't have a\nhuge number of tasks to fork and (2) each tasks has the a similar duration. \nFor all the other (serial) cases, an approach based on\n[GNU parallel](http://www.gnu.org/software/parallel/) if more effective as it\npermits to easily and efficiently  schedule batch of n tasks in parallel \n(`-j n`), where n typically stands for the number of cores of the nodes. \nThis is illustrated in `bash/serial/launcher_serial.sh` and corresponds to the\nfollowing pattern: \n\n    seq ${NB_TASKS} | parallel -u -j 12 ${TASK} {}\n\n\nNot convinced you have interest to these approaches? Take a look at the\nfollowing completion times performed on the `chaos` cluster for the task\n`mytask.sh` proposed in `bash/serial/mytask.sh`: \n\n      +---------+---------------+--------+--------------+----------------------+-----------+\n      | NB_TASK |    HOSTNAME   | #CORES |    TASK      |    APPROACH          |   TIME    | \n      +---------+---------------+--------+--------------+----------------------+-----------+\n      |   24    | h-cluster1-32 |   12   | sleep {1-24} | Pure serial          | 5m0.483s  | \n      |   24    | h-cluster1-32 |   12   | sleep {1-24} | Ampersand + wait     | 0m24.141s |\n      |   24    | h-cluster1-32 |   12   | sleep {1-24} | GNU Parallel (-j 12) | 0m36.404s |\n      |   24    | h-cluster1-32 |   12   | sleep {1-24} | GNU Parallel (-j 24) | 0m24.257s |\n      +---------+---------------+--------+--------------+----------------------+-----------+\n\nThe same benchmark performed for the sample argument file (see\n`bash/serial/mytask.args.example`) to perform tasks of similar duration:\n\n      +---------+---------------+--------+---------+----------------------+-----------+\n      | NB_TASK |    HOSTNAME   | #CORES | TASK    |    APPROACH          |   TIME    |\n      +---------+---------------+--------+---------+----------------------+-----------+\n      |   30    | h-cluster1-32 |   12   | sleep 2 | Pure serial          | 1m0.374s  |\n      |   30    | h-cluster1-32 |   12   | sleep 2 | Ampersand + wait     | 0m2.217s  |\n      |   30    | h-cluster1-32 |   12   | sleep 2 | GNU Parallel (-j 12) | 0m6.375s  |\n      |   30    | h-cluster1-32 |   12   | sleep 2 | GNU Parallel (-j 24) | 0m4.255s  |\n      +---------+---------------+--------+---------+----------------------+-----------+\n\n\n## GNU parallel\n\nResources: \n\n* [Official documentation](http://www.gnu.org/software/parallel/man.html),\n  crappy yet useful and full of concrete examples. \n* [Wiki SciNet](http://wiki.scinethpc.ca/wiki/index.php/User_Serial)\n* [Slides on GNU Parallel for Large Batches of Small Jobs](http://wiki.scinethpc.ca/wiki/images/archive/7/7b/20121114192300!Tech-talk-gnu-parallel.pdf)\n* [GNU Parallel and PBS](http://web0.tc.cornell.edu/wiki/index.php?title=Gnu_Parallel)\n* [GNU parallel introduction](http://www.admin-magazine.com/HPC/Articles/GNU-Parallel-Multicore-at-the-Command-Line-with-GNU-Parallel)\n* [Using GNU Parallel to Package Multiple Jobs in a Single PBS Job](http://www.nas.nasa.gov/hecc/support/kb/Using-GNU-Parallel-to-Package-Multiple-Jobs-in-a-Single-PBS-Job_303.html)\n\n## Running a bunch of serial tasks on more than a single node\n\nIf you have hundreds of serial tasks that you want to run concurrently and you\nreserved more than one nodes, then the approach above, while useful, would\nrequire tens of scripts to be submitted  in separate OAR jobs (each of them\nreserving 1 full nodes). \n\nIt is also possible to use [GNU parallel](http://www.gnu.org/software/parallel/)\nin this case, using the `--sshlogin` options (altered to use the `oarsh`\nconnector). \nThis is illustrated in the generic launcher proposed in `\n\n\n\n## Running MPI programs\n\nYou'll find an example of launcher script for MPI jobs in\n`bash/MPI/mpi_launcher.sh`. \nExamples of usage are proposed in `examples/MPI/` \n\n\n# Contributing to this repository \n\n## Pre-requisites\n\n### Git\n\nYou should become familiar (if not yet) with Git. Consider these resources:\n\n* [Git book](http://book.git-scm.com/index.html)\n* [Github:help](http://help.github.com/mac-set-up-git/)\n* [Git reference](http://gitref.org/)\n\n### git-flow\n\nThe Git branching model for this repository follows the guidelines of [gitflow](http://nvie.com/posts/a-successful-git-branching-model/).\nIn particular, the central repo (on `github.com`) holds two main branches with an infinite lifetime:\n\n* `production`: the *production-ready* benchmark data \n* `devel`: the main branch where the latest developments interviene. This is\n  the *default* branch you get when you clone the repo.\n\n### Local repository setup\n\nThis repository is hosted on out [GitHub](https://github.com/ULHPC/launcher-scripts).\nOnce cloned, initiate the potential git submodules etc. by running: \n\n    $\u003e cd launcher-scripts\n    $\u003e make setup\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulhpc%2Flauncher-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulhpc%2Flauncher-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulhpc%2Flauncher-scripts/lists"}