{ "info": { "author": "Bas Nijholt", "author_email": "basnijholt@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# hpc05\n[![PyPI](https://img.shields.io/pypi/v/hpc05.svg)](https://pypi.python.org/pypi/hpc05)\n[![Conda](https://anaconda.org/conda-forge/hpc05/badges/installer/conda.svg)](https://anaconda.org/conda-forge/hpc05)\n[![Downloads](https://anaconda.org/conda-forge/hpc05/badges/downloads.svg)](https://anaconda.org/conda-forge/hpc05)\n\n\ud83d\udda5 `ipyparallel.Client` package for a PBS or SLURM cluster with a headnode.\n\nScript that connects to PBS or SLURM cluster with headnode over ssh. Since `ipyparallel` doesn't cull enginges when inactive and people are lazy (because they forget to `qdel` their jobs), it automatically kills the `ipengines` after the set timeout (default=15 min). Note that this package doesn't only work for the `hpc05` cluster on the TU Delft but also other clusters.\n\n# Installation\nFirst install this package on **both** your machine and the cluster.\n\n```bash\nconda config --add channels conda-forge\nconda install hpc05\n```\nor using `pip`\n```\npip install hpc05\n```\n\nMake sure you can connect over `ssh` passwordless by copying your ssh key:\n\n```bash\nssh-copy-id hpc05\n```\n\n# Setup profile\nYou need a parallel profile on your cluster, which can be created by the following command on your local machine:\n```python\nimport hpc05\n# for PBS use\nhpc05.create_remote_pbs_profile(profile='pbs', hostname='hpc05') # on the remote machine\n# or\nhpc05.create_local_pbs_profile(profile='pbs') # on the cluster\n\n# for SLURM use\nhpc05.create_remote_slurm_profile(profile='slurm', hostname='hpc05') # on the remote machine\n# or\nhpc05.create_local_slurm_profile(profile='slurm') # on the cluster\n```\n\n# Start `ipcluster` and connect (via `ssh`)\nTo start **and** connect to an `ipcluster` just do (and read the error messages if any, for instructions):\n```python\nclient, dview, lview = hpc05.start_remote_and_connect(\n\tn=100, profile='pbs', hostname='hpc05', folder='~/your_folder_on_the_cluster/')\n```\n\nThis is equivent to the following three commmands:\n```python\n# 0. Killing and removing files of an old ipcluster (this is optional with\n# the `start_remote_and_connect` function, use the `kill_old_ipcluster` argument)\nhpc05.kill_remote_ipcluster(hostname='hpc05')\n\n# 1. starting an `ipcluster`, similar to running\n# `ipcluster start --n=100 --profile=pbs` on the cluster headnode.\nhpc05.start_remote_ipcluster(n=100, profile='pbs', hostname='hpc05')\n\n# 2. Connecting to the started ipcluster and adding a folder to the cluster's `PATH`\nclient, dview, lview = hpc05.connect_ipcluster(\n\tn=200, profile='pbs', hostname='hpc05', folder='~/your_folder_on_the_cluster/')\n\n```\n\n\n# Start `ipcluster` and connect (on cluster headnode)\nTo start **and** connect to an `ipcluster` just do (and read the error messages if any, for instructions):\n```python\nclient, dview, lview = hpc05.start_and_connect(\n\tn=100, profile='pbs', folder='~/your_folder_on_the_cluster/')\n```\n\nThis is equivent to the following three commmands:\n```python\n# 0. Killing and removing files of an old ipcluster (this is optional with\n# the `start_remote_and_connect` function, use the `kill_old_ipcluster` argument)\nhpc05.kill_ipcluster()\n\n# 1. starting an `ipcluster`, similar to `ipcluster start --n=200 --profile=pbs`\nhpc05.start_ipcluster(n=200, profile='pbs')\n\n# 2. Connecting to the started ipcluster and adding a folder to the cluster's `PATH`\nclient, dview, lview = hpc05.connect_ipcluster(\n\tn=200, profile='pbs', folder='~/your_folder_on_the_cluster/')\n\n```\n\n# Monitor resources\nThis package will monitor your resources if you start it with `hpc05_monitor.start(client)`, see the following example use:\n```python\nimport time\nimport hpc05_monitor\nhpc05_monitor.start(client, interval=5) # update hpc05_monitor.MAX_USAGE every 'interval' seconds.\n\nwhile not hpc05_monitor.LATEST_DATA:\n time.sleep(1)\n\nhpc05_monitor.print_usage() # uses hpc05_monitor.LATEST_DATA by default\n\nhpc05_monitor.print_max_usage() # uses hpc05_monitor.MAX_USAGE\n```\n\nWith output:\n```\n id hostname date CPU% MEM%\n 15 node29.q1cluster 2018-09-10T14:25:05.350499 190% 3%\n 19 node29.q1cluster 2018-09-10T14:25:04.860693 200% 3%\n 26 node29.q1cluster 2018-09-10T14:25:05.324466 200% 3%\n 28 node29.q1cluster 2018-09-10T14:25:05.148623 190% 2%\n 29 node29.q1cluster 2018-09-10T14:25:04.737664 190% 3%\n ...\n```\n\n\n## Development\n\nWe use [pre-commit](https://pre-commit.com) for linting of the code, so `pip install pre_commit` and run\n```\npre-commit install\n```\nin the repository.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/basnijholt/hpc05", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hpc05", "package_url": "https://pypi.org/project/hpc05/", "platform": "", "project_url": "https://pypi.org/project/hpc05/", "project_urls": { "Homepage": "https://github.com/basnijholt/hpc05" }, "release_url": "https://pypi.org/project/hpc05/2.0.4/", "requires_dist": [ "ipyparallel", "pexpect", "pyzmq", "paramiko", "tornado", "psutil" ], "requires_python": ">=3.6", "summary": "Client package for PBS and SLURM clusters with a headnode.", "version": "2.0.4" }, "last_serial": 5519086, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "1532ecc788776e39b79ff50d1b095d04", "sha256": "b0790014b05a7961312c48621ba6d3667280a4cd37e8ae1a6798dc595a3c4422" }, "downloads": -1, "filename": "hpc05-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1532ecc788776e39b79ff50d1b095d04", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18728, "upload_time": "2019-06-06T18:37:21", "url": "https://files.pythonhosted.org/packages/c3/c6/b5a2bd7228202252bed2bffa9ba72019d716e39df67a87fcf43aad798759/hpc05-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f2f6658227c8df9bc73899abbd85825", "sha256": "df176cea93b69eba0ff95f216ef7ea7f6d7309a70cd09e5fc78048961041d88a" }, "downloads": -1, "filename": "hpc05-2.0.0.tar.gz", "has_sig": false, "md5_digest": "8f2f6658227c8df9bc73899abbd85825", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16349, "upload_time": "2019-06-06T18:37:23", "url": "https://files.pythonhosted.org/packages/4c/c2/3b0de5422e71b7bfe6ac627e241b46c6a3aa136f780fc71322b5af026f15/hpc05-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "55e5d8983ca7531eb59ec9889d601fbe", "sha256": "196b51f80134a1d551cdd6900e8be0b0d8a0ff2951a0be4ff575dcdaf558f5a2" }, "downloads": -1, "filename": "hpc05-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "55e5d8983ca7531eb59ec9889d601fbe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18955, "upload_time": "2019-06-06T18:45:17", "url": "https://files.pythonhosted.org/packages/1e/6b/ccd560b6c0f25195e39a3066dddf262541ac54c7363753014e0350083d67/hpc05-2.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "21abc88ad496749bbf5f7f30eec7cd4d", "sha256": "0938cd0f90a370c1f54a84dee45a4c0a1fef6e40e0015544e7f9ba2bc6a1f3f8" }, "downloads": -1, "filename": "hpc05-2.0.1.tar.gz", "has_sig": false, "md5_digest": "21abc88ad496749bbf5f7f30eec7cd4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16695, "upload_time": "2019-06-06T18:45:18", "url": "https://files.pythonhosted.org/packages/1c/c4/3050fdaf03952a6dbfccb5d0df9c6cbbe781398e5f8582d2ca22f80f6887/hpc05-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "9b7a3fdce2896f126b6420518f8bfdd6", "sha256": "116de6edc9321cb64442b5d9e43300c9ba637c90f95a343c65cd11eff5c0509f" }, "downloads": -1, "filename": "hpc05-2.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9b7a3fdce2896f126b6420518f8bfdd6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19066, "upload_time": "2019-06-11T17:54:42", "url": "https://files.pythonhosted.org/packages/3b/39/cd591541f9e8b31cec278ca2e6af1244c345964f9254b8b06a632f2fc6d0/hpc05-2.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a0c3fbc41559a1061adb14480b584b76", "sha256": "3913706dace496031e25643cb701b99b7f548371e5e7254478aa0c13bc8e67c3" }, "downloads": -1, "filename": "hpc05-2.0.2.tar.gz", "has_sig": false, "md5_digest": "a0c3fbc41559a1061adb14480b584b76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16957, "upload_time": "2019-06-11T17:54:44", "url": "https://files.pythonhosted.org/packages/6d/e6/dd2878e7b5fb434ac41ce926ba3377112d6f63fcb59acf2a0cfff9a6140a/hpc05-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "6fc72f58eaf1452a3ef5776a539bd8cc", "sha256": "235907cb66dab3f5737807a02c8a2f02924b8f8c8310f0c0a728dcb4dafeab4a" }, "downloads": -1, "filename": "hpc05-2.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "6fc72f58eaf1452a3ef5776a539bd8cc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 20215, "upload_time": "2019-06-11T23:43:55", "url": "https://files.pythonhosted.org/packages/a1/04/edce06d2a9e9d657ba9849094141cacc411294da19dbffec330e70837342/hpc05-2.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b3f88e43ab6337e87136ab8e65d52010", "sha256": "fda92fbba386dd26f69332153db7eb8e2e0212f5ebdc6d7d62965e4eb3bac924" }, "downloads": -1, "filename": "hpc05-2.0.3.tar.gz", "has_sig": false, "md5_digest": "b3f88e43ab6337e87136ab8e65d52010", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 18234, "upload_time": "2019-06-11T23:43:57", "url": "https://files.pythonhosted.org/packages/6a/32/af575ce089a771f43cfc426de3ba9c27ee4e18c2c48c06143a60af277aba/hpc05-2.0.3.tar.gz" } ], "2.0.4": [ { "comment_text": "", "digests": { "md5": "c22f7628801fdc1339ad9a49096e785b", "sha256": "e7c7bab2ac2a0771de6207b17c0d4875b441d6c8e021b6a6457024177839acba" }, "downloads": -1, "filename": "hpc05-2.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c22f7628801fdc1339ad9a49096e785b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 20249, "upload_time": "2019-07-11T16:34:07", "url": "https://files.pythonhosted.org/packages/c5/2f/87b56f4cdd323c60905fce4e4abeb9ed675826cf78cc8bc0702f25db9f8c/hpc05-2.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "024dfc752a485fbe5f14feff904d1fbb", "sha256": "6751a3c21123db8801d55fa822efc1afa32a2ecc70190289fed266c9de61ee69" }, "downloads": -1, "filename": "hpc05-2.0.4.tar.gz", "has_sig": false, "md5_digest": "024dfc752a485fbe5f14feff904d1fbb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 18205, "upload_time": "2019-07-11T16:34:08", "url": "https://files.pythonhosted.org/packages/1c/97/ce9ef74fb6bcee449d5aae4187520ddcdba90f5850065f71c17dbc690b9c/hpc05-2.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c22f7628801fdc1339ad9a49096e785b", "sha256": "e7c7bab2ac2a0771de6207b17c0d4875b441d6c8e021b6a6457024177839acba" }, "downloads": -1, "filename": "hpc05-2.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c22f7628801fdc1339ad9a49096e785b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 20249, "upload_time": "2019-07-11T16:34:07", "url": "https://files.pythonhosted.org/packages/c5/2f/87b56f4cdd323c60905fce4e4abeb9ed675826cf78cc8bc0702f25db9f8c/hpc05-2.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "024dfc752a485fbe5f14feff904d1fbb", "sha256": "6751a3c21123db8801d55fa822efc1afa32a2ecc70190289fed266c9de61ee69" }, "downloads": -1, "filename": "hpc05-2.0.4.tar.gz", "has_sig": false, "md5_digest": "024dfc752a485fbe5f14feff904d1fbb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 18205, "upload_time": "2019-07-11T16:34:08", "url": "https://files.pythonhosted.org/packages/1c/97/ce9ef74fb6bcee449d5aae4187520ddcdba90f5850065f71c17dbc690b9c/hpc05-2.0.4.tar.gz" } ] }