{ "info": { "author": "James K. Glasbrenner", "author_email": "jkglasbrenner@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5" ], "description": "=============\nSSH Custodian\n=============\n\nThis module depends on the Custodian class in the `custodian project\n`_, which is a wrapper that\nmanages jobs running on computing clusters. The custodian module is part of\n`The Materials Project `_.\n\nThis module extends the Custodian class by creating the subclass SSHCustodian,\nwhich adds the functionality to copy the temporary directory created via monty\nto the scratch partitions on slave compute nodes, provided that the cluster's\nfile-system is configured in this way. The implementation invokes a sub-process\nto utilize the ssh executable installed on the cluster, so it is not\nparticularly elegant or platform independent, nor is this solution likely to be\ngeneral to all clusters. This is why this modification has not been submitted\nas a pull request to the main Custodian project.\n\nYou use SSHCustodian in the same way as the Custodian class, and it should\nintegrate in with your existing scripts. The SSHCustodian class takes two\nadditional arguments when creating a new instance, ``scratch_dir_node_only``\nand ``pbs_nodefile``::\n\n scratch_dir_node_only (bool): If set to True, custodian will grab the list\n of nodes in the file path provided to pbs_nodefile and use copy the\n temp_dir to the scratch_dir on each node over ssh. This is necessary on\n cluster setups where each node has its own independent scratch\n partition.\n\n pbs_nodefile (str): The filepath to the list of nodes to be used in a\n calculation. If this path does not point to a valid file, then\n scratch_dir_node_only will be automatically set to False.\n\nThe subclass SSHVaspJob was also created, which overrides the setup method to\nalso check the environment variable ``PBS_NUM_PPN`` when ``auto_npar =\nTrue``. This is necessary to implement for using compute node scratch\npartitions on PBS-based queueing systems, as the generic method of using\n``multiprocessing.cpu_count()`` to count the number of cores will include\nhyperthreads, which will overestimate the number of physical cores and lead to\nNPAR being set too large. One consequence of setting NPAR too high is that a\nVASP job will hang, consuming resources but not doing anything useful. If you\nare using this kind of scratch directory, be careful about setting NPAR.\n\nOn many clusters, the filepath for the list of compute nodes is in the\nenvironment variable ``PBS_NODEFILE``, which can be accessed in bash as\n``$PBS_NODEFILE`` and in python using the ``os`` module. An example of\nhow SSHCustodian can be used in a script is the following::\n\n import logging\n import os\n from sshcustodian.sshcustodian import SSHCustodian\n from custodian.vasp.handlers import (VaspErrorHandler,\n UnconvergedErrorHandler,\n MeshSymmetryErrorHandler,\n NonConvergingErrorHandler,\n PotimErrorHandler)\n from custodian.vasp.validators import VasprunXMLValidator\n from sshcustodian.vasp.sshjobs import SSHVaspJob\n from pymatgen.io.vasp import VaspInput\n\n FORMAT = '%(asctime)s %(message)s'\n logging.basicConfig(format=FORMAT, level=logging.INFO, filename=\"run.log\")\n\n class VaspInputArgs:\n def __init__(self):\n \"\"\"\n Set the default values for running a VASP job.\n \"\"\"\n self.static_kpoint = 1\n\n def import_dict(self, in_dict):\n \"\"\"\n Create and update self variables using dictionary.\n \"\"\"\n for (key, value) in iteritems(in_dict):\n if key == \"command\":\n self.command = value\n if key == \"static_kpoint\":\n self.static_kpoint = value\n if key == \"jobs\":\n self.jobs = value\n\n\n def get_runs(args):\n vasp_command = args.command.split()\n njobs = len(args.jobs)\n for i, job in enumerate(args.jobs):\n final = False if i != njobs - 1 else True\n if any(c.isdigit() for c in job):\n suffix = \".\" + job\n else:\n suffix = \".{}{}\".format(job, i + 1)\n settings = []\n backup = True if i == 0 else False\n copy_magmom = False\n vinput = VaspInput.from_directory(\".\")\n if i > 0:\n settings.append(\n {\"file\": \"CONTCAR\",\n \"action\": {\"_file_copy\": {\"dest\": \"POSCAR\"}}})\n job_type = job.lower()\n auto_npar = True\n if job_type.startswith(\"static\"):\n m = [i * args.static_kpoint for i in vinput[\"KPOINTS\"].kpts[0]]\n settings.extend([\n {\"dict\": \"INCAR\",\n \"action\": {\"_set\": {\"NSW\": 0}}},\n {'dict': 'KPOINTS',\n 'action': {'_set': {'kpoints': [m]}}}])\n\n yield SSHVaspJob(vasp_command, final=final, suffix=suffix,\n backup=backup, settings_override=settings,\n copy_magmom=copy_magmom, auto_npar=auto_npar)\n\n\n logging.info(\"Handlers used are %s\" % args.handlers)\n scratch_root = os.path.abspath(\"/scratch\")\n pbs_nodefile = os.environ.get(\"PBS_NODEFILE\")\n job_args = VaspInputArgs()\n job_dict = {\"command\": \"pvasp\",\n \"jobs\": [\"static\"]}\n job_args.import_dict(job_dict)\n handlers = [VaspErrorHandler(), MeshSymmetryErrorHandler(),\n UnconvergedErrorHandler(), NonConvergingErrorHandler(),\n PotimErrorHandler()]\n validators = [VasprunXMLValidator()]\n c = SSHCustodian(handlers, get_runs(job_args), validators,\n checkpoint=True,\n scratch_dir=scratch_root,\n scratch_dir_node_only=True,\n pbs_nodefile=pbs_nodefile)\n c.run()\n\nNote that depending on how your cluster is configured, the ``\"command\":\n\"pvasp\"`` will need to be changed to however you invoke a parallel job.\n\nFor further information on how to use custodian, consult the `custodian project\ndocumentation `_.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jkglasbrenner/sshcustodian/tarball/0.2.6", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jkglasbrenner/sshcustodian", "keywords": "custodian DFT VASP materials hpc queue management", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "SSHCustodian", "package_url": "https://pypi.org/project/SSHCustodian/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/SSHCustodian/", "project_urls": { "Download": "https://github.com/jkglasbrenner/sshcustodian/tarball/0.2.6", "Homepage": "https://github.com/jkglasbrenner/sshcustodian" }, "release_url": "https://pypi.org/project/SSHCustodian/0.2.6/", "requires_dist": [ "custodian", "monty", "six" ], "requires_python": "", "summary": "A modification to the Custodian class in custodian (github.com/materialsproject/custodian) to allow for copying the temp_dir to other compute nodes via ssh.", "version": "0.2.6" }, "last_serial": 2135649, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4ccbc7a36f6515b27c02f16849ca2a9d", "sha256": "afb5d81a3d7ed6d990c745ad5b05c9bd530c945c1219d0887fb55fd63af87e60" }, "downloads": -1, "filename": "SSHCustodian-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4ccbc7a36f6515b27c02f16849ca2a9d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9640, "upload_time": "2016-05-25T20:52:49", "url": "https://files.pythonhosted.org/packages/c9/23/c7c1163cde3507a8533d79588b5bb816272e05cd9ccfbf1c6df22a909161/SSHCustodian-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9baef434927e5b43084d783eb139087f", "sha256": "a31b2c9fe0273f3d2eeebcf46f62a9816e91a3f44df487fa08a55e1610ca6656" }, "downloads": -1, "filename": "SSHCustodian-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9baef434927e5b43084d783eb139087f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6226, "upload_time": "2016-05-25T20:53:19", "url": "https://files.pythonhosted.org/packages/58/1c/a834d3456ae3f92cd26ae7b6449783948123126d76561de88709691c72f0/SSHCustodian-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c94eb406e4c1a96cc3830a702859427a", "sha256": "0ecbcefb36390ed4b562b66ba8515571bc6094d11102cd19c6219c9b8d33ad39" }, "downloads": -1, "filename": "SSHCustodian-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c94eb406e4c1a96cc3830a702859427a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9634, "upload_time": "2016-05-26T04:46:12", "url": "https://files.pythonhosted.org/packages/41/c4/7f2a0e9b0e6fd31a43cadd9cf56e1b2c9a690c1e9aa65d68842e6d511d64/SSHCustodian-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a5bc09c9b8d295685edf62b57174e25", "sha256": "571cd3cbb240a7f82a0c34be346661bb96700e4a2771d46f31f51984c93cd52a" }, "downloads": -1, "filename": "SSHCustodian-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0a5bc09c9b8d295685edf62b57174e25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6215, "upload_time": "2016-05-26T04:46:20", "url": "https://files.pythonhosted.org/packages/5d/62/ab40e94205f6b477c14d13ec119ef132c6e3bf321e17cfafa300d011f5f3/SSHCustodian-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "b5fdf4afed0c62d692ebd756e6f96a40", "sha256": "f9392265c2299ed236efe9ef721e2223baec24f1bf20d476b0c7272b4401007f" }, "downloads": -1, "filename": "SSHCustodian-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b5fdf4afed0c62d692ebd756e6f96a40", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10221, "upload_time": "2016-05-26T16:51:34", "url": "https://files.pythonhosted.org/packages/b2/76/6b1b1587f573703389165f6e641c3eab4a6468e6710ef53ba1184b5fd0af/SSHCustodian-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47199d056ec8e029573e08a1295dae96", "sha256": "191337ca5e2cc10313c8326b3f0bd5675fe63bcb6df89e40dcb75ae533b372f3" }, "downloads": -1, "filename": "SSHCustodian-0.2.0.tar.gz", "has_sig": false, "md5_digest": "47199d056ec8e029573e08a1295dae96", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6552, "upload_time": "2016-05-26T16:51:37", "url": "https://files.pythonhosted.org/packages/33/ff/b869ea944ff8366d000dbd378f1e69b2b549bb94840da282fc0275e19738/SSHCustodian-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "84e5b67be6c0d2e29ff26505870711a9", "sha256": "33d03035879cc512d14c6d0ba4819a6e661a8142017e6bcc73f63af2fcef4103" }, "downloads": -1, "filename": "SSHCustodian-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "84e5b67be6c0d2e29ff26505870711a9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12019, "upload_time": "2016-05-26T16:58:18", "url": "https://files.pythonhosted.org/packages/06/aa/f68a7fe8d32ae9f70886657be749429876722e38a118842b786e6e351c60/SSHCustodian-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6b50f6922e2d420a7c57b10925d9204", "sha256": "4350c2d791dd1f9cc4f19893c284dbd4ebc8e4d501d7d66f6b9479f964330e8e" }, "downloads": -1, "filename": "SSHCustodian-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c6b50f6922e2d420a7c57b10925d9204", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8337, "upload_time": "2016-05-26T16:58:22", "url": "https://files.pythonhosted.org/packages/0f/9b/8dad1f5dc0727fdf67573a65358bac9a0ce15479c62672256f758750b936/SSHCustodian-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a1ab97e184d3dc5f3033458f701417a6", "sha256": "a00c2537a4c6368913b2509df1db0644040af97c095aea76fc1c05ea74863229" }, "downloads": -1, "filename": "SSHCustodian-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a1ab97e184d3dc5f3033458f701417a6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12020, "upload_time": "2016-05-26T17:09:56", "url": "https://files.pythonhosted.org/packages/7c/60/1364f66a7244bfdc25fca429482df8e80e37483bfe5ef01385eb553113b1/SSHCustodian-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28a67cdc957e9a99231b2ce7eb671d78", "sha256": "b0e6b02d25d683feb3032c86315d7d35e32bb74a307e76d28f4ca7e86b721438" }, "downloads": -1, "filename": "SSHCustodian-0.2.2.tar.gz", "has_sig": false, "md5_digest": "28a67cdc957e9a99231b2ce7eb671d78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8333, "upload_time": "2016-05-26T17:10:00", "url": "https://files.pythonhosted.org/packages/75/96/cf402c8528e5bdd45a7089119facd6d1cfd22d9b1692fb3af6b5d9702bfe/SSHCustodian-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "0cbab1e20fe3f0831e092a3061200a80", "sha256": "a966d8306d50a8e0f1d18bfab6e8716e15832d12b0f5f114dc5f83f4875ce1cb" }, "downloads": -1, "filename": "SSHCustodian-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0cbab1e20fe3f0831e092a3061200a80", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13208, "upload_time": "2016-05-26T18:22:33", "url": "https://files.pythonhosted.org/packages/df/5e/c9370604d40839240047aacba139b4a92eede7dccc7d8e7dc8d04efc2d59/SSHCustodian-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "003b5cbc63957cbeb551b34b0cce902d", "sha256": "96a2af7ab14cec7fe2f3eb231f943f92f4f91afe5954d2e889020398eea658cf" }, "downloads": -1, "filename": "SSHCustodian-0.2.3.tar.gz", "has_sig": false, "md5_digest": "003b5cbc63957cbeb551b34b0cce902d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10614, "upload_time": "2016-05-26T18:22:37", "url": "https://files.pythonhosted.org/packages/d1/45/a41039e6dc71941548a4968ce3e0d638dec6a0895fc212c3a2554c32f858/SSHCustodian-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "a251c5c8fc3fb43459f15f66a0881141", "sha256": "c43d36c1d5cbe4507fe60b30569d485018079e071b3bc765fa1477d6e5350443" }, "downloads": -1, "filename": "SSHCustodian-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a251c5c8fc3fb43459f15f66a0881141", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13235, "upload_time": "2016-05-26T19:29:09", "url": "https://files.pythonhosted.org/packages/1e/23/66fd7be6dccf37c937fa05c0ab00bd5d14ae9e0597bf12aa9b74734b0868/SSHCustodian-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5aee9240eb9950f6b5a0969ff27d5290", "sha256": "86cbf20a52146923ff97e895b1e68391ac6d56665a1d2dd9a429325dfbd8cdb6" }, "downloads": -1, "filename": "SSHCustodian-0.2.4.tar.gz", "has_sig": false, "md5_digest": "5aee9240eb9950f6b5a0969ff27d5290", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10638, "upload_time": "2016-05-26T19:29:12", "url": "https://files.pythonhosted.org/packages/22/8f/e297949895ac0c26b06e34e7bdbeae6d9a184aae81c875182f5fd8bd292f/SSHCustodian-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "5cfa502cf02deed912352b601fd50005", "sha256": "23c1c5f7653e704534bf47c60cdddff74446e9ef47d567cbefa2cfa61ded2ebe" }, "downloads": -1, "filename": "SSHCustodian-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5cfa502cf02deed912352b601fd50005", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13234, "upload_time": "2016-05-26T20:08:18", "url": "https://files.pythonhosted.org/packages/84/49/7a950ee4e9f70f093fed533c97980c3d60c2376e5aea27f7fe46602eb7a6/SSHCustodian-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "88d7724bbe5cff14987ec7fa00157ebe", "sha256": "2c4c01ef9c47cb2ced9cd2a78e9027e49ad156cd0a5f2aac6a9a00e89c1b4335" }, "downloads": -1, "filename": "SSHCustodian-0.2.5.tar.gz", "has_sig": false, "md5_digest": "88d7724bbe5cff14987ec7fa00157ebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10647, "upload_time": "2016-05-26T20:08:22", "url": "https://files.pythonhosted.org/packages/37/7c/05a24030fcddc6286edbbd910fc3c37fe1a34c4b28fa41a260d108611761/SSHCustodian-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "f46365a6001ee52778cedc121ae10214", "sha256": "0c7f7b3019f4d12afaffd7dfd0532ecf5935c1860b2a7c8b78752ba56c76bbfa" }, "downloads": -1, "filename": "SSHCustodian-0.2.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f46365a6001ee52778cedc121ae10214", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13325, "upload_time": "2016-05-26T20:34:15", "url": "https://files.pythonhosted.org/packages/bb/de/94051371383a5f77be2610422fa0e639edddb8a918e681be039e8219f68d/SSHCustodian-0.2.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4df6da2a11878de29c513e3714739684", "sha256": "d5e45eece8a6bd6f481a870cb6a74fa928174dad2cfe0c88dbd73ed763227596" }, "downloads": -1, "filename": "SSHCustodian-0.2.6.tar.gz", "has_sig": false, "md5_digest": "4df6da2a11878de29c513e3714739684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10725, "upload_time": "2016-05-26T20:34:19", "url": "https://files.pythonhosted.org/packages/cc/c4/04d0955045c5d6ab99542d0a15f596015f1cd248d4fa7e52292ac8806270/SSHCustodian-0.2.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f46365a6001ee52778cedc121ae10214", "sha256": "0c7f7b3019f4d12afaffd7dfd0532ecf5935c1860b2a7c8b78752ba56c76bbfa" }, "downloads": -1, "filename": "SSHCustodian-0.2.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f46365a6001ee52778cedc121ae10214", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13325, "upload_time": "2016-05-26T20:34:15", "url": "https://files.pythonhosted.org/packages/bb/de/94051371383a5f77be2610422fa0e639edddb8a918e681be039e8219f68d/SSHCustodian-0.2.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4df6da2a11878de29c513e3714739684", "sha256": "d5e45eece8a6bd6f481a870cb6a74fa928174dad2cfe0c88dbd73ed763227596" }, "downloads": -1, "filename": "SSHCustodian-0.2.6.tar.gz", "has_sig": false, "md5_digest": "4df6da2a11878de29c513e3714739684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10725, "upload_time": "2016-05-26T20:34:19", "url": "https://files.pythonhosted.org/packages/cc/c4/04d0955045c5d6ab99542d0a15f596015f1cd248d4fa7e52292ac8806270/SSHCustodian-0.2.6.tar.gz" } ] }