Testing Pylada

Proof of existence test

The simplest possible test is to and load Pylada in a python shell:

$ python >>> import pylada

If this fails with a message saying Pylada cannot be loaded, then it is likely pylada was installed somewhere that python does not know about. You may need to adjust you PYTHONPATH environment variable. Make sure that Pylada is in one of the directories listed by the commands below:

>>> import sys
>>> sys.path

If the directory is not listed, please refer to the documentation for `sys.path`__.

If loading Pylada fails with a message saying a package (other than Pylada) cannot be found, then please install that package.

Battery of tests

A series of tests exist for Pylada. Once python can find the Pylada package it is possible to batch launch these tests:

$ cd /path/to/pylada/build $ make test

It is also possible to test specific mosules:

$ cd /path/to/pylada/build/module_name $ make test

Or specific tests:

$ cd /path/to/pylada/build $ python ../module_name/tests/test_name.py

Some tests will require an argument.

If you want verbose output, so you can debug the test, set
export CTEST_OUTPUT_ON_FAILURE=1

Unfortunately sometimes tests “fail” not because the computation fails but because things get out of date between the exact result the test expects and the actual computed answer, so it is useful to look at the exact nature of the failure.

If you have more tests, please do send them.

Failure modes and possible solutions

  1. Pylada cannnot be found. This is the most likely failure mode. Every other day in my case. Please check above.
  2. The failed test is called “[vasp, crystal]_run.py”. Most likely, Pylada cannot find the VASP/GULP executable. See here for vasp. The others are similar.
  3. The failed test is still called “[vasp, crystal]_run.py”: Check that lada.mpirun_exe is set correctly, and that you have installed openmpi or something.
  4. “vff_functional” fails: try upgrading scipy.

Table Of Contents

Previous topic

Setting up Pylada

Next topic

Creating and Manipulating crystal structures

This Page