This commit is contained in:
Matteo Giantomassi 2018-11-18 16:13:35 +01:00
parent fc56f2cfcd
commit 7a618ac716
13 changed files with 111 additions and 66 deletions

View File

@ -1915,8 +1915,8 @@ class DielectricTensorGenerator(Has_Structure):
def plot_all(self, **kwargs):
"""
Plot diagonal and off-diagonal elements of the dielectric tensor as a function of frequency.
Both real and imag part are show. Accepts all arguments of `plot` method with the exception of:
`component` and `reim`.
Both real and imag part are show. Accepts all arguments of `plot` method with the exception of
`component` and `reim`.
Returns: |matplotlib-Figure|
"""

View File

@ -27,7 +27,7 @@ class MsqdTest(AbipyTest):
phdos_file.close()
repr(msqd_dos); str(msqd_dos)
print(msqd_dos.to_string(verbose=2))
assert msqd_dos.to_string(verbose=2)
for fmt in ("cartesian", "cif", "ustar", "beta"): #, "B"):
df = msqd_dos.get_dataframe(temp=100, view="all", select_symbols="Si", fmt=fmt)
abilab.print_dataframe(df, title="Format: %s" % fmt)

View File

@ -82,7 +82,7 @@ def main(options):
Command line args are stored in `options`.
"""
# Temporarily disabled in v8.8.2
return 0
#return 0
return build_flow(options)

View File

@ -16,7 +16,7 @@ import abipy.data as abidata
from abipy import abilab
# Initialize object from DDB file.
from abipy.dfpt.phtk import SoundVelocity
from abipy.dfpt.vsound import SoundVelocity
ddb_path = os.path.join(abidata.dirpath, "refs", "si_sound_vel", "Si_DDB")
sv = SoundVelocity.from_ddb(ddb_path)

View File

@ -94,15 +94,13 @@ class Flow(Node, NodeContainer, MSONable):
possible inter-dependencies among the work and the creation of
dynamic workflows that are generated by callbacks registered by the user.
.. attributes::
Importan attributes:
creation_date: String with the creation_date
pickle_protocol: Protocol for Pickle database (default: -1 i.e. latest protocol)
Important methods for constructing flows:
.. methods::
register_work: register (add) a work to the flow
resister_task: register a work that contains only this task returns the work
allocate: propagate the workdir and manager of the flow to all the registered tasks
@ -1353,6 +1351,7 @@ class Flow(Node, NodeContainer, MSONable):
Args:
what: string with the list of characters selecting the file type
Possible choices:
i ==> input_file,
o ==> output_file,
f ==> files_file,
@ -1361,6 +1360,7 @@ class Flow(Node, NodeContainer, MSONable):
e ==> stderr_file,
q ==> qout_file,
all ==> all files.
status: if not None, only the tasks with this status are select
op: status operator. Requires status. A task is selected
if task.status op status evaluates to true.
@ -1674,8 +1674,7 @@ class Flow(Node, NodeContainer, MSONable):
def pickle_dumps(self, protocol=None):
"""
Return a string with the pickle representation.
`protocol` selects the pickle protocol. self.pickle_protocol is
used if `protocol` is None
`protocol` selects the pickle protocol. self.pickle_protocol is used if `protocol` is None
"""
strio = StringIO()
pmg_pickle_dump(self, strio,
@ -2101,8 +2100,8 @@ class Flow(Node, NodeContainer, MSONable):
Args:
kwargs: if empty we use the user configuration file.
if `filepath` in kwargs we init the scheduler from filepath.
else pass **kwargs to :class:`PyFlowScheduler` __init__ method.
if `filepath` in kwargs we init the scheduler from filepath.
else pass `kwargs` to :class:`PyFlowScheduler` __init__ method.
"""
from .launcher import PyFlowScheduler
if not kwargs:

View File

@ -313,7 +313,7 @@ def make_qadapter(**kwargs):
Return the concrete :class:`QueueAdapter` class from a string.
Note that one can register a customized version with:
.. example::
.. code-block:: python
from qadapters import SlurmAdapter

View File

@ -9,10 +9,10 @@ from __future__ import print_function, division, unicode_literals, absolute_impo
import os
import numpy as np
from pymatgen.io.abinit.flows import Flow
from pymatgen.io.abinit.works import Work, RelaxWork, PhononWork, MergeDdb
from abipy.core.structure import Structure
from abipy.abio.inputs import AbinitInput
from abipy.flowtk.works import Work, RelaxWork, PhononWork, MergeDdb
from abipy.flowtk.flows import Flow
import logging
logger = logging.getLogger(__name__)

View File

@ -26,25 +26,26 @@ class JobStatus(int):
Slurm API, see `man squeue`.
JOB STATE CODES
Jobs typically pass through several states in the course of their execution. The typical states are
PENDING, RUNNING, SUSPENDED, COMPLETING, and COMPLETED. An explanation of each state follows.
Jobs typically pass through several states in the course of their execution. The typical states are
PENDING, RUNNING, SUSPENDED, COMPLETING, and COMPLETED. An explanation of each state follows::
BF BOOT_FAIL Job terminated due to launch failure, typically due to a hardware failure (e.g.
unable to boot the node or block and the job can not be requeued).
CA CANCELLED Job was explicitly cancelled by the user or system administrator.
The job may or may not have been initiated.
CD COMPLETED Job has terminated all processes on all nodes.
CF CONFIGURING Job has been allocated resources, but are waiting for them to become ready for use (e.g. booting).
CG COMPLETING Job is in the process of completing. Some processes on some nodes may still be active.
F FAILED Job terminated with non-zero exit code or other failure condition.
NF NODE_FAIL Job terminated due to failure of one or more allocated nodes.
PD PENDING Job is awaiting resource allocation.
PR PREEMPTED Job terminated due to preemption.
R RUNNING Job currently has an allocation.
S SUSPENDED Job has an allocation, but execution has been suspended.
TO TIMEOUT Job terminated upon reaching its time limit.
SE SPECIAL_EXIT The job was requeued in a special state. This state can be set by users, typically
in EpilogSlurmctld, if the job has terminated with a particular exit value.
BF BOOT_FAIL Job terminated due to launch failure, typically due to a hardware failure (e.g.
unable to boot the node or block and the job can not be requeued).
CA CANCELLED Job was explicitly cancelled by the user or system administrator.
The job may or may not have been initiated.
CD COMPLETED Job has terminated all processes on all nodes.
CF CONFIGURING Job has been allocated resources, but are waiting for them to become ready for use (e.g. booting).
CG COMPLETING Job is in the process of completing. Some processes on some nodes may still be active.
F FAILED Job terminated with non-zero exit code or other failure condition.
NF NODE_FAIL Job terminated due to failure of one or more allocated nodes.
PD PENDING Job is awaiting resource allocation.
PR PREEMPTED Job terminated due to preemption.
R RUNNING Job currently has an allocation.
S SUSPENDED Job has an allocation, but execution has been suspended.
TO TIMEOUT Job terminated upon reaching its time limit.
SE SPECIAL_EXIT The job was requeued in a special state. This state can be set by users, typically
in EpilogSlurmctld, if the job has terminated with a particular exit value.
"""
_STATUS_TABLE = OrderedDict([
@ -173,30 +174,29 @@ class QueueJob(object):
"""
See http://man7.org/linux/man-pages/man7/signal.7.html
SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process
SIGINT 2 Term Interrupt from keyboard
SIGQUIT 3 Core Quit from keyboard
SIGILL 4 Core Illegal Instruction
SIGABRT 6 Core Abort signal from abort(3)
SIGFPE 8 Core Floating point exception
SIGKILL 9 Term Kill signal
SIGSEGV 11 Core Invalid memory reference
SIGPIPE 13 Term Broken pipe: write to pipe with no readers
SIGALRM 14 Term Timer signal from alarm(2)
SIGTERM 15 Term Termination signal
SIGUSR1 30,10,16 Term User-defined signal 1
SIGUSR2 31,12,17 Term User-defined signal 2
SIGCHLD 20,17,18 Ign Child stopped or terminated
SIGCONT 19,18,25 Cont Continue if stopped
SIGSTOP 17,19,23 Stop Stop process
SIGTSTP 18,20,24 Stop Stop typed at terminal
SIGTTIN 21,21,26 Stop Terminal input for background process
SIGTTOU 22,22,27 Stop Terminal output for background process
SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process
SIGINT 2 Term Interrupt from keyboard
SIGQUIT 3 Core Quit from keyboard
SIGILL 4 Core Illegal Instruction
SIGABRT 6 Core Abort signal from abort(3)
SIGFPE 8 Core Floating point exception
SIGKILL 9 Term Kill signal
SIGSEGV 11 Core Invalid memory reference
SIGPIPE 13 Term Broken pipe: write to pipe with no readers
SIGALRM 14 Term Timer signal from alarm(2)
SIGTERM 15 Term Termination signal
SIGUSR1 30,10,16 Term User-defined signal 1
SIGUSR2 31,12,17 Term User-defined signal 2
SIGCHLD 20,17,18 Ign Child stopped or terminated
SIGCONT 19,18,25 Cont Continue if stopped
SIGSTOP 17,19,23 Stop Stop process
SIGTSTP 18,20,24 Stop Stop typed at terminal
SIGTTIN 21,21,26 Stop Terminal input for background process
SIGTTOU 22,22,27 Stop Terminal output for background process
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Next the signals not in the POSIX.1-1990 standard but described in
SUSv2 and POSIX.1-2001.
Next the signals not in the POSIX.1-1990 standard but described in SUSv2 and POSIX.1-2001.
Signal Value Action Comment
SIGBUS 10,7,10 Core Bus error (bad memory access)

View File

@ -317,10 +317,10 @@ class ParalHints(collections.Iterable):
"""
Remove all the configurations that do not satisfy the given condition.
Args:
condition: dict or :class:`Condition` object with operators expressed with a Mongodb-like syntax
key: Selects the sub-dictionary on which condition is applied, e.g. key="vars"
if we have to filter the configurations depending on the values in vars
Args:
condition: dict or :class:`Condition` object with operators expressed with a Mongodb-like syntax
key: Selects the sub-dictionary on which condition is applied, e.g. key="vars"
if we have to filter the configurations depending on the values in vars
"""
condition = Condition.as_condition(condition)
new_confs = []
@ -2891,7 +2891,8 @@ class AbinitTask(Task):
Args:
what: string with the list of characters selecting the file type
Possible choices:
Possible choices:
i ==> input_file,
o ==> output_file,
f ==> files_file,

View File

@ -9,7 +9,7 @@ import abipy.flowtk as flowtk
from scripttest import TestFileEnvironment
from monty.inspect import all_subclasses
from pymatgen.io.abinit.qadapters import QueueAdapter
from abipy.flowtk.qadapters import QueueAdapter
from abipy.core.testing import AbipyTest
from abipy import abilab

View File

@ -16,7 +16,7 @@ electrons Package
:mod:`eskw` Package
-------------------
.. automodule:: abipy.eskw
.. automodule:: abipy.electrons.eskw
:members:
:undoc-members:
:show-inheritance:

View File

@ -36,6 +36,22 @@ flowtk Package
:undoc-members:
:show-inheritance:
:mod:`abitimer` Module
----------------------
.. automodule:: abipy.flowtk.abitimer
:members:
:undoc-members:
:show-inheritance:
:mod:`calculations` Module
--------------------------
.. automodule:: abipy.flowtk.calculations
:members:
:undoc-members:
:show-inheritance:
:mod:`dfpt_works` Module
------------------------
@ -76,6 +92,14 @@ flowtk Package
:undoc-members:
:show-inheritance:
:mod:`launcher` Module
----------------------
.. automodule:: abipy.flowtk.launcher
:members:
:undoc-members:
:show-inheritance:
:mod:`mocks` Module
-------------------
@ -92,6 +116,14 @@ flowtk Package
:undoc-members:
:show-inheritance:
:mod:`nodes` Module
-------------------
.. automodule:: abipy.flowtk.nodes
:members:
:undoc-members:
:show-inheritance:
:mod:`pseudos` Module
---------------------
@ -100,6 +132,14 @@ flowtk Package
:undoc-members:
:show-inheritance:
:mod:`qadapters` Module
-----------------------
.. automodule:: abipy.flowtk.qadapters
:members:
:undoc-members:
:show-inheritance:
:mod:`qha` Module
-----------------
@ -108,6 +148,14 @@ flowtk Package
:undoc-members:
:show-inheritance:
:mod:`qjobs` Module
-------------------
.. automodule:: abipy.flowtk.qjobs
:members:
:undoc-members:
:show-inheritance:
:mod:`qutils` Module
--------------------

View File

@ -1,14 +1,11 @@
.. :Release: |version| :Date: |today|
.. _scripts-index:
=======
Scripts
=======
.. htmlonly::
:Release: |version|
:Date: |today|
This page documents the usage of the AbiPy scripts,
the subcommands available and the options supported by each subcommand.