{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# useful to autoreload the module without restarting the kernel\n", "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from mppi import InputFiles as I, Calculators as C, Utilities as U" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "omp = 1\n", "mpi = 4" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Tutorial for the YamboCalculator class" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This tutorial describes the usage of the YamboCalculator class, that manages the run of (many) calculations in\n", "parallel with the Yambo package." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Perform an Hartree-Fock computation for Silicon" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "__Follow the tutorial for the QeCalculator to produce the .save folder needed to generate the yambo SAVE.__\n", "\n", "The first step needed to perform a Yambo computation is to generate the SAVE folder from a QuantumESPRESSO\n", "computation. \n", "\n", "The mppi.Utilities module has a function that perform this task" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "source_dir = 'QeCalculator_test/bands_12.save'\n", "run_dir = 'YamboCalculator_test'" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SAVE folder already present in YamboCalculator_test\n" ] } ], "source": [ "U.build_SAVE(source_dir,run_dir)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now the YamboInput class can create the yambo input object" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "from copy import deepcopy \n", "inp = I.YamboInput(args='yambo -x -V rl',folder=run_dir)\n", "inp.set_kRange(1,2) #restrict the analysis to the first two kpoints\n", "\n", "inputs = []\n", "names = []\n", "jobnames = []\n", "\n", "for e in [3.0,4.0]:\n", " inp['variables']['EXXRLvcs'] = [e*1e3,'mHa']\n", " inputs.append(deepcopy(inp))\n", " names.append('hf_exx'+str(e))\n", " jobnames.append('hf_job_exx'+str(e))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To run the computation we create an istance of YamboCalculator. This object behaves almost exactly as\n", "the QeCalculator for what concerns the user interface" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "\u001b[0;31mInit signature:\u001b[0m \u001b[0mC\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mYamboCalculator\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0momp\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmpi\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmpi_run\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'mpirun -np'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexecutable\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'yambo'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mscheduler\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'direct'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmultiTask\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mskip\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mverbose\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mIO_time\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mclean_restart\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mDocstring:\u001b[0m \n", "Manage (multiple) Yambo calculations performed in parallel. Computations\n", "are managed by a scheduler that, in the actual implementation of the class, can\n", "be `direct` or `slurm`.\n", "\n", "Parameters:\n", " omp (:py:class:`int`) : value of the OMP_NUM_THREADS variable\n", " mpi (:py:class:`int`) : number of mpi processes\n", " mpi_run (:py:class:`string`) : command for the execution of mpirun, e.g. 'mpirun -np' or 'mpiexec -np'\n", " executable (:py:class:`string`) : set the executable (yambo, ypp, yambo_rt, ...) of the Yambo package\n", " scheduler (:py:class:`string`) : choose the scheduler used to submit the job, actually the choices implemented are\n", " 'direct' that runs the computation using the python multiprocessing package and 'slurm' that creates a slurm script\n", " multiTask (:py:class:`bool`) : if true a single run_script is built and all the computations are performed in parallel,\n", " otherwise an independent script is built for each elements of inputs and the computations are performed sequentially\n", " skip (:py:class:`bool`) : if True evaluate if one (or many) computations can be skipped.\n", " This is done by checking that the folder where yambo write the results contains at least\n", " one file 'o-*', for each name in names\n", " verbose (:py:class:`bool`) : set the amount of information provided on terminal\n", " IO_time (int) : time step (in second) used by the wait method to check that the job is completed\n", " kwargs : other parameters that are stored in the _global_options dictionary\n", " clean_restart (:py:class:`bool`) : if True the delete the folder(s) with the output files and database before\n", " running the computation\n", "\n", "Example:\n", " >>> code = YamboCalculator(omp=1,mpi=4,mpi_run='mpirun -np',executable='yambo',skip=True,verbose=True,scheduler='direct')\n", " >>> code.run(inputs = ..., run_dir = ...,names = ...,jobnames = ...)\n", "\n", " where the arguments of the run method are:\n", "\n", "Args:\n", " run_dir (:py:class:`string`) : the folder in which the simulation is performed\n", " inputs (:py:class:`list`) : list with the instances of the :class:`YamboInput` class\n", " that define the input objects\n", " names (:py:class:`list`) : list with the names associated to the input files (without extension),\n", " given in the same order of the inputs list. These strings are used also as the radicals of the\n", " folders in which results are written as well as a part of the name of the output files.\n", " jobnames (:py:class:`list`) : list with the values of the jobname. If this variable is not specified\n", " the value of name is attributed to jobname by process_run.\n", " kwargs : other parameters that are stored in the run_options dictionary\n", "\n", "When the run method is called the class runs the command:\n", " executable_name -F name.in -J jobname -C name\n", "\u001b[0;31mFile:\u001b[0m ~/Applications/MPPI/mppi/Calculators/YamboCalculator.py\n", "\u001b[0;31mType:\u001b[0m type\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "C.YamboCalculator?" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Initialize a parallel Yambo calculator with scheduler direct\n" ] }, { "data": { "text/plain": [ "{'omp': 1,\n", " 'mpi': 4,\n", " 'mpi_run': 'mpirun -np',\n", " 'executable': 'yambo',\n", " 'scheduler': 'direct',\n", " 'multiTask': True,\n", " 'skip': True,\n", " 'verbose': True,\n", " 'IO_time': 5,\n", " 'clean_restart': True}" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "code = C.YamboCalculator(omp=omp,mpi=mpi)\n", "code.global_options()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The structure of the folder in which yambo writes its results is governed by the names and jobnames \n", "variables. It is possible to provide only the names variable. \n", "\n", "The effect of this choice can be seen\n", "in the command string executed by the calculator" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "run 0 command: cd YamboCalculator_test; mpirun -np 4 yambo -F hf_exx3.0.in -J hf_exx3.0 -C hf_exx3.0\n", "run 1 command: cd YamboCalculator_test; mpirun -np 4 yambo -F hf_exx4.0.in -J hf_exx4.0 -C hf_exx4.0\n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: False \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/hf_exx3.0/o-hf_exx3.0.hf'],\n", " ['YamboCalculator_test/hf_exx4.0/o-hf_exx4.0.hf']],\n", " 'dbs': ['YamboCalculator_test/hf_exx3.0', 'YamboCalculator_test/hf_exx4.0']}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(run_dir = run_dir, inputs = inputs, names= names)\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this case yambo create the hf_exx3.0 and hf_exx4.0 folders and write all the files in these folders. Result is a dictionary with the name of the\n", "o- file and the folders that contains the databases.\n", "\n", "Instead, if we set also set a jobname we have" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "run 0 command: cd YamboCalculator_test; mpirun -np 4 yambo -F hf_exx3.0.in -J hf_job_exx3.0 -C hf_exx3.0\n", "run 1 command: cd YamboCalculator_test; mpirun -np 4 yambo -F hf_exx4.0.in -J hf_job_exx4.0 -C hf_exx4.0\n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: True \n", "run0_is_running: True run1_is_running: False \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/hf_exx3.0/o-hf_job_exx3.0.hf'],\n", " ['YamboCalculator_test/hf_exx4.0/o-hf_job_exx4.0.hf']],\n", " 'dbs': ['YamboCalculator_test/hf_job_exx3.0',\n", " 'YamboCalculator_test/hf_job_exx4.0']}" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run( run_dir=run_dir, inputs=inputs ,names=names,jobnames=jobnames,skip=False)\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this case yambo creates also the folders hf_job_exx and write the databases in these folders." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Usage of the skip parameter" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If we repeat a calculation that has been already performed and skip = True the class skip its computation, for instance" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Skip the computation for input hf_exx3.0\n", "Skip the computation for input hf_exx4.0\n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/hf_exx3.0/o-hf_exx3.0.hf'],\n", " ['YamboCalculator_test/hf_exx4.0/o-hf_exx4.0.hf']],\n", " 'dbs': ['YamboCalculator_test/hf_exx3.0', 'YamboCalculator_test/hf_exx4.0']}" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(run_dir = run_dir, inputs = inputs, names= names, skip = True)\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Usage of the multiTask feature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "By default the calculator runs in parallel all the computations. However if the multiTask = False option\n", "is used the the computations are performed in sequence." ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "run 0 command: cd YamboCalculator_test; mpirun -np 4 yambo -F hf_exx3.0.in -J hf_exx3.0 -C hf_exx3.0\n", "run 1 command: cd YamboCalculator_test; mpirun -np 4 yambo -F hf_exx4.0.in -J hf_exx4.0 -C hf_exx4.0\n", "run0_is_running: True \n", "run0_is_running: True \n", "run0_is_running: True \n", "Job completed\n", "run1_is_running: True \n", "run1_is_running: True \n", "run1_is_running: True \n", "run1_is_running: True \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/hf_exx3.0/o-hf_exx3.0.hf'],\n", " ['YamboCalculator_test/hf_exx4.0/o-hf_exx4.0.hf']],\n", " 'dbs': ['YamboCalculator_test/hf_exx3.0', 'YamboCalculator_test/hf_exx4.0']}" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(run_dir = run_dir, inputs = inputs, names= names, multiTask = False, skip = False)\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Test of the slurm scheduler" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the `slurm` scheduler is chosen the calculator prepare the slurm script and submit it. The effects of skip and\n", "multiTask parameters can be tested" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "results = code.run(run_dir=run_dir,inputs=inputs,names=names, scheduler = 'slurm', skip = False, multiTask = True)\n", "results" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The slurm script is written in the run_dir. The execution of the run requires that the slurm scheduler is installed." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Perform a GW computation for Silicon" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We make usage of the YamboCalculator to perform a different yambo computation. In this way we control\n", "how this class manage the output files and the ndb database in various cases." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "inp = I.YamboInput(args='yambo -d -k hartee -g n -p p -V qp',folder=run_dir)\n", "inp.set_kRange(1,2)\n", "#inp" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "delete folder: YamboCalculator_test/qp_test1\n", "run 0 command: cd YamboCalculator_test; mpirun -np 4 yambo -F qp_test1.in -J qp_test1 -C qp_test1\n", "run0_is_running: True \n", "run0_is_running: True \n", "run0_is_running: True \n", "run0_is_running: True \n", "run0_is_running: True \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [[]], 'dbs': ['YamboCalculator_test/qp_test1']}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(inputs = [inp], run_dir = run_dir,names=['qp_test1'],skip=False)\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Perform the same computation but specify also a jobname " ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Executing command: cd YamboCalculator_test; mpirun -np 4 yambo -F qp_test2.in -J qp_job_test2 -C qp_test2\n", "run0_is_running:True \n", "run0_is_running:True \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/qp_test2/o-qp_job_test2.hf']],\n", " 'dbs': ['YamboCalculator_test/qp_job_test2']}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(inputs = [inp], run_dir = run_dir,names=['qp_test2'],jobnames = ['qp_job_test2'])\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Test of the ExtendOut option in the input file" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The ExtendOut option enables the writing of all the variables in the output files of Yambo. \n", "This feature has no effect for an HF computation and we test for a QP one:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "inp = I.YamboInput(args='yambo -d -k hartee -g n -p p -V qp',folder=run_dir)\n", "inp.set_kRange(1,2)\n", "inp.set_extendOut()\n", "#inp" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Executing command: cd YamboCalculator_test; mpirun -np 4 yambo -F qp_test_ExtendOut.in -J qp_test_ExtendOut -C qp_test_ExtendOut\n", "run0_is_running:True \n", "run0_is_running:True \n", "run0_is_running:True \n", "run0_is_running:True \n", "run0_is_running:True \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/qp_test_ExtendOut/o-qp_test_ExtendOut.qp']],\n", " 'dbs': ['YamboCalculator_test/qp_test_ExtendOut']}" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(inputs = [inp], run_dir = run_dir,names=['qp_test_ExtendOut'])\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Perform a ypp computation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The YamboCalculator class can manage also ypp computation.\n", "\n", "Let's see an example by performing a band calculation along a path" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'args': 'ypp -s b',\n", " 'folder': 'YamboCalculator_test',\n", " 'filename': 'ypp.in',\n", " 'arguments': [],\n", " 'variables': {'OutputAlat': [0.0, ''],\n", " 'INTERP_Shell_Fac': [20.0, ''],\n", " 'BANDS_steps': [10.0, ''],\n", " 'INTERP_mode': 'NN',\n", " 'cooIn': 'rlu',\n", " 'cooOut': 'rlu',\n", " 'CIRCUIT_E_DB_path': 'none',\n", " 'BANDS_bands': [[1, 12], ''],\n", " 'INTERP_Grid': [['-1', '-1', '-1'], '']}}" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "inp = I.YamboInput(args='ypp -s b',folder=run_dir,filename='ypp.in') \n", "inp" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We define a calculator for ypp. This calculation requires 1 mpirun (see yambo for further information)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Initialize a parallel Yambo calculator with scheduler direct\n" ] }, { "data": { "text/plain": [ "{'omp': 1,\n", " 'executable': 'ypp',\n", " 'multiTask': True,\n", " 'scheduler': 'direct',\n", " 'mpi_run': 'mpirun -np 1',\n", " 'cpus_per_task': 4,\n", " 'ntasks': 3,\n", " 'skip': False,\n", " 'verbose': True,\n", " 'IO_time': 5}" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "code = C.YamboCalculator(mpi_run='mpirun -np 1',executable='ypp',skip=False)\n", "code.global_options()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Set the input parameter to perform the band computation along a path" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "# in alat\n", "G = [0.,0.,0.]\n", "X = [1.,0.,0.]\n", "L = [0.5,0.5,0.5]\n", "K = [1.0,0.5,0.]\n", "path = [L,G,X,K,G]\n", "\n", "band_range = [2,5]\n", "bands_step = 30" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'args': 'ypp -s b',\n", " 'folder': 'YamboCalculator_test',\n", " 'filename': 'ypp.in',\n", " 'arguments': [],\n", " 'variables': {'OutputAlat': [0.0, ''],\n", " 'INTERP_Shell_Fac': [20.0, ''],\n", " 'BANDS_steps': [30, ''],\n", " 'INTERP_mode': 'NN',\n", " 'cooIn': 'alat',\n", " 'cooOut': 'alat',\n", " 'CIRCUIT_E_DB_path': 'none',\n", " 'BANDS_bands': [[2, 5], ''],\n", " 'INTERP_Grid': [['-1', '-1', '-1'], ''],\n", " 'BANDS_kpts': [[[0.5, 0.5, 0.5],\n", " [0.0, 0.0, 0.0],\n", " [1.0, 0.0, 0.0],\n", " [1.0, 0.5, 0.0],\n", " [0.0, 0.0, 0.0]],\n", " '']}}" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# scissor\n", "# inp['variables']['GfnQP_E'] = [1.0,1.0,1.0]\n", "\n", "# band structure\n", "# Some methods that perform these operation can be added in the YamboInput class\n", "inp['variables']['BANDS_steps'] = [bands_step,'']\n", "inp['variables']['BANDS_bands'] = [band_range,'']\n", "inp['variables']['BANDS_kpts'] = [path,'']\n", "inp['variables']['cooIn'] = 'alat'\n", "inp['variables']['cooOut'] = 'alat'\n", "inp" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Executing command: cd YamboCalculator_test; mpirun -np 1 ypp -F bands_test1.in -J bands_test1 -C bands_test1\n", "run0_is_running:True \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/bands_test1/o-bands_test1.bands_interpolated']],\n", " 'dbs': ['YamboCalculator_test/bands_test1']}" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(run_dir=run_dir,inputs=[inp],names=['bands_test1'])\n", "result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Result can be parsed using the YamboParser class of this package or other external tools" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Test the jobname specification for this type of computation" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Executing command: cd YamboCalculator_test; mpirun -np 1 ypp -F bands_test2.in -J bands_job_test2 -C bands_test2\n", "run0_is_running:True \n", "Job completed\n" ] }, { "data": { "text/plain": [ "{'output': [['YamboCalculator_test/bands_test2/o-bands_job_test2.bands_interpolated']],\n", " 'dbs': ['YamboCalculator_test/bands_job_test2']}" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "result = code.run(run_dir=run_dir,inputs=[inp],names=['bands_test2'],jobnames=['bands_job_test2'])\n", "result" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }