diff --git a/_sources/oar.rst.txt b/_sources/oar.rst.txt index 1827df8..cb71410 100644 --- a/_sources/oar.rst.txt +++ b/_sources/oar.rst.txt @@ -40,6 +40,25 @@ You can cancel all your jobs at once by typing: where username should be replaced by your ID. +Record the last Job ID and state +-------------------------------- + +It can be useful to record the ID of the last launched job. + +.. code:: bash + + oarsub -S ./myjob.sh + oarstat -u username | awk '{print $1}' | tail -n 1 > last_job_id.txt + +where username should be replaced by your ID. The file `last_job_id.txt` +will contain the ID of the last launched job. You can also record the entire state +of the job: + +.. code:: bash + + last_job_id=$(oarstat -u username | awk '{print $1}' | tail -n 1) + oarstat -u username -j "$last_job_id" > last_job_state.txt + Launch Multiple Jobs -------------------- diff --git a/oar.html b/oar.html index 64cf8bf..02f441d 100644 --- a/oar.html +++ b/oar.html @@ -148,6 +148,21 @@

Cancel All Your Jobs at Once +

Record the last Job ID and state

+

It can be useful to record the ID of the last launched job.

+
oarsub -S ./myjob.sh
+oarstat -u username | awk '{print $1}' | tail -n 1 > last_job_id.txt
+
+
+

where username should be replaced by your ID. The file last_job_id.txt +will contain the ID of the last launched job. You can also record the entire state +of the job:

+
last_job_id=$(oarstat -u username | awk '{print $1}' | tail -n 1)
+oarstat -u username -j "$last_job_id" > last_job_state.txt
+
+
+

Launch Multiple Jobs

Here, tips to efficiently launch multiple jobs are provided.

@@ -181,6 +196,7 @@

Launch Multiple JobsOAR tips diff --git a/searchindex.js b/searchindex.js index e9452e7..2824e82 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"1. Compile the HTML Webpage Locally": [[4, "compile-the-html-webpage-locally"]], "1. Set Up Your SSH Key": [[0, "set-up-your-ssh-key"]], "2. Clone a GitHub Repository": [[0, "clone-a-github-repository"]], "2. View the Compiled HTML": [[4, "view-the-compiled-html"]], "3. Check the Status of Your Repository": [[0, "check-the-status-of-your-repository"]], "3. Modify the Documentation": [[4, "modify-the-documentation"]], "4. Create and Switch to a New Branch": [[0, "create-and-switch-to-a-new-branch"]], "4. Re-compile the HTML Webpage": [[4, "re-compile-the-html-webpage"]], "5. Commit and Push Changes": [[4, "commit-and-push-changes"]], "5. Edit Files and Stage Changes": [[0, "edit-files-and-stage-changes"]], "6. Commit and Push Changes": [[0, "commit-and-push-changes"]], "7. Create a Pull Request": [[0, "create-a-pull-request"]], "8. Delete the Branch Locally (Optional)": [[0, "delete-the-branch-locally-optional"]], "Cancel All Your Jobs at Once": [[3, "cancel-all-your-jobs-at-once"]], "Choose where to compile LAMMPS": [[2, "choose-where-to-compile-lammps"]], "Compile LAMMPS": [[2, "compile-lammps"]], "Contents:": [[1, null]], "Contributing to this Documentation": [[4, "contributing-to-this-documentation"]], "Contributors:": [[1, null]], "Download LAMMPS": [[2, "download-lammps"]], "GIT tips": [[0, null]], "LAMMPS tips": [[2, null]], "Launch Multiple Jobs": [[3, "launch-multiple-jobs"]], "Launch multiple jobs using bash": [[2, "launch-multiple-jobs-using-bash"]], "OAR tips": [[3, null]], "Run LAMMPS": [[2, "run-lammps"]], "Sphinx tips": [[4, null]], "Submit Jobs with Dependencies": [[3, "submit-jobs-with-dependencies"]], "Unofficial PSM tips and tricks": [[1, null]]}, "docnames": ["git", "index", "lammps", "oar", "sphinx"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["git.rst", "index.rst", "lammps.rst", "oar.rst", "sphinx.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [0, 2, 3, 4], "0": [2, 3], "00": 2, "1": [2, 3], "12": 2, "2": [2, 3], "25": 3, "4": 2, "5": 3, "50": 3, "For": [0, 2, 4], "If": [0, 1, 2, 4], "In": 3, "On": 0, "The": [0, 2], "Then": 2, "To": [0, 2, 4], "access": 2, "account": 0, "ad": 4, "adapt": 2, "add": [0, 4], "addition": 2, "affect": 0, "after": [0, 3, 4], "again": [0, 4], "all": 2, "allow": 2, "alwai": 4, "an": [2, 4], "ani": 0, "appli": 2, "appropri": 4, "ar": [0, 2, 3, 4], "arrai": 3, "assum": [0, 2, 3], "avail": 2, "avoid": 4, "awk": 3, "bash": 3, "bat": 4, "bc": 3, "befor": 3, "behavior": 2, "below": 0, "bettik": 2, "bigfoot": 2, "bin": [2, 3], "browser": [0, 4], "build": 4, "c": 2, "can": [0, 1, 2, 3, 4], "captur": 3, "case": 2, "cat": 2, "checkout": 0, "chmod": 2, "choic": 2, "clean": 4, "click": 0, "code": [0, 2], "collect": 3, "com": 0, "command": [0, 2, 4], "compar": 0, "complet": 3, "comput": 0, "configur": 2, "confirm": 4, "conflict": 4, "connect": 0, "contact": 1, "contain": [2, 4], "content": [2, 4], "contribut": 1, "copi": 0, "core": 2, "cpu": 2, "creat": [2, 4], "current": 2, "d": 0, "dahu": 2, "deal": 2, "delet": 4, "depend": 4, "descript": 0, "detail": 4, "differ": 2, "directli": 4, "directori": 4, "discuss": 1, "do": [2, 4], "doc": 4, "done": [2, 3], "duplic": 0, "durat": 2, "e": [0, 2, 3], "each": 3, "echo": 3, "editor": 0, "effici": 3, "email": 1, "err": 2, "exactli": 2, "exampl": [0, 2, 3], "execut": 2, "exist": 4, "explain": 0, "f": 3, "fail": 4, "few": 1, "file": [2, 4], "final": 0, "find": [0, 2], "first": [0, 4], "folder": [2, 4], "follow": [2, 3], "fork": 0, "format": 4, "from": [0, 2, 3, 4], "g": 3, "gcc": 2, "gener": 4, "get": [0, 3], "git": [1, 4], "github": 1, "grep": [2, 3], "gricad": [1, 3], "group": 2, "guidanc": 4, "gz": 2, "ha": 2, "have": [2, 3], "help": [0, 1], "here": [0, 2, 3], "home": 2, "hour": 2, "how": [0, 4], "http": 2, "i": [0, 2, 3, 4], "id": [2, 3], "import": 4, "includ": 4, "index": [3, 4], "indic": 0, "initi": 2, "input": 2, "instal": 4, "instanc": 2, "instruct": 4, "interest": 1, "io": 0, "its": 3, "job1": 3, "job1_id": 3, "job2": 3, "l": [2, 3], "lammp": 1, "last": 2, "latest": 4, "like": 0, "line": 2, "link": 0, "ll": 0, "lmp": 2, "lmp_mpi": 2, "load": 2, "locat": 4, "log": 2, "longer": 0, "m": 0, "made": 4, "mai": 2, "main": 0, "make": [0, 2, 4], "manag": 3, "manual": 2, "md": 0, "member": [0, 2], "merg": 0, "messag": 0, "might": 4, "modif": [0, 4], "modifi": 0, "most": 0, "mpi": 2, "mpirun": 2, "multi": 2, "must": 2, "myvari": 2, "n": [2, 3], "name": 2, "natig": 0, "navid": 2, "navig": [0, 4], "nb2": 2, "necessari": [0, 4], "need": [0, 2, 4], "never": 4, "new": [2, 4], "newlin": 2, "next": 0, "nix": 2, "node": 2, "np": 2, "oar": [1, 2, 4], "oar_array_id": 3, "oar_job_id": 3, "oar_jobid": 2, "oardel": 3, "oarstat": 3, "oarsub": [2, 3], "old": 2, "oldlin": 2, "onc": [0, 4], "one": [2, 3], "onli": [2, 3], "open": [0, 4], "openmpi": 2, "org": 2, "organ": 0, "origin": 0, "otherwis": 2, "out": 2, "own": 0, "p": 2, "page": [0, 1, 3], "parallel": 2, "parent": 4, "pass": 2, "path": 2, "perform": 1, "pip": 4, "pleas": 1, "pr": 2, "prefer": 4, "prepar": 0, "previou": 4, "print": 3, "process": 2, "project": 2, "provid": 3, "psm": 0, "public": 0, "r": 4, "random": 2, "re": [0, 1], "readm": 0, "recent": 0, "recompil": 4, "refer": 4, "reflect": 4, "regener": 4, "releas": 2, "replac": [2, 3], "repositori": 4, "request": 2, "requir": 4, "review": 0, "right": 0, "rst": 4, "run": [3, 4], "sai": 2, "save": 2, "script": [2, 3], "second": [2, 4], "secur": 0, "sed": 2, "see": [0, 4], "seed": 2, "seedin": 2, "select": 0, "send": 2, "serial": 2, "set": 2, "sh": [2, 3], "share": 1, "shell": 2, "should": [0, 3], "side": 0, "simpli": 2, "simul": [1, 2], "singl": 2, "site": 2, "so": 3, "some": [0, 3], "sourc": [2, 4], "sphinx": 1, "src": 2, "stabl": 2, "start": [0, 1, 3], "stderr": 2, "stdout": 2, "step": 4, "store": 2, "structur": 4, "sub": 2, "submiss": 2, "success": 4, "system": 3, "t": 3, "tabl": 4, "tamtam": 2, "tar": 2, "temperatur": 3, "templat": 4, "termin": 2, "test": 2, "text": 0, "them": 0, "thi": [0, 1, 2, 3], "time": [0, 4], "total": 2, "trick": 3, "troubleshoot": 4, "try": 0, "two": 3, "txt": 4, "type": [2, 3, 4], "u": [1, 3], "unexpect": 2, "updat": 4, "update_readm": 0, "upstream": 0, "us": [0, 3, 4], "usernam": 3, "valu": 2, "var": 2, "variabl": 2, "ve": 4, "version": 2, "vi": 0, "via": 1, "wa": 2, "wait": 3, "walltim": 2, "want": 2, "web": [0, 4], "webpag": 2, "websit": 0, "well": 2, "wget": 2, "when": 0, "where": [3, 4], "which": [3, 4], "wish": 3, "without": 0, "work": 0, "x": 2, "xarg": 3, "xzvf": 2, "you": [0, 1, 2, 3, 4], "your": [2, 4]}, "titles": ["GIT tips", "Unofficial PSM tips and tricks", "LAMMPS tips", "OAR tips", "Sphinx tips"], "titleterms": {"1": [0, 4], "2": [0, 4], "3": [0, 4], "4": [0, 4], "5": [0, 4], "6": 0, "7": 0, "8": 0, "all": 3, "bash": 2, "branch": 0, "cancel": 3, "chang": [0, 4], "check": 0, "choos": 2, "clone": 0, "commit": [0, 4], "compil": [2, 4], "content": 1, "contribut": 4, "contributor": 1, "creat": 0, "delet": 0, "depend": 3, "document": 4, "download": 2, "edit": 0, "file": 0, "git": 0, "github": 0, "html": 4, "job": [2, 3], "kei": 0, "lammp": 2, "launch": [2, 3], "local": [0, 4], "modifi": 4, "multipl": [2, 3], "new": 0, "oar": 3, "onc": 3, "option": 0, "psm": 1, "pull": 0, "push": [0, 4], "re": 4, "repositori": 0, "request": 0, "run": 2, "set": 0, "sphinx": 4, "ssh": 0, "stage": 0, "statu": 0, "submit": 3, "switch": 0, "thi": 4, "tip": [0, 1, 2, 3, 4], "trick": 1, "unoffici": 1, "up": 0, "us": 2, "view": 4, "webpag": 4, "where": 2, "your": [0, 3]}}) \ No newline at end of file +Search.setIndex({"alltitles": {"1. Compile the HTML Webpage Locally": [[4, "compile-the-html-webpage-locally"]], "1. Set Up Your SSH Key": [[0, "set-up-your-ssh-key"]], "2. Clone a GitHub Repository": [[0, "clone-a-github-repository"]], "2. View the Compiled HTML": [[4, "view-the-compiled-html"]], "3. Check the Status of Your Repository": [[0, "check-the-status-of-your-repository"]], "3. Modify the Documentation": [[4, "modify-the-documentation"]], "4. Create and Switch to a New Branch": [[0, "create-and-switch-to-a-new-branch"]], "4. Re-compile the HTML Webpage": [[4, "re-compile-the-html-webpage"]], "5. Commit and Push Changes": [[4, "commit-and-push-changes"]], "5. Edit Files and Stage Changes": [[0, "edit-files-and-stage-changes"]], "6. Commit and Push Changes": [[0, "commit-and-push-changes"]], "7. Create a Pull Request": [[0, "create-a-pull-request"]], "8. Delete the Branch Locally (Optional)": [[0, "delete-the-branch-locally-optional"]], "Cancel All Your Jobs at Once": [[3, "cancel-all-your-jobs-at-once"]], "Choose where to compile LAMMPS": [[2, "choose-where-to-compile-lammps"]], "Compile LAMMPS": [[2, "compile-lammps"]], "Contents:": [[1, null]], "Contributing to this Documentation": [[4, "contributing-to-this-documentation"]], "Contributors:": [[1, null]], "Download LAMMPS": [[2, "download-lammps"]], "GIT tips": [[0, null]], "LAMMPS tips": [[2, null]], "Launch Multiple Jobs": [[3, "launch-multiple-jobs"]], "Launch multiple jobs using bash": [[2, "launch-multiple-jobs-using-bash"]], "OAR tips": [[3, null]], "Record the last Job ID and state": [[3, "record-the-last-job-id-and-state"]], "Run LAMMPS": [[2, "run-lammps"]], "Sphinx tips": [[4, null]], "Submit Jobs with Dependencies": [[3, "submit-jobs-with-dependencies"]], "Unofficial PSM tips and tricks": [[1, null]]}, "docnames": ["git", "index", "lammps", "oar", "sphinx"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["git.rst", "index.rst", "lammps.rst", "oar.rst", "sphinx.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [0, 2, 3, 4], "0": [2, 3], "00": 2, "1": [2, 3], "12": 2, "2": [2, 3], "25": 3, "4": 2, "5": 3, "50": 3, "For": [0, 2, 4], "If": [0, 1, 2, 4], "In": 3, "It": 3, "On": 0, "The": [0, 2, 3], "Then": 2, "To": [0, 2, 4], "access": 2, "account": 0, "ad": 4, "adapt": 2, "add": [0, 4], "addition": 2, "affect": 0, "after": [0, 3, 4], "again": [0, 4], "all": 2, "allow": 2, "also": 3, "alwai": 4, "an": [2, 4], "ani": 0, "appli": 2, "appropri": 4, "ar": [0, 2, 3, 4], "arrai": 3, "assum": [0, 2, 3], "avail": 2, "avoid": 4, "awk": 3, "bash": 3, "bat": 4, "bc": 3, "befor": 3, "behavior": 2, "below": 0, "bettik": 2, "bigfoot": 2, "bin": [2, 3], "browser": [0, 4], "build": 4, "c": 2, "can": [0, 1, 2, 3, 4], "captur": 3, "case": 2, "cat": 2, "checkout": 0, "chmod": 2, "choic": 2, "clean": 4, "click": 0, "code": [0, 2], "collect": 3, "com": 0, "command": [0, 2, 4], "compar": 0, "complet": 3, "comput": 0, "configur": 2, "confirm": 4, "conflict": 4, "connect": 0, "contact": 1, "contain": [2, 3, 4], "content": [2, 4], "contribut": 1, "copi": 0, "core": 2, "cpu": 2, "creat": [2, 4], "current": 2, "d": 0, "dahu": 2, "deal": 2, "delet": 4, "depend": 4, "descript": 0, "detail": 4, "differ": 2, "directli": 4, "directori": 4, "discuss": 1, "do": [2, 4], "doc": 4, "done": [2, 3], "duplic": 0, "durat": 2, "e": [0, 2, 3], "each": 3, "echo": 3, "editor": 0, "effici": 3, "email": 1, "entir": 3, "err": 2, "exactli": 2, "exampl": [0, 2, 3], "execut": 2, "exist": 4, "explain": 0, "f": 3, "fail": 4, "few": 1, "file": [2, 3, 4], "final": 0, "find": [0, 2], "first": [0, 4], "folder": [2, 4], "follow": [2, 3], "fork": 0, "format": 4, "from": [0, 2, 3, 4], "g": 3, "gcc": 2, "gener": 4, "get": [0, 3], "git": [1, 4], "github": 1, "grep": [2, 3], "gricad": [1, 3], "group": 2, "guidanc": 4, "gz": 2, "ha": 2, "have": [2, 3], "help": [0, 1], "here": [0, 2, 3], "home": 2, "hour": 2, "how": [0, 4], "http": 2, "i": [0, 2, 3, 4], "id": 2, "import": 4, "includ": 4, "index": [3, 4], "indic": 0, "initi": 2, "input": 2, "instal": 4, "instanc": 2, "instruct": 4, "interest": 1, "io": 0, "its": 3, "j": 3, "job1": 3, "job1_id": 3, "job2": 3, "l": [2, 3], "lammp": 1, "last": 2, "last_job_id": 3, "last_job_st": 3, "latest": 4, "like": 0, "line": 2, "link": 0, "ll": 0, "lmp": 2, "lmp_mpi": 2, "load": 2, "locat": 4, "log": 2, "longer": 0, "m": 0, "made": 4, "mai": 2, "main": 0, "make": [0, 2, 4], "manag": 3, "manual": 2, "md": 0, "member": [0, 2], "merg": 0, "messag": 0, "might": 4, "modif": [0, 4], "modifi": 0, "most": 0, "mpi": 2, "mpirun": 2, "multi": 2, "must": 2, "myjob": 3, "myvari": 2, "n": [2, 3], "name": 2, "natig": 0, "navid": 2, "navig": [0, 4], "nb2": 2, "necessari": [0, 4], "need": [0, 2, 4], "never": 4, "new": [2, 4], "newlin": 2, "next": 0, "nix": 2, "node": 2, "np": 2, "oar": [1, 2, 4], "oar_array_id": 3, "oar_job_id": 3, "oar_jobid": 2, "oardel": 3, "oarstat": 3, "oarsub": [2, 3], "old": 2, "oldlin": 2, "onc": [0, 4], "one": [2, 3], "onli": [2, 3], "open": [0, 4], "openmpi": 2, "org": 2, "organ": 0, "origin": 0, "otherwis": 2, "out": 2, "own": 0, "p": 2, "page": [0, 1, 3], "parallel": 2, "parent": 4, "pass": 2, "path": 2, "perform": 1, "pip": 4, "pleas": 1, "pr": 2, "prefer": 4, "prepar": 0, "previou": 4, "print": 3, "process": 2, "project": 2, "provid": 3, "psm": 0, "public": 0, "r": 4, "random": 2, "re": [0, 1], "readm": 0, "recent": 0, "recompil": 4, "refer": 4, "reflect": 4, "regener": 4, "releas": 2, "replac": [2, 3], "repositori": 4, "request": 2, "requir": 4, "review": 0, "right": 0, "rst": 4, "run": [3, 4], "sai": 2, "save": 2, "script": [2, 3], "second": [2, 4], "secur": 0, "sed": 2, "see": [0, 4], "seed": 2, "seedin": 2, "select": 0, "send": 2, "serial": 2, "set": 2, "sh": [2, 3], "share": 1, "shell": 2, "should": [0, 3], "side": 0, "simpli": 2, "simul": [1, 2], "singl": 2, "site": 2, "so": 3, "some": [0, 3], "sourc": [2, 4], "sphinx": 1, "src": 2, "stabl": 2, "start": [0, 1, 3], "stderr": 2, "stdout": 2, "step": 4, "store": 2, "structur": 4, "sub": 2, "submiss": 2, "success": 4, "system": 3, "t": 3, "tabl": 4, "tail": 3, "tamtam": 2, "tar": 2, "temperatur": 3, "templat": 4, "termin": 2, "test": 2, "text": 0, "them": 0, "thi": [0, 1, 2, 3], "time": [0, 4], "total": 2, "trick": 3, "troubleshoot": 4, "try": 0, "two": 3, "txt": [3, 4], "type": [2, 3, 4], "u": [1, 3], "unexpect": 2, "updat": 4, "update_readm": 0, "upstream": 0, "us": [0, 3, 4], "usernam": 3, "valu": 2, "var": 2, "variabl": 2, "ve": 4, "version": 2, "vi": 0, "via": 1, "wa": 2, "wait": 3, "walltim": 2, "want": 2, "web": [0, 4], "webpag": 2, "websit": 0, "well": 2, "wget": 2, "when": 0, "where": [3, 4], "which": [3, 4], "wish": 3, "without": 0, "work": 0, "x": 2, "xarg": 3, "xzvf": 2, "you": [0, 1, 2, 3, 4], "your": [2, 4]}, "titles": ["GIT tips", "Unofficial PSM tips and tricks", "LAMMPS tips", "OAR tips", "Sphinx tips"], "titleterms": {"1": [0, 4], "2": [0, 4], "3": [0, 4], "4": [0, 4], "5": [0, 4], "6": 0, "7": 0, "8": 0, "all": 3, "bash": 2, "branch": 0, "cancel": 3, "chang": [0, 4], "check": 0, "choos": 2, "clone": 0, "commit": [0, 4], "compil": [2, 4], "content": 1, "contribut": 4, "contributor": 1, "creat": 0, "delet": 0, "depend": 3, "document": 4, "download": 2, "edit": 0, "file": 0, "git": 0, "github": 0, "html": 4, "id": 3, "job": [2, 3], "kei": 0, "lammp": 2, "last": 3, "launch": [2, 3], "local": [0, 4], "modifi": 4, "multipl": [2, 3], "new": 0, "oar": 3, "onc": 3, "option": 0, "psm": 1, "pull": 0, "push": [0, 4], "re": 4, "record": 3, "repositori": 0, "request": 0, "run": 2, "set": 0, "sphinx": 4, "ssh": 0, "stage": 0, "state": 3, "statu": 0, "submit": 3, "switch": 0, "thi": 4, "tip": [0, 1, 2, 3, 4], "trick": 1, "unoffici": 1, "up": 0, "us": 2, "view": 4, "webpag": 4, "where": 2, "your": [0, 3]}}) \ No newline at end of file