From babdb6351281885834103ce0f7a34f28115bf25c Mon Sep 17 00:00:00 2001 From: gonze Date: Thu, 26 Jul 2018 09:49:28 +0200 Subject: [PATCH 01/25] Insert one sentence to explain why conda install --file ./requirements-optional.txt is suggested. --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index b692d5422..ca50a906e 100644 --- a/README.rst +++ b/README.rst @@ -137,6 +137,7 @@ and install the AbiPy dependencies with:: conda install --file ./requirements.txt conda install --file ./requirements-optional.txt +The second command is needed for Jupyter only. Once the requirements have been installed (either with pip or conda), execute:: python setup.py install From 779c4d9944706d50ef87913197bd482ac3fc7f65 Mon Sep 17 00:00:00 2001 From: gonze Date: Thu, 26 Jul 2018 14:28:34 +0200 Subject: [PATCH 02/25] More explanations in the README.rst . --- README.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index ca50a906e..8ea8d5eb0 100644 --- a/README.rst +++ b/README.rst @@ -162,7 +162,7 @@ To solve the problem, use conda to update scipy to a version >= 1.0.1 with:: conda install "scipy>=1.0.1" -then issue again python setup.py develop. +then issue again python setup.py develop. If this fails, supposing you were upgrading abipy inside an already existing conda environment, try to restart by creating from scratch a fresh conda environment, see above. Use:: @@ -188,11 +188,17 @@ To run the suite of unit tests, make sure you have pytest_ installed and then ty pytest -in the AbiPy root directory. +in the AbiPy root directory. A quicker check might be obtained with + + pytest abipy/core/tests -v + Unit tests require ``scripttest`` that can be installed with:: pip install scripttest +Two tests rely on the availability of a PMG_MAPI_KEY, that you do not have if you are not a pymatgen developer. +You can ignore the failure of these two tests (TestMpRestAPI and TestSymmetries) for most of the developments inside Abipy. + Note that several unit tests check the integration between AbiPy and Abinit. In order to run the tests, you need a working set of Abinit executables and a ``manager.yml`` configuration file. A pre-compiled sequential version of Abinit for Linux and OSx can be installed directly from the From 9223fb926ce92801d11b492863ad97d0460eb031 Mon Sep 17 00:00:00 2001 From: gonze Date: Fri, 27 Jul 2018 09:20:51 +0200 Subject: [PATCH 03/25] Fix typos. Specify how to get a PMG_MAPI_KEY. --- README.rst | 4 ++-- abipy/abio/inputs.py | 4 ++-- abipy/abio/timer.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 8ea8d5eb0..971f85f84 100644 --- a/README.rst +++ b/README.rst @@ -196,8 +196,8 @@ Unit tests require ``scripttest`` that can be installed with:: pip install scripttest -Two tests rely on the availability of a PMG_MAPI_KEY, that you do not have if you are not a pymatgen developer. -You can ignore the failure of these two tests (TestMpRestAPI and TestSymmetries) for most of the developments inside Abipy. +Two tests rely on the availability of a +`pymatgen PMG_MAPI_KEY ` in ~/.pmgrc.yaml. Note that several unit tests check the integration between AbiPy and Abinit. In order to run the tests, you need a working set of Abinit executables and a ``manager.yml`` configuration file. diff --git a/abipy/abio/inputs.py b/abipy/abio/inputs.py index 8bbc59390..179fc1de2 100644 --- a/abipy/abio/inputs.py +++ b/abipy/abio/inputs.py @@ -565,7 +565,7 @@ def to_string(self, sortmode="section", post=None, with_mnemonics=False, mode="t String representation. Args: - sortmode: "section" if variables should be gruped by sections. + sortmode: "section" if variables should be grouped by sections. "a" for alphabetical order, None if no sorting is wanted. with_mnemonics: True if mnemonics should be added. mode: Either `text` or `html` if HTML output with links is wanted. @@ -740,7 +740,7 @@ def set_autokmesh(self, nksmall, kptopt=1): def set_phdos_qmesh(self, nqsmall, method="tetra", ph_qshift=(0, 0, 0)): """ Set the variables (ngkpt, shift, kptopt) for the computation of the Phonon DOS in Abinit. - Remember that the Phdos is computed via Fourier interpolation so there's no costraint + Remember that the Phdos is computed via Fourier interpolation so there's no constraint of the q-mesh. Args: diff --git a/abipy/abio/timer.py b/abipy/abio/timer.py index 1d06df9f5..b28d2f31c 100644 --- a/abipy/abio/timer.py +++ b/abipy/abio/timer.py @@ -1,6 +1,6 @@ """ This module provides objects for extracting timing data from the ABINIT output files -It also provides tools to analye and to visualize the parallel efficiency. +It also provides tools to analyze and to visualize the parallel efficiency. """ from __future__ import print_function, division, unicode_literals, absolute_import @@ -21,7 +21,7 @@ def yield_figs(self, **kwargs): # pragma: no cover def write_notebook(self, nbpath=None): """ - Write an ipython notebook to nbpath. If nbpath is None, a temporay file in the current + Write an ipython notebook to nbpath. If nbpath is None, a temporary file in the current working directory is created. Return path to the notebook. """ nbformat, nbv, nb = self.get_nbformat_nbv_nb(title=None) From 18d42aa3f1bccb25138003a76d412839450ad209 Mon Sep 17 00:00:00 2001 From: gonze Date: Fri, 27 Jul 2018 21:44:47 +0200 Subject: [PATCH 04/25] Several minor modifs --- README.rst | 4 ++-- docs/README.rst | 8 ++++++-- docs/coding_guide.rst | 4 ++-- docs/postprocessing_howto.rst | 8 ++++---- docs/workflows/manager_examples.rst | 1 + 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 971f85f84..a2211f225 100644 --- a/README.rst +++ b/README.rst @@ -207,7 +207,7 @@ abinit-channel_ with:: conda install abinit -c abinit For further information on the syntax of the configuration file, please consult the -`workflows `_ section. +`workflows docs `_ section. Contributing to AbiPy is relatively easy. Just send us a `pull request `_. @@ -254,7 +254,7 @@ The following scripts can be invoked directly from the terminal: Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. -For further information, please consult the `official documentation `_. +For further information, please consult the `scripts docs ` section. License ======= diff --git a/docs/README.rst b/docs/README.rst index 5e8cc2b86..454920904 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -10,17 +10,21 @@ Organization of documentation ----------------------------- The documentation for AbiPy is generated from ReStructured Text using the Sphinx_ documentation generation tool. -The documentation sources are found in the :file:`~/docs/` directory in the repository. +The documentation sources are found in the :file:`~/docs/` directory in the repository. Major items : * index.rst - the top level include document for AbiPy docs * api - placeholders to automatically generate the api documentation +* scripts - documentation for scripts +* workflows - documentation for workflows +* README.rst - the present file * conf.py - the sphinx configuration * _static - used by the sphinx build system * _templates - used by the sphinx build system The main entry point is :file:`docs/index.rst`, which pulls in the files for the users guide, developers guide, api reference. -The actual ReStructured Text files for the API are kept in :file:`docs/api`. +The actual ReStructured Text files for the subpackage API, scripts and workflows (resp.) are kept +in :file:`docs/api`, :file:`docs/scripts` and :file:`docs/workflows` (resp.). Additional files can be added to the various guides by including their base file name (the ``.rst`` extension is not necessary) in the table of contents. diff --git a/docs/coding_guide.rst b/docs/coding_guide.rst index 1041e6b3d..c935ad51d 100644 --- a/docs/coding_guide.rst +++ b/docs/coding_guide.rst @@ -70,7 +70,7 @@ Naming, spacing, and formatting conventions ------------------------------------------- In general, we want to stay as closely as possible to the standard -coding guidelines for python written by Guido in `PEP0008 `_. +coding guidelines for python written by Guido van Rossum in `PEP0008 `_. * functions and class methods: ``lower`` or ``lower_underscore_separated`` * attributes and variables: ``lower`` @@ -112,4 +112,4 @@ Testing Abipy has a testing infrastructure based on :mod:`unittest` and pytest_. Common test support is provided by :mod:`abipy.core.testing`, -data files are storeed in :file:`abipy/tests/data`. +data files are stored in :file:`abipy/tests/data`. diff --git a/docs/postprocessing_howto.rst b/docs/postprocessing_howto.rst index 988b74d11..ac7966227 100644 --- a/docs/postprocessing_howto.rst +++ b/docs/postprocessing_howto.rst @@ -139,7 +139,7 @@ Get a quick look to a file -------------------------- The :ref:`abiview.py` script is especially designed for this task. -The syntax is ``abistruct.py COMMAND FILE`` where ``COMMAND`` is either +The syntax is ``abiview.py COMMAND FILE`` where ``COMMAND`` is either the Abinit file extension (without ``.nc``, if any) or the AbiPy object we want to visualize. To get a quick look at the DDB file, use:: @@ -152,7 +152,7 @@ If ``FILE`` contains electronic band energies, use e.g.:: abiview.py ebands out_GSR.nc -to plot the KS eigenvalues (the same command works for other files such as ``WFK.nc``, ``DEN.nc`` etcetera. +to plot the KS eigenvalues (the same command works for other files such as ``WFK.nc``, ``DEN.nc`` etc. Note that :ref:`abiview.py` uses a predefined logic to visualize the data. There are options to tune some parameters and/or export data in different formats @@ -174,7 +174,7 @@ Visualize a structure --------------------- The visualization of the structure is delegated to external graphical applications -that must be istalled on your machine. +that must be installed on your machine. AbiPy will extract the structure from ``FILE``, convert it to one of the formats supported by the graphical application and finally invoke the executable. If you have vesta_ installed in one of the standard @@ -355,7 +355,7 @@ to print the warnings/comments/errors reported in the Abinit log file ``run.log` Export bands to xmgrace format ------------------------------ -But |ElectronBands| and |PhononBands| provide a ``to_xmgrace`` method to produce xmgrace_ files. +Both |ElectronBands| and |PhononBands| provide a ``to_xmgrace`` method to produce xmgrace_ files. To export the data to xmgrace, use :ref:`abiview.py` with the ``--xmgrace`` option. For electrons, use:: diff --git a/docs/workflows/manager_examples.rst b/docs/workflows/manager_examples.rst index fe5e85bf7..a439d479e 100644 --- a/docs/workflows/manager_examples.rst +++ b/docs/workflows/manager_examples.rst @@ -559,6 +559,7 @@ Travis mpi_runner: mpirun pre_run: - source activate test-environment + - ulimit -s unlimited limits: min_cores: 1 max_cores: 2 From 2678754765936a70d8da4c423aa769267066109f Mon Sep 17 00:00:00 2001 From: gonze Date: Fri, 27 Jul 2018 21:50:12 +0200 Subject: [PATCH 05/25] Minor modif, slightly more accurate wording. --- docs/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.rst b/docs/README.rst index 454920904..da62d14ef 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -23,7 +23,7 @@ The documentation sources are found in the :file:`~/docs/` directory in the repo The main entry point is :file:`docs/index.rst`, which pulls in the files for the users guide, developers guide, api reference. -The actual ReStructured Text files for the subpackage API, scripts and workflows (resp.) are kept +The actual ReStructured Text files for the APIs of the subpackages, for the scripts and for the workflows (resp.) are kept in :file:`docs/api`, :file:`docs/scripts` and :file:`docs/workflows` (resp.). Additional files can be added to the various guides by including their base From d9e6073dec4ed3034e76b5be2fd57dfc81fd58cd Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 13:11:54 +0200 Subject: [PATCH 06/25] Transfer the section explaining how to install conda from the abitutorial/README.md file. --- README.rst | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index a2211f225..23382a7ce 100644 --- a/README.rst +++ b/README.rst @@ -64,7 +64,7 @@ In this case, please consult the detailed installation instructions provided by and then follow the instructions in `our howto `_. The installation process is greatly simplified if you install the required -python packages through `Anaconda `_. +python packages through `Anaconda `_. See the last section of this README file. We routinely use conda_ to test new developments with multiple Python versions and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib_, scipy_, numpy_, netcdf4-python_) in the form of pre-compiled packages that can be easily installed with e.g.:: @@ -256,6 +256,30 @@ Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. For further information, please consult the `scripts docs ` section. +How to install conda ? +====================== + +Download the `miniconda installer ` +If you are a Linux user, download and install `miniconda` on your local machine with: + + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh + bash Miniconda3-latest-Linux-x86_64.sh + +while for MacOSx use: + + curl -o https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh + bash Miniconda3-latest-MacOSX-x86_64.sh + +Answer ``yes`` to the question: + + Do you wish the installer to prepend the Miniconda3 install location + to PATH in your /home/gmatteo/.bashrc ? [yes|no] + [no] >>> yes + +Source your ``.bashrc`` file to activate the changes done by ``miniconda`` to your ``$PATH``: + + source ~/.bashrc + License ======= From 956af809446f28968ecb16f4eb40bf1a40c3c356 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 13:29:00 +0200 Subject: [PATCH 07/25] Improve the previous commit --- README.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 23382a7ce..d779fe172 100644 --- a/README.rst +++ b/README.rst @@ -64,7 +64,7 @@ In this case, please consult the detailed installation instructions provided by and then follow the instructions in `our howto `_. The installation process is greatly simplified if you install the required -python packages through `Anaconda `_. See the last section of this README file. +python packages through `Anaconda `_ (or conda). See InstallConda_ to install conda itself. We routinely use conda_ to test new developments with multiple Python versions and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib_, scipy_, numpy_, netcdf4-python_) in the form of pre-compiled packages that can be easily installed with e.g.:: @@ -121,7 +121,7 @@ For pip, use:: pip install -r requirements.txt pip install -r requirements-optional.txt -If you are using conda_, create a new environment (``abipy3.6``) based on python3.6 with:: +If you are using conda_ (see InstallConda_ to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: conda create -n abipy3.6 python=3.6 source activate abipy3.6 @@ -256,6 +256,8 @@ Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. For further information, please consult the `scripts docs ` section. +.. _InstallConda: + How to install conda ? ====================== From 39534d9328894d0ed9f529a3caccc794c5829727 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 13:38:45 +0200 Subject: [PATCH 08/25] And now ... --- README.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index d779fe172..ce8c9b75a 100644 --- a/README.rst +++ b/README.rst @@ -64,15 +64,14 @@ In this case, please consult the detailed installation instructions provided by and then follow the instructions in `our howto `_. The installation process is greatly simplified if you install the required -python packages through `Anaconda `_ (or conda). See InstallConda_ to install conda itself. +python packages through `Anaconda `_ (or conda). +See `later<#how-to-install-conda->` to install conda itself. We routinely use conda_ to test new developments with multiple Python versions and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib_, scipy_, numpy_, netcdf4-python_) in the form of pre-compiled packages that can be easily installed with e.g.:: conda install numpy scipy netcdf4 -To install AbiPy with conda, download the `miniconda installer `_ -(select python3.6 and the version corresponding to your operating system). Create a new conda_ environment (let's call it ``abipy3.6``) based on python3.6 with:: conda create --name abipy3.6 python=3.6 @@ -121,7 +120,7 @@ For pip, use:: pip install -r requirements.txt pip install -r requirements-optional.txt -If you are using conda_ (see InstallConda_ to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: +If you are using conda_ (see `later<#how-to-install-conda->` to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: conda create -n abipy3.6 python=3.6 source activate abipy3.6 @@ -256,12 +255,12 @@ Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. For further information, please consult the `scripts docs ` section. -.. _InstallConda: - How to install conda ? ====================== -Download the `miniconda installer ` +Download the `miniconda installer `. +Select python3.6 and the version corresponding to your operating system. + If you are a Linux user, download and install `miniconda` on your local machine with: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh From 086213b370af6637acb24ed4ba4fa27ba0935cb0 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 13:59:29 +0200 Subject: [PATCH 09/25] Next trial --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ce8c9b75a..ca0378dca 100644 --- a/README.rst +++ b/README.rst @@ -65,7 +65,7 @@ and then follow the instructions in `our howto `_ (or conda). -See `later<#how-to-install-conda->` to install conda itself. +See `later<#how-to-install-conda->`_ to install conda itself. We routinely use conda_ to test new developments with multiple Python versions and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib_, scipy_, numpy_, netcdf4-python_) in the form of pre-compiled packages that can be easily installed with e.g.:: @@ -120,7 +120,7 @@ For pip, use:: pip install -r requirements.txt pip install -r requirements-optional.txt -If you are using conda_ (see `later<#how-to-install-conda->` to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: +If you are using conda_ (see `later<#how-to-install-conda->`_ to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: conda create -n abipy3.6 python=3.6 source activate abipy3.6 @@ -261,7 +261,7 @@ How to install conda ? Download the `miniconda installer `. Select python3.6 and the version corresponding to your operating system. -If you are a Linux user, download and install `miniconda` on your local machine with: +As an example, if you are a Linux user, download and install `miniconda` on your local machine with: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh From def3b92f7a354f132737d0d72e8175f34a7b17b5 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 14:03:45 +0200 Subject: [PATCH 10/25] Now should work --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index ca0378dca..6dc9284b0 100644 --- a/README.rst +++ b/README.rst @@ -65,7 +65,7 @@ and then follow the instructions in `our howto `_ (or conda). -See `later<#how-to-install-conda->`_ to install conda itself. +See `Installing conda`_ to install conda itself. We routinely use conda_ to test new developments with multiple Python versions and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib_, scipy_, numpy_, netcdf4-python_) in the form of pre-compiled packages that can be easily installed with e.g.:: @@ -120,7 +120,7 @@ For pip, use:: pip install -r requirements.txt pip install -r requirements-optional.txt -If you are using conda_ (see `later<#how-to-install-conda->`_ to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: +If you are using conda_ (see `Installing conda`_ to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: conda create -n abipy3.6 python=3.6 source activate abipy3.6 @@ -255,8 +255,8 @@ Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. For further information, please consult the `scripts docs ` section. -How to install conda ? -====================== +Installing conda +================ Download the `miniconda installer `. Select python3.6 and the version corresponding to your operating system. From e150a43b9574f9e826c45161b0509f8807a936d3 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 14:53:13 +0200 Subject: [PATCH 11/25] Complete README.rst with information coming from abitutorials. Also import the manager directory from abitutorials. --- README.rst | 161 +++++++++++++++++++++++++++++++++++++---- managers/manager.yml | 23 ++++++ managers/scheduler.yml | 43 +++++++++++ 3 files changed, 212 insertions(+), 15 deletions(-) create mode 100644 managers/manager.yml create mode 100644 managers/scheduler.yml diff --git a/README.rst b/README.rst index 6dc9284b0..668c3166c 100644 --- a/README.rst +++ b/README.rst @@ -94,13 +94,6 @@ Finally, install AbiPy from the abinit-channel_ with:: conda install abipy -c abinit -One of the big advantages of conda over pip is that conda can also install -libraries and executables written in Fortran. -For example, one can easily install abinit inside the conda environment with:: - - conda install abinit -c abinit - abinit --version - Additional information on the steps required to install AbiPy with anaconda are available in the `anaconda howto `_. @@ -199,14 +192,7 @@ Two tests rely on the availability of a `pymatgen PMG_MAPI_KEY ` in ~/.pmgrc.yaml. Note that several unit tests check the integration between AbiPy and Abinit. -In order to run the tests, you need a working set of Abinit executables and a ``manager.yml`` configuration file. -A pre-compiled sequential version of Abinit for Linux and OSx can be installed directly from the -abinit-channel_ with:: - - conda install abinit -c abinit - -For further information on the syntax of the configuration file, please consult the -`workflows docs `_ section. +In order to run the tests, you will need a working Abinit executable and a ``manager.yml`` configuration file. Contributing to AbiPy is relatively easy. Just send us a `pull request `_. @@ -215,6 +201,148 @@ AbiPy uses the `Git Flow `_ section. + + +Checking the installation +========================= + +Now open the python interpreter and import the following three modules +to check that the python installation is OK: + +```python +import spglib +import pymatgen +from abipy import abilab +``` + +The Abinit executables are placed inside the anaconda directory associated to the ``abienv`` environment: + + which abinit + /Users/gmatteo/anaconda3/envs/abienv/bin/abinit + +To perform a basic validation of the build, execute: + + abinit -b + +If successful, one can start to use the AbiPy scripts from the command line to analyze the output results. +Execute: + + abicheck.py + +You should see: + +```shell +$ abicheck.py +AbiPy Manager: +[Qadapter 0] +ShellAdapter:localhost +Hardware: + num_nodes: 2, sockets_per_node: 1, cores_per_socket: 2, mem_per_node 4096, +Qadapter selected: 0 + +Abinitbuild: +Abinit Build Information: + Abinit version: 8.8.2 + MPI: True, MPI-IO: True, OpenMP: False + Netcdf: True + +Abipy Scheduler: +PyFlowScheduler, Pid: 19379 +Scheduler options: {'weeks': 0, 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 5} + +Installed packages: +Package Version +-------------- --------- +system Darwin +python_version 3.6.5 +numpy 1.14.3 +scipy 1.1.0 +netCDF4 1.4.0 +apscheduler 2.1.0 +pydispatch 2.0.5 +yaml 3.12 +pymatgen 2018.6.11 + + +Abipy requirements are properly configured +``` + +If the script fails with the error message: + + Abinit executable does not support netcdf + Abipy requires Abinit version >= 8.0.8 but got 0.0.0 + +it means that your environment is not property configured or that there's a problem +with the binary executable. +In this case, look at the files produced in the temporary directory of the flow. +The script reports the name of the directory, something like: + + CRITICAL:pymatgen.io.abinit.tasks:Error while executing /var/folders/89/47k8wfdj11x035svqf8qnl4m0000gn/T/tmp28xi4dy1/job.sh + +Check the `job.sh` script for possible typos, then search for possible error messages in `run.err`. + +The last test consists in executing a small calculation with AbiPy and Abinit. +Inside the shell, execute: + + abicheck.py --with-flow + +to run a GS + NSCF band structure calculation for Si. +If the software stack is properly configured, the output should end with: + +```shell +Work #0: , Finalized=True + Finalized works are not shown. Use verbose > 0 to force output. + +all_ok reached + +Submitted on: Sat Jul 28 09:14:28 2018 +Completed on: Sat Jul 28 09:14:38 2018 +Elapsed time: 0:00:10.030767 +Flow completed successfully + +Calling flow.finalize()... + +Work #0: , Finalized=True + Finalized works are not shown. Use verbose > 0 to force output. + +all_ok reached + + +Test flow completed successfully +``` + +Great, if you've reached this part it means that you've installed AbiPy and Abinit on your machine! +We can finally start to run the scripts in this repo or use one of the AbiPy script to analyze the results. + + Using AbiPy =========== @@ -255,9 +383,12 @@ Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. For further information, please consult the `scripts docs ` section. + Installing conda ================ +In case you have not yet used conda ... + Download the `miniconda installer `. Select python3.6 and the version corresponding to your operating system. diff --git a/managers/manager.yml b/managers/manager.yml new file mode 100644 index 000000000..097917a88 --- /dev/null +++ b/managers/manager.yml @@ -0,0 +1,23 @@ +qadapters: + - + priority: 1 + queue: + qname: abituto + qtype: shell + job: + mpi_runner: mpirun + #pre_run: + # - source activate abitutorials + # - export PATH=$HOME/git_repos/abinit_build_impi/src/98_main:$PATH + # - ulimit -s unlimited + #modules: + # - compiler/intel/composerxe/2013_sp1.1.106 + limits: + min_cores: 1 + max_cores: 2 + timelimit: 0:30:0 + hardware: + num_nodes: 1 + sockets_per_node: 1 + cores_per_socket: 2 + mem_per_node: 4 Gb diff --git a/managers/scheduler.yml b/managers/scheduler.yml new file mode 100644 index 000000000..3b9d6ab05 --- /dev/null +++ b/managers/scheduler.yml @@ -0,0 +1,43 @@ +max_njobs_inqueue: 2 +max_ncores_used: 4 + +# number of weeks to wait. +#weeks: 0 + +# number of days to wait. +#days: 0 + +# number of hours to wait. +#hours: 0 + +# number of minutes to wait. +#minutes: 0 + +# number of seconds to wait. +seconds: 5 + +# when to first execute the job and start the counter (default is after the given interval). +#start_date: + +# Send mail to the specified address (accepts string or list of strings). +# PRO TIP: the scheduler WILL try to send and email after a default time of 4 days. If you +# comment out the mailto address, this will cause the scheduler to terminate, with +# potentially nefarious effects on your running jobs. If you do not wish to receive +# emails, a work around is to set the variable `remindme_s` below to something very +# large (say, 100 days). +#mailto: nobody@nowhere.com + +# verbosity level (int, default 0) +#verbose: 0 + +# The scheduler will shutdown when the number of python exceptions is > max_num_pyexcs +#max_num_pyexcs: 2 + +# The scheduler will shutdown when the number of Abinit errors is > max_num_abierrs +#max_num_abierrs: 0 + +# The scheduler will shutdow when the total number of tasks launched is > safety_ratio * tot_num_tasks. +#safety_ratio: 5 + +# Send an e-mail to mailto every remindme_s seconds. +#remindme_s: 345600 From 778913e80a57252fd837d0d126f61b5f2728b125 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 15:14:57 +0200 Subject: [PATCH 12/25] Fix formatting problems. --- README.rst | 95 +++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/README.rst b/README.rst index 668c3166c..e180158d0 100644 --- a/README.rst +++ b/README.rst @@ -23,7 +23,7 @@ ab-initio calculations and typical convergence studies. AbiPy is interfaced with pymatgen_ and this allows users to benefit from the different tools and python objects available in the pymatgen ecosystem. -The official documentation of the stable version is available at the `abipy docpage`_. +The official documentation of the stable version is available at the `abipy docpage`_, while the documentation of the **developmental** version is hosted on `github pages `_. AbiPy can be used in conjunction with matplotlib_, pandas_, scipy_, seaborn_, ipython_ and jupyter_ notebooks @@ -180,7 +180,7 @@ To run the suite of unit tests, make sure you have pytest_ installed and then ty pytest -in the AbiPy root directory. A quicker check might be obtained with +in the AbiPy root directory. A quicker check might be obtained with:: pytest abipy/core/tests -v @@ -211,6 +211,9 @@ A pre-compiled sequential version of Abinit for Linux and OSx can be installed d abinit-channel_ with:: conda install abinit -c abinit + +Otherwise, follow the usual abinit installation instructions, and make sure abinit can be run with the command:: + abinit --version @@ -235,65 +238,61 @@ Checking the installation ========================= Now open the python interpreter and import the following three modules -to check that the python installation is OK: +to check that the python installation is OK:: -```python -import spglib -import pymatgen -from abipy import abilab -``` + import spglib + import pymatgen + from abipy import abilab -The Abinit executables are placed inside the anaconda directory associated to the ``abienv`` environment: +The Abinit executables are placed inside the anaconda directory associated to the ``abienv`` environment:: which abinit /Users/gmatteo/anaconda3/envs/abienv/bin/abinit -To perform a basic validation of the build, execute: +To perform a basic validation of the build, execute:: abinit -b If successful, one can start to use the AbiPy scripts from the command line to analyze the output results. -Execute: +Execute:: abicheck.py -You should see: - -```shell -$ abicheck.py -AbiPy Manager: -[Qadapter 0] -ShellAdapter:localhost -Hardware: - num_nodes: 2, sockets_per_node: 1, cores_per_socket: 2, mem_per_node 4096, -Qadapter selected: 0 - -Abinitbuild: -Abinit Build Information: - Abinit version: 8.8.2 - MPI: True, MPI-IO: True, OpenMP: False - Netcdf: True - -Abipy Scheduler: -PyFlowScheduler, Pid: 19379 -Scheduler options: {'weeks': 0, 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 5} - -Installed packages: -Package Version --------------- --------- -system Darwin -python_version 3.6.5 -numpy 1.14.3 -scipy 1.1.0 -netCDF4 1.4.0 -apscheduler 2.1.0 -pydispatch 2.0.5 -yaml 3.12 -pymatgen 2018.6.11 - - -Abipy requirements are properly configured -``` +You should see (with minor changes):: + + $ abicheck.py + AbiPy Manager: + [Qadapter 0] + ShellAdapter:localhost + Hardware: + num_nodes: 2, sockets_per_node: 1, cores_per_socket: 2, mem_per_node 4096, + Qadapter selected: 0 + + Abinitbuild: + Abinit Build Information: + Abinit version: 8.8.2 + MPI: True, MPI-IO: True, OpenMP: False + Netcdf: True + + Abipy Scheduler: + PyFlowScheduler, Pid: 19379 + Scheduler options: {'weeks': 0, 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 5} + + Installed packages: + Package Version + -------------- --------- + system Darwin + python_version 3.6.5 + numpy 1.14.3 + scipy 1.1.0 + netCDF4 1.4.0 + apscheduler 2.1.0 + pydispatch 2.0.5 + yaml 3.12 + pymatgen 2018.6.11 + + + Abipy requirements are properly configured If the script fails with the error message: From 2caf5209daf6ee6abc36d6b71957b5067a85e938 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 15:17:40 +0200 Subject: [PATCH 13/25] More formatting fixes. --- README.rst | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/README.rst b/README.rst index e180158d0..e77b48bab 100644 --- a/README.rst +++ b/README.rst @@ -294,7 +294,7 @@ You should see (with minor changes):: Abipy requirements are properly configured -If the script fails with the error message: +If the script fails with the error message:: Abinit executable does not support netcdf Abipy requires Abinit version >= 8.0.8 but got 0.0.0 @@ -302,41 +302,39 @@ If the script fails with the error message: it means that your environment is not property configured or that there's a problem with the binary executable. In this case, look at the files produced in the temporary directory of the flow. -The script reports the name of the directory, something like: +The script reports the name of the directory, something like:: CRITICAL:pymatgen.io.abinit.tasks:Error while executing /var/folders/89/47k8wfdj11x035svqf8qnl4m0000gn/T/tmp28xi4dy1/job.sh Check the `job.sh` script for possible typos, then search for possible error messages in `run.err`. The last test consists in executing a small calculation with AbiPy and Abinit. -Inside the shell, execute: +Inside the shell, execute:: abicheck.py --with-flow to run a GS + NSCF band structure calculation for Si. -If the software stack is properly configured, the output should end with: +If the software stack is properly configured, the output should end with:: -```shell -Work #0: , Finalized=True - Finalized works are not shown. Use verbose > 0 to force output. + Work #0: , Finalized=True + Finalized works are not shown. Use verbose > 0 to force output. -all_ok reached + all_ok reached -Submitted on: Sat Jul 28 09:14:28 2018 -Completed on: Sat Jul 28 09:14:38 2018 -Elapsed time: 0:00:10.030767 -Flow completed successfully + Submitted on: Sat Jul 28 09:14:28 2018 + Completed on: Sat Jul 28 09:14:38 2018 + Elapsed time: 0:00:10.030767 + Flow completed successfully -Calling flow.finalize()... + Calling flow.finalize()... -Work #0: , Finalized=True - Finalized works are not shown. Use verbose > 0 to force output. + Work #0: , Finalized=True + Finalized works are not shown. Use verbose > 0 to force output. -all_ok reached + all_ok reached -Test flow completed successfully -``` + Test flow completed successfully Great, if you've reached this part it means that you've installed AbiPy and Abinit on your machine! We can finally start to run the scripts in this repo or use one of the AbiPy script to analyze the results. @@ -391,23 +389,23 @@ In case you have not yet used conda ... Download the `miniconda installer `. Select python3.6 and the version corresponding to your operating system. -As an example, if you are a Linux user, download and install `miniconda` on your local machine with: +As an example, if you are a Linux user, download and install `miniconda` on your local machine with:: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -while for MacOSx use: +while for MacOSx use:: curl -o https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh bash Miniconda3-latest-MacOSX-x86_64.sh -Answer ``yes`` to the question: +Answer ``yes`` to the question:: Do you wish the installer to prepend the Miniconda3 install location to PATH in your /home/gmatteo/.bashrc ? [yes|no] [no] >>> yes -Source your ``.bashrc`` file to activate the changes done by ``miniconda`` to your ``$PATH``: +Source your ``.bashrc`` file to activate the changes done by ``miniconda`` to your ``$PATH``:: source ~/.bashrc From d040c88636415f2310ca6bbdc3abfcde03efad0d Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 20:27:41 +0200 Subject: [PATCH 14/25] Continue to work on the README.rst, minor modifs. --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index e77b48bab..9fbd85156 100644 --- a/README.rst +++ b/README.rst @@ -223,7 +223,7 @@ Configuration files for Abipy Note that several unit tests check the integration between AbiPy and Abinit. In order to run the tests, you will need a ``manager.yml`` configuration file. For a more detailed description of the syntax used in this configuration file -please consult the [TaskManager documentation](http://abinit.github.io/abipy/workflows/taskmanager.html). +please consult the `TaskManager documentation `. Copy the `scheduler.yml` and `manager.yml` files from the `managers` directory of this repository to your `$HOME/.abinit/abipy` directory. @@ -384,7 +384,8 @@ For further information, please consult the `scripts docs `. Download the `miniconda installer `. Select python3.6 and the version corresponding to your operating system. From 4691ab87b09b97390c8d3389a10961d54ac1dcb7 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 20:29:36 +0200 Subject: [PATCH 15/25] Fix links --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 9fbd85156..688aca13b 100644 --- a/README.rst +++ b/README.rst @@ -378,16 +378,16 @@ The following scripts can be invoked directly from the terminal: Use ``SCRIPT --help`` to get the list of supported commands and ``SCRIPT COMMAND --help`` to get the documentation for ``COMMAND``. -For further information, please consult the `scripts docs ` section. +For further information, please consult the `scripts docs `_ section. Installing conda ================ A brief install guide, in case you have not yet used conda ... For a more extensive description see the -`anaconda how to `. +`anaconda how to `_. -Download the `miniconda installer `. +Download the `miniconda installer `_. Select python3.6 and the version corresponding to your operating system. As an example, if you are a Linux user, download and install `miniconda` on your local machine with:: From c5294d1fd7148fda579375f1246166642fb7655c Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 20:31:23 +0200 Subject: [PATCH 16/25] Commas --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 688aca13b..ac9b84979 100644 --- a/README.rst +++ b/README.rst @@ -358,7 +358,7 @@ Below is a brief description of the different directories found there: Scripts showing how to generate an AbiPy flow, run the calculation and use ipython to analyze the data. Additional jupyter notebooks with the Abinit tutorials written with AbiPy are available in the -`abitutorial repository `_ +`abitutorial repository `_. Users are strongly encouraged to explore the detailed `API docs `_. @@ -384,7 +384,7 @@ For further information, please consult the `scripts docs `_. Download the `miniconda installer `_. From 2d240643f535dc3ac2e4249ced5f0d405c435298 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 20:57:29 +0200 Subject: [PATCH 17/25] Minor correction --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ac9b84979..9bfba490f 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ The notebook will be opened in your browser after building. AbiPy is free to use. However, we also welcome your help to improve this library by making your own contributions. Please report any bugs and issues at AbiPy's `Github page `_. -.. important:: +.. *important*:: Note that the majority of the post-processing tools available in AbiPy require output files in netcdf_ format so we **strongly** suggest to compile Abinit with netcdf support From 261103aac89471806186f04d35bc408ef289399b Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 20:58:47 +0200 Subject: [PATCH 18/25] Previous modif did not work --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9bfba490f..ac9b84979 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ The notebook will be opened in your browser after building. AbiPy is free to use. However, we also welcome your help to improve this library by making your own contributions. Please report any bugs and issues at AbiPy's `Github page `_. -.. *important*:: +.. important:: Note that the majority of the post-processing tools available in AbiPy require output files in netcdf_ format so we **strongly** suggest to compile Abinit with netcdf support From 4eb87baada58a03bb11a35c9212cba1b44ffdd18 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 21:04:29 +0200 Subject: [PATCH 19/25] Fixes --- README.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index ac9b84979..ae56af3e2 100644 --- a/README.rst +++ b/README.rst @@ -223,11 +223,11 @@ Configuration files for Abipy Note that several unit tests check the integration between AbiPy and Abinit. In order to run the tests, you will need a ``manager.yml`` configuration file. For a more detailed description of the syntax used in this configuration file -please consult the `TaskManager documentation `. +please consult the `TaskManager documentation `_. -Copy the `scheduler.yml` and `manager.yml` files from the `managers` directory +Copy the ``scheduler.yml`` and ``manager.yml`` files from the ``managers`` directory of this repository to your `$HOME/.abinit/abipy` directory. -Open `manager.yml` and make sure that the `pre_run` section contains the shell commands +Open ``manager.yml`` and make sure that the ``pre_run`` section contains the shell commands needed to setup the environment before launching Abinit (e.g. Abinit is in $PATH) For further information on the syntax of the configuration file, please consult the @@ -384,8 +384,8 @@ For further information, please consult the `scripts docs `_. +A brief install guide, in case you have not yet used conda ... For a more extensive description, see our +`Anaconda Howto `_. Download the `miniconda installer `_. Select python3.6 and the version corresponding to your operating system. From 633e2d511358a653b913b39388aaa3fcdc0e60c7 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 21:07:26 +0200 Subject: [PATCH 20/25] Unify the environment name, now abienv everywhere (instead of possibly abipy3.6). --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index ae56af3e2..1822c8538 100644 --- a/README.rst +++ b/README.rst @@ -72,9 +72,9 @@ in the form of pre-compiled packages that can be easily installed with e.g.:: conda install numpy scipy netcdf4 -Create a new conda_ environment (let's call it ``abipy3.6``) based on python3.6 with:: +Create a new conda_ environment (let's call it ``abienv``) based on python3.6 with:: - conda create --name abipy3.6 python=3.6 + conda create --name abienv python=3.6 and activate it with:: @@ -113,9 +113,9 @@ For pip, use:: pip install -r requirements.txt pip install -r requirements-optional.txt -If you are using conda_ (see `Installing conda`_ to install conda itself), create a new environment (``abipy3.6``) based on python3.6 with:: +If you are using conda_ (see `Installing conda`_ to install conda itself), create a new environment (``abienv``) based on python3.6 with:: - conda create -n abipy3.6 python=3.6 + conda create -n abienv python=3.6 source activate abipy3.6 Add ``conda-forge``, ``matsci`` and ``abinit`` to your channels with:: From e2fe56b00af47378f4e94c390e36c58711b05cc9 Mon Sep 17 00:00:00 2001 From: gonze Date: Tue, 31 Jul 2018 21:25:34 +0200 Subject: [PATCH 21/25] Final modifs of README.rst --- README.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.rst b/README.rst index 1822c8538..2eca5e280 100644 --- a/README.rst +++ b/README.rst @@ -244,6 +244,8 @@ to check that the python installation is OK:: import pymatgen from abipy import abilab +then quit the interpreter. + The Abinit executables are placed inside the anaconda directory associated to the ``abienv`` environment:: which abinit @@ -253,6 +255,22 @@ To perform a basic validation of the build, execute:: abinit -b +Abinit should echo miscellaneous information, starting with + + DATA TYPE INFORMATION: + REAL: Data type name: REAL(DP) + Kind value: 8 + Precision: 15 + +and ending with + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Default optimizations: + --- None --- + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + If successful, one can start to use the AbiPy scripts from the command line to analyze the output results. Execute:: From b7e1f9f8ea2de43422e531c07ed21bba5f5340c3 Mon Sep 17 00:00:00 2001 From: gonze Date: Wed, 1 Aug 2018 07:06:29 +0200 Subject: [PATCH 22/25] Fix missing :: in README.rst , causing unformatted apprearance on github. --- README.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 093735e89..b723a1877 100644 --- a/README.rst +++ b/README.rst @@ -255,21 +255,21 @@ To perform a basic validation of the build, execute:: abinit -b -Abinit should echo miscellaneous information, starting with +Abinit should echo miscellaneous information, starting with:: - DATA TYPE INFORMATION: - REAL: Data type name: REAL(DP) - Kind value: 8 - Precision: 15 + DATA TYPE INFORMATION: + REAL: Data type name: REAL(DP) + Kind value: 8 + Precision: 15 -and ending with +and ending with:: - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Default optimizations: - --- None --- + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Default optimizations: + --- None --- - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ If successful, one can start to use the AbiPy scripts from the command line to analyze the output results. Execute:: From 18b646cac03267c5f9c9332b9a41f9fee52c1e4c Mon Sep 17 00:00:00 2001 From: gonze Date: Wed, 1 Aug 2018 11:50:55 +0200 Subject: [PATCH 23/25] Remove the managers dir, and update the associated doc. --- README.rst | 19 +++++++++---------- managers/manager.yml | 23 ---------------------- managers/scheduler.yml | 43 ------------------------------------------ 3 files changed, 9 insertions(+), 76 deletions(-) delete mode 100644 managers/manager.yml delete mode 100644 managers/scheduler.yml diff --git a/README.rst b/README.rst index b723a1877..9077e5d5c 100644 --- a/README.rst +++ b/README.rst @@ -220,19 +220,18 @@ Otherwise, follow the usual abinit installation instructions, and make sure abin Configuration files for Abipy ============================= -Note that several unit tests check the integration between AbiPy and Abinit. -In order to run the tests, you will need a ``manager.yml`` configuration file. -For a more detailed description of the syntax used in this configuration file +In order to run the Abipy tests, you will need a ``manager.yml`` configuration file. +For a detailed description of the syntax used in this configuration file please consult the `TaskManager documentation `_. -Copy the ``scheduler.yml`` and ``manager.yml`` files from the ``managers`` directory -of this repository to your `$HOME/.abinit/abipy` directory. -Open ``manager.yml`` and make sure that the ``pre_run`` section contains the shell commands -needed to setup the environment before launching Abinit (e.g. Abinit is in $PATH) - -For further information on the syntax of the configuration file, please consult the -`workflows docs `_ section. +At this stage, for the purpose of checking the installation, you might +take the ``shell_nompi_manager.yml`` file from the ``abipy/data/managers`` directory +of this repository, and copy it with new name ``manager.yml`` to your `$HOME/.abinit/abipy` directory. +Open this file and make sure that the ``pre_run`` section contains the shell commands +needed to setup the environment before launching Abinit (e.g. Abinit is in $PATH), unless it is available from the environment (e.g. conda). +To complete the configuration files for Abipy, you might also copy the ``simple_scheduler.yml`` file from the same directory, +and copy it with name ``scheduler.yml``. Modifications are needed if you are developer. Checking the installation ========================= diff --git a/managers/manager.yml b/managers/manager.yml deleted file mode 100644 index 097917a88..000000000 --- a/managers/manager.yml +++ /dev/null @@ -1,23 +0,0 @@ -qadapters: - - - priority: 1 - queue: - qname: abituto - qtype: shell - job: - mpi_runner: mpirun - #pre_run: - # - source activate abitutorials - # - export PATH=$HOME/git_repos/abinit_build_impi/src/98_main:$PATH - # - ulimit -s unlimited - #modules: - # - compiler/intel/composerxe/2013_sp1.1.106 - limits: - min_cores: 1 - max_cores: 2 - timelimit: 0:30:0 - hardware: - num_nodes: 1 - sockets_per_node: 1 - cores_per_socket: 2 - mem_per_node: 4 Gb diff --git a/managers/scheduler.yml b/managers/scheduler.yml deleted file mode 100644 index 3b9d6ab05..000000000 --- a/managers/scheduler.yml +++ /dev/null @@ -1,43 +0,0 @@ -max_njobs_inqueue: 2 -max_ncores_used: 4 - -# number of weeks to wait. -#weeks: 0 - -# number of days to wait. -#days: 0 - -# number of hours to wait. -#hours: 0 - -# number of minutes to wait. -#minutes: 0 - -# number of seconds to wait. -seconds: 5 - -# when to first execute the job and start the counter (default is after the given interval). -#start_date: - -# Send mail to the specified address (accepts string or list of strings). -# PRO TIP: the scheduler WILL try to send and email after a default time of 4 days. If you -# comment out the mailto address, this will cause the scheduler to terminate, with -# potentially nefarious effects on your running jobs. If you do not wish to receive -# emails, a work around is to set the variable `remindme_s` below to something very -# large (say, 100 days). -#mailto: nobody@nowhere.com - -# verbosity level (int, default 0) -#verbose: 0 - -# The scheduler will shutdown when the number of python exceptions is > max_num_pyexcs -#max_num_pyexcs: 2 - -# The scheduler will shutdown when the number of Abinit errors is > max_num_abierrs -#max_num_abierrs: 0 - -# The scheduler will shutdow when the total number of tasks launched is > safety_ratio * tot_num_tasks. -#safety_ratio: 5 - -# Send an e-mail to mailto every remindme_s seconds. -#remindme_s: 345600 From 6bcfb5c949fb6b420454c7c9a946077abc688bee Mon Sep 17 00:00:00 2001 From: gonze Date: Thu, 2 Aug 2018 06:34:46 +0200 Subject: [PATCH 24/25] Write explicitly Setyawan and Curtarolo 2010 --- abipy/scripts/abistruct.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/abipy/scripts/abistruct.py b/abipy/scripts/abistruct.py index 890e0502b..05c8a490b 100755 --- a/abipy/scripts/abistruct.py +++ b/abipy/scripts/abistruct.py @@ -65,7 +65,7 @@ def get_epilog(): abistruct.py abisanitize FILE => Read structure from FILE, call abisanitize, compare structures and save "abisanitized" structure to file. abistruct.py conventional FILE => Read structure from FILE, generate conventional structure - following doi:10.1016/j.commatsci.2010.05.010 + following Setyawan, W., & Curtarolo, S. (2010) doi:10.1016/j.commatsci.2010.05.010 ################## # Conversion tools ################## @@ -252,7 +252,7 @@ def add_format_arg(parser, default, option=True, formats=None): # Subparser for conventional. p_conventional = subparsers.add_parser('conventional', parents=[copts_parser, path_selector, spgopt_parser, savefile_parser], help="Gives a structure with a conventional cell according to certain standards. " - "The standards are defined in doi:10.1016/j.commatsci.2010.05.010") + "The standards are defined in Setyawan, W., & Curtarolo, S. (2010) doi:10.1016/j.commatsci.2010.05.010") # Subparser for neighbors. p_neighbors = subparsers.add_parser('neighbors', parents=[copts_parser, path_selector], From ab72a8ba0d4a26f54efeac95a8c74b36aeac157f Mon Sep 17 00:00:00 2001 From: trunk Date: Wed, 20 Nov 2024 21:39:22 +0100 Subject: [PATCH 25/25] Improve slightly the examples of LumiWorks. Also fix a typo. --- abipy/examples/flows/run_gs_vs_kpts.py | 2 +- abipy/examples/flows/run_lumi_Eu_doped_SLA.py | 18 +++++++++--------- abipy/examples/flows/run_lumi_NV_center.py | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/abipy/examples/flows/run_gs_vs_kpts.py b/abipy/examples/flows/run_gs_vs_kpts.py index ad2a13696..6a9272003 100755 --- a/abipy/examples/flows/run_gs_vs_kpts.py +++ b/abipy/examples/flows/run_gs_vs_kpts.py @@ -1,6 +1,6 @@ #!/usr/bin/env python r""" -Convergence studiy with different k-meshes +Convergence study with different k-meshes ========================================== In this example, diff --git a/abipy/examples/flows/run_lumi_Eu_doped_SLA.py b/abipy/examples/flows/run_lumi_Eu_doped_SLA.py index 31ddaede6..fcca85c01 100755 --- a/abipy/examples/flows/run_lumi_Eu_doped_SLA.py +++ b/abipy/examples/flows/run_lumi_Eu_doped_SLA.py @@ -1,22 +1,22 @@ #!/usr/bin/env python r""" -Delta SCF constrained occupation method calculation, to determine luminescent properties. -========================================================================================= +Delta SCF calculation: luminescence of an Eu-doped phosphor +=========================================================== -This example shows how to compute the luminescent properties of Eu doped phosphor. -It uses a 36 atoms cell of SrLiAl3N4. Two non-equivalent Sr sites are availabe for Eu, resulting +This example shows how to compute the luminescent properties of an Eu-doped phosphor. +It uses a 36 atoms cell of SrLiAl3N4. Two non-equivalent Sr sites are available for Eu, resulting in two independent LumiWork. The creation of the supercells is done with make_doped_supercell(). Steps, for each structure: -1) Relaxation in the ground state -2) Relaxation in the excited state, starting from the relaxed ground state. Created at run-time +1) Relaxation in the ground state. +2) Relaxation in the excited state, starting from the relaxed ground state. Created at run-time. 3) Scf computation in the relaxed/unrelaxed ground/excited state (4 computations). Even if we use minimal settings, the workflow takes around one hour to run on one core. -Filepaths of the 6 runs are stored in outdata/lumi.json of each work -A quick post-processing is automatically done at the end of a LumiWork +Filepaths of the 6 runs are stored in outdata/lumi.json of each work. +A quick post-processing is automatically done at the end of a LumiWork, and stored in outdata/Delta_SCF.json of each work, with relevant luminescent properties -(ZPL energy, Stoke Shift, \Delta Q,...), see abipy/lumi/delta_scf.py +(ZPL energy, Stoke Shift, \Delta Q,...), see abipy/lumi/delta_scf.py . """ import sys diff --git a/abipy/examples/flows/run_lumi_NV_center.py b/abipy/examples/flows/run_lumi_NV_center.py index f7b48c0cc..f61ef483d 100755 --- a/abipy/examples/flows/run_lumi_NV_center.py +++ b/abipy/examples/flows/run_lumi_NV_center.py @@ -1,15 +1,15 @@ #!/usr/bin/env python r""" -Delta SCF constrained occupation method calculation, to determine luminescent properties. +Delta SCF calculation: luminescence of the NV- center in diamond. ========================================================================================= This example shows how to compute the luminescent properties of the NV- center in diamond. -It uses a 64 atoms supercell, where one C atom was replaced by one N atom and one vacancy was created. +It uses a 64-atom supercell, where one C atom was replaced by one N atom and one vacancy was created. See Fig.3 of https://doi.org/10.1103/PhysRevB.104.045303 for the setting of electron occupation in the ground/excited state. Steps: -1) Relaxation in the ground state -2) Relaxation in the excited state, starting from the relaxed ground state. Created at run-time +1) Relaxation in the ground state. +2) Relaxation in the excited state, starting from the relaxed ground state. Created at run-time. 3) Scf computation in the relaxed/unrelaxed ground/excited state (4 computations). Even if we use minimal settings, the workflow takes a few minutes to run on one core.