Closed blakeaw closed 2 years ago
It looks like I'm also getting some errors when I run the MPI enabled tests ./pytest-mpi -oo -n 2 -ns
:
./pytest-mpi: line 67: [: : integer expression expected
./pytest-mpi: line 71: [: : integer expression expected
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --only-mpi
inifile: None
rootdir: joss_review/hylleraasmd/hymd
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --only-mpi
inifile: None
rootdir: joss_review/hylleraasmd/hymd
--------------------------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[50091,1],1]
Exit code: 4
--------------------------------------------------------------------------
################################################################################
################################# RANK 0 / 2 ###################################
################################################################################
################################################################################
################################# RANK 1 / 2 ###################################
################################################################################
Hi,
I went ahead and tried reinstalling everything in a fresh conda environment. I uninstalled mpich and instead used openmpi apt install openmpi-bin libopenmpi-dev
this time so that mpi4py and h5py were compiled with openmpi (setting CC=mpicc.openmpi
).
Now when I run standard test set I still get many errors (E
) but I also get one failure in test_force. It looks like many of the Es are the same E fixture 'mpi_file_name' not found
as before. It looks like the failure in test_force is from test/test_force.py:99: AssertionError
. The full pytest output is below:
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: joss_review/hylleraasmd/hymd
collected 42 items
test/test_distribute_input.py EEEE [ 9%]
test/test_field.py . [ 11%]
test/test_force.py .F.... [ 26%]
test/test_hamiltonian.py EEE...... [ 47%]
test/test_input_parser.py EEEEEEEEEEEE [ 76%]
test/test_integrator.py ......... [ 97%]
test/test_thermostat.py . [100%]
================================================================================ ERRORS ================================================================================________________________________________________________ ERROR at setup of test_file_io_distribute_input_size_1 ________________________________________________________file joss_review/hylleraasmd/hymd/test/test_distribute_input.py, line 17
def test_file_io_distribute_input_size_1(h5py_molecules_file):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 202
@pytest.fixture()
def h5py_molecules_file(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:202
________________________________________________________ ERROR at setup of test_file_io_distribute_input_size_2 ________________________________________________________file joss_review/hylleraasmd/hymd/test/test_distribute_input.py, line 28
def test_file_io_distribute_input_size_2(h5py_molecules_file):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 202
@pytest.fixture()
def h5py_molecules_file(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:202
________________________________________________________ ERROR at setup of test_file_io_distribute_input_size_3 ________________________________________________________file joss_review/hylleraasmd/hymd/test/test_distribute_input.py, line 49
def test_file_io_distribute_input_size_3(h5py_molecules_file):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 202
@pytest.fixture()
def h5py_molecules_file(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:202
____________________________________________________ ERROR at setup of test_file_io_distribute_input_various_sizes _____________________________________________________file joss_review/hylleraasmd/hymd/test/test_distribute_input.py, line 74
def test_file_io_distribute_input_various_sizes(h5py_molecules_file):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 202
@pytest.fixture()
def h5py_molecules_file(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:202
_______________________________________________ ERROR at setup of test_DefaultNoChi_window_function[0.2988365823859701] ________________________________________________file joss_review/hylleraasmd/hymd/test/test_hamiltonian.py, line 17
@pytest.mark.parametrize(
"sigma",
[
0.2988365823859701,
1.2585762493242553,
9.2159828579248931,
],
)
def test_DefaultNoChi_window_function(
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
_______________________________________________ ERROR at setup of test_DefaultNoChi_window_function[1.2585762493242554] ________________________________________________file joss_review/hylleraasmd/hymd/test/test_hamiltonian.py, line 17
@pytest.mark.parametrize(
"sigma",
[
0.2988365823859701,
1.2585762493242553,
9.2159828579248931,
],
)
def test_DefaultNoChi_window_function(
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
________________________________________________ ERROR at setup of test_DefaultNoChi_window_function[9.215982857924892] ________________________________________________file joss_review/hylleraasmd/hymd/test/test_hamiltonian.py, line 17
@pytest.mark.parametrize(
"sigma",
[
0.2988365823859701,
1.2585762493242553,
9.2159828579248931,
],
)
def test_DefaultNoChi_window_function(
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
_________________________________________________________ ERROR at setup of test_input_parser_read_config_toml _________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 25
def test_input_parser_read_config_toml(config_toml):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
_______________________________________________________________ ERROR at setup of test_input_parser_file _______________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 31
def test_input_parser_file(config_toml):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
______________________________________________________ ERROR at setup of test_input_parser_file_check_n_particles ______________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 38
@pytest.mark.mpi()
def test_input_parser_file_check_n_particles(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
_________________________________________________________ ERROR at setup of test_input_parser_check_optionals __________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 73
@pytest.mark.mpi()
def test_input_parser_check_optionals(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
___________________________________________________________ ERROR at setup of test_input_parser_check_bonds ____________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 157
@pytest.mark.mpi()
def test_input_parser_check_bonds(config_toml, dppc_single, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
___________________________________________________________ ERROR at setup of test_input_parser_check_angles ___________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 203
@pytest.mark.mpi()
def test_input_parser_check_angles(config_toml, dppc_single, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
____________________________________________________________ ERROR at setup of test_input_parser_check_chi _____________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 251
@pytest.mark.mpi()
def test_input_parser_check_chi(config_toml, dppc_single, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
__________________________________________________________ ERROR at setup of test_input_parser_check_box_size __________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 334
def test_input_parser_check_box_size(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
_________________________________________________________ ERROR at setup of test_input_parser_check_integrator _________________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 354
def test_input_parser_check_integrator(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
____________________________________________________ ERROR at setup of test_input_parser_thermostat_coupling_groups ____________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 376
def test_input_parser_thermostat_coupling_groups(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
____________________________________________________ ERROR at setup of test_input_parser_check_cancel_com_momentum _____________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 459
def test_input_parser_check_cancel_com_momentum(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
________________________________________________ ERROR at setup of test_input_parser_check_start_and_target_temperature ________________________________________________file joss_review/hylleraasmd/hymd/test/test_input_parser.py, line 487
def test_input_parser_check_start_and_target_temperature(config_toml, caplog):
file joss_review/hylleraasmd/hymd/test/conftest.py, line 237
@pytest.fixture()
def config_toml(mpi_file_name):
E fixture 'mpi_file_name' not found
> available fixtures: alanine_octapeptide, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, config_CONF, config_toml, doctest_namespace, dppc_single, filter, h5py_molecules_file, molecules_with_solvent, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, three_atoms, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, v_ext
> use 'pytest --fixtures [testpath]' for help on them.
joss_review/hylleraasmd/hymd/test/conftest.py:237
=============================================================================== FAILURES ===============================================================================___________________________________________________________________________ test_comp_bonds ____________________________________________________________________________
dppc_single = (array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), array([[ 1, -1, -1],
[ 0, 2, -1],
[ 1, 3, 4... equilibrium=180.0, strength=25.0), Angle(atom_1='C', atom_2='C', atom_3='C', equilibrium=180.0, strength=25.0)), ...})
def test_comp_bonds(dppc_single):
indices, bonds, names, molecules, r, CONF = dppc_single
config = Config(n_steps=1, time_step=0.03, mesh_size=[30, 30, 30],
box_size=np.array([13.0, 13.0, 14.0]), sigma=0.5, kappa=1)
config.bonds = CONF['bond_2']
bonds_2, _, _, _ = prepare_bonds(molecules, names, bonds, indices, config)
expected_energies = np.array([0.24545803261508981,
0.76287125411373635,
2.1147847786016976,
9.3338621118512890,
5.2422610583092810,
1.5660141344942931,
0.32418863877682835,
0.15582792534587750,
6.2278499169351944,
0.65253272104760673,
0.031806604466348753], dtype=np.float64)
expected_forces_i = np.array([
[20.998021457611852, 9.0071937483622282, -9.5707176942411820],
[34.384875147498597, 12.778365176329645, -23.697507881539778],
[17.917253461973676, -20.426928097726201, -67.443862458892141],
[-52.053439897669733, 83.19032187729123, 117.06607117521537],
[101.22671118485104, 33.178722608565110, 41.928247692168640],
[-3.8634845559150439, -22.155214019527303, -58.388828683840543],
[8.9963139950908992, 12.594088552272277, 23.894075939054996],
[-2.9353597041563950, 2.4521443094825361, -19.363379484412864],
[95.85080439063942, 33.391869600494857, 72.575692449944356],
[23.050482374363451, 8.4211009839435036, 32.079465755314608],
[5.5323489341501677, 5.4217094311092637, 4.4175438063815795]],
dtype=np.float64
)
expected_forces_j = np.array([
[-20.998021457611852, -9.0071937483622282, 9.5707176942411820],
[-34.384875147498597, -12.778365176329645, 23.697507881539778],
[-17.917253461973676, 20.426928097726201, 67.443862458892141],
[52.053439897669733, -83.19032187729123, -117.06607117521537],
[-101.22671118485104, -33.178722608565110, -41.928247692168640],
[3.8634845559150439, 22.155214019527303, 58.388828683840543],
[-8.9963139950908992, -12.594088552272277, -23.894075939054996],
[2.9353597041563950, -2.4521443094825361, 19.363379484412864],
[-95.85080439063942, -33.391869600494857, -72.575692449944356],
[-23.050482374363451, -8.4211009839435036, -32.079465755314608],
[-5.5323489341501677, -5.4217094311092637, -4.4175438063815795]],
dtype=np.float64
)
for i, b in enumerate(bonds_2):
f_bonds = np.zeros(shape=r.shape, dtype=np.float64)
energy = 0.0
energy = compute_bond_forces(f_bonds, r, (b,), CONF['L'])
assert energy == pytest.approx(expected_energies[i], abs=1e-13)
> assert f_bonds[b[0], :] == pytest.approx(expected_forces_i[i], abs=1e-13) # noqa: E501
E assert array([23.05048237, 8.42110098, 32.07946576]) == approx([23.05048237436345 ± 1.0e-13, 8.421100983943504 ± 1.0e-13, 32.07946575531461 ± 1.0e-13])
E + where approx([23.05048237436345 ± 1.0e-13, 8.421100983943504 ± 1.0e-13, 32.07946575531461 ± 1.0e-13]) = <function approx at 0x7f125b4bca60>(array([23.05048237, 8.42110098, 32.07946576]), abs=1e-13)
E + where <function approx at 0x7f125b4bca60> = pytest.approx
test/test_force.py:99: AssertionError
=========================================================================== warnings summary ===========================================================================test/test_field.py:12
joss_review/hylleraasmd/hymd/test/test_field.py:12: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
test/test_input_parser.py:38
joss_review/hylleraasmd/hymd/test/test_input_parser.py:38: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
test/test_input_parser.py:73
joss_review/hylleraasmd/hymd/test/test_input_parser.py:73: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
test/test_input_parser.py:157
joss_review/hylleraasmd/hymd/test/test_input_parser.py:157: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
test/test_input_parser.py:203
joss_review/hylleraasmd/hymd/test/test_input_parser.py:203: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
test/test_input_parser.py:251
joss_review/hylleraasmd/hymd/test/test_input_parser.py:251: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
test/test_thermostat.py:12
joss_review/hylleraasmd/hymd/test/test_thermostat.py:12: PytestUnknownMarkWarning: Unknown pytest.mark.mpi - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.mpi()
-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================================================================= short test summary info ========================================================================FAILED test/test_force.py::test_comp_bonds - assert array([23.05048237, 8.42110098, 32.07946576]) == approx([23.05048237436345 ± 1.0e-13, 8.421100983943504 ± 1.0e-1...ERROR test/test_distribute_input.py::test_file_io_distribute_input_size_1
ERROR test/test_distribute_input.py::test_file_io_distribute_input_size_2
ERROR test/test_distribute_input.py::test_file_io_distribute_input_size_3
ERROR test/test_distribute_input.py::test_file_io_distribute_input_various_sizes
ERROR test/test_hamiltonian.py::test_DefaultNoChi_window_function[0.2988365823859701]
ERROR test/test_hamiltonian.py::test_DefaultNoChi_window_function[1.2585762493242554]
ERROR test/test_hamiltonian.py::test_DefaultNoChi_window_function[9.215982857924892]
ERROR test/test_input_parser.py::test_input_parser_read_config_toml
ERROR test/test_input_parser.py::test_input_parser_file
ERROR test/test_input_parser.py::test_input_parser_file_check_n_particles
ERROR test/test_input_parser.py::test_input_parser_check_optionals
ERROR test/test_input_parser.py::test_input_parser_check_bonds
ERROR test/test_input_parser.py::test_input_parser_check_angles
ERROR test/test_input_parser.py::test_input_parser_check_chi
ERROR test/test_input_parser.py::test_input_parser_check_box_size
ERROR test/test_input_parser.py::test_input_parser_check_integrator
ERROR test/test_input_parser.py::test_input_parser_thermostat_coupling_groups
ERROR test/test_input_parser.py::test_input_parser_check_cancel_com_momentum
ERROR test/test_input_parser.py::test_input_parser_check_start_and_target_temperature
========================================================= 1 failed, 22 passed, 7 warnings, 19 errors in 2.34s ==========================================================
Hi @blakeaw, I believe the main issue the parallel tests tagged with
@pytest.mark.mpi()
fail outright if pytest-mpi
is not installed. With this package available, the MPI tests are automatically skipped unless you flag --only-mpi
to pytest. My bad for not adding this pytest extra package as a test dependency. I will add it to the test docs as soon as I get a chance.
As for the test_force
failure, I am not sure what is going on there. Both locally on my machine and in the mortele/hymd:latest
docker image, the force tests succeed:
docker pull mortele/hymd
docker run -it mortele/hymd:latest
root@c7de44a7d5d1:/app# apt-get update -y
root@c7de44a7d5d1:/app# apt-get install git -y
root@c7de44a7d5d1:/app# pip3 install hymd
root@c7de44a7d5d1:/app# git clone https://github.com/Cascella-Group-UiO/HyMD.git
root@c7de44a7d5d1:/app# cd HyMD
root@c7de44a7d5d1:/app# pip3 install pytest
root@c7de44a7d5d1:/app# pytest
==================================================================================================== test session starts =====================================================================================================
platform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /app
collected 42 items
HyMD/test/test_distribute_input.py EEEE [ 9%]
HyMD/test/test_field.py . [ 11%]
HyMD/test/test_force.py ...... [ 26%]
HyMD/test/test_hamiltonian.py EEE...... [ 47%]
HyMD/test/test_input_parser.py EEEEEEEEEEEE [ 76%]
HyMD/test/test_integrator.py ......... [ 97%]
HyMD/test/test_thermostat.py . [100%]
=========================================================================================================== ERRORS ===========================================================================================================
(...)
========================================================================================= 23 passed, 7 warnings, 19 errors in 7.15s ==========================================================================================
root@c7de44a7d5d1:/app# pip3 install pytest-mpi
root@c7de44a7d5d1:/app# pytest
==================================================================================================== test session starts =====================================================================================================
platform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /app
plugins: mpi-0.6
collected 42 items
HyMD/test/test_distribute_input.py .... [ 9%]
HyMD/test/test_field.py s [ 11%]
HyMD/test/test_force.py ...... [ 26%]
HyMD/test/test_hamiltonian.py ......... [ 47%]
HyMD/test/test_input_parser.py ..sssss..... [ 76%]
HyMD/test/test_integrator.py ......... [ 97%]
HyMD/test/test_thermostat.py s [100%]
=============================================================================================== 35 passed, 7 skipped in 6.39s ================================================================================================
root@c7de44a7d5d1:/app# mpirun --allow-run-as-root -n 6 pytest --only-mpi
(...)
================== 7 passed, 35 skipped, 22 warnings in 0.86s ==================
I will have to look into the force issue as soon as I get a chance.
Ah, ok. Yeah, the mpi_file_name fixture errors were resolved when I installed pytest-mpi. Thanks! As you already deduced I didn't realize pytest-mpi was a separate package needed for the tests.
I'll try installing and running again on a different machine to see if I still get the failure in test_force there as well.
Hi again, @blakeaw . I have tried to reproduce this behaviour across three different operating systems now, but I have not seen anything that looks like these test_force
failures. Can you give me some more information about the conda environment you are using to run these tests?
Hi @mortele. Yeah, it is odd. I haven't gotten around to trying it on a different machine myself yet, but I did reinstall everything in a fresh conda environment with python 3.8, and I pulled in the most recent changes to the HyMD repo.
I still get a similar test_force
failure in test_comp_bonds
when I run pytest:
====================================================================== FAILURES ======================================================================
__________________________________________________________________ test_comp_bonds ___________________________________________________________________
dppc_single = (array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), array([[ 1, -1, -1],
[ 0, 2, -1],
[ 1, 3, 4... equilibrium=180.0, strength=25.0), Angle(atom_1='C', atom_2='C', atom_3='C', equilibrium=180.0, strength=25.0)), ...})
def test_comp_bonds(dppc_single):
indices, bonds, names, molecules, r, CONF = dppc_single
config = Config(n_steps=1, time_step=0.03, mesh_size=[30, 30, 30],
box_size=np.array([13.0, 13.0, 14.0]), sigma=0.5, kappa=1)
config.bonds = CONF['bond_2']
bonds_2, _, _, _ = prepare_bonds(molecules, names, bonds, indices, config)
expected_energies = np.array([0.24545803261508981,
0.76287125411373635,
2.1147847786016976,
9.3338621118512890,
5.2422610583092810,
1.5660141344942931,
0.32418863877682835,
0.15582792534587750,
6.2278499169351944,
0.65253272104760673,
0.031806604466348753], dtype=np.float64)
expected_forces_i = np.array([
[20.998021457611852, 9.0071937483622282, -9.5707176942411820],
[34.384875147498597, 12.778365176329645, -23.697507881539778],
[17.917253461973676, -20.426928097726201, -67.443862458892141],
[-52.053439897669733, 83.19032187729123, 117.06607117521537],
[101.22671118485104, 33.178722608565110, 41.928247692168640],
[-3.8634845559150439, -22.155214019527303, -58.388828683840543],
[8.9963139950908992, 12.594088552272277, 23.894075939054996],
[-2.9353597041563950, 2.4521443094825361, -19.363379484412864],
[95.85080439063942, 33.391869600494857, 72.575692449944356],
[23.050482374363451, 8.4211009839435036, 32.079465755314608],
[5.5323489341501677, 5.4217094311092637, 4.4175438063815795]],
dtype=np.float64
)
expected_forces_j = np.array([
[-20.998021457611852, -9.0071937483622282, 9.5707176942411820],
[-34.384875147498597, -12.778365176329645, 23.697507881539778],
[-17.917253461973676, 20.426928097726201, 67.443862458892141],
[52.053439897669733, -83.19032187729123, -117.06607117521537],
[-101.22671118485104, -33.178722608565110, -41.928247692168640],
[3.8634845559150439, 22.155214019527303, 58.388828683840543],
[-8.9963139950908992, -12.594088552272277, -23.894075939054996],
[2.9353597041563950, -2.4521443094825361, 19.363379484412864],
[-95.85080439063942, -33.391869600494857, -72.575692449944356],
[-23.050482374363451, -8.4211009839435036, -32.079465755314608],
[-5.5323489341501677, -5.4217094311092637, -4.4175438063815795]],
dtype=np.float64
)
for i, b in enumerate(bonds_2):
f_bonds = np.zeros(shape=r.shape, dtype=np.float64)
energy = 0.0
energy = compute_bond_forces(f_bonds, r, (b,), CONF['L'])
assert energy == pytest.approx(expected_energies[i], abs=1e-13)
> assert f_bonds[b[0], :] == pytest.approx(expected_forces_i[i], abs=1e-13) # noqa: E501
E assert array([23.050... 32.07946576]) == approx([23.05...61 ± 1.0e-13])
E comparison failed. Mismatched elements: 1 / 3:
E Max absolute difference: 1.0658141036401503e-13
E Max relative difference: 3.3224184958989637e-15
E Index | Obtained | Expected
E (2,) | 32.079465755314715 | 32.07946575531461 ± 1.0e-13
test/test_force.py:99: AssertionError
============================================================== short test summary info ===============================================================
FAILED test/test_force.py::test_comp_bonds - assert array([23.050... 32.07946576]) == approx([23.05...61 ± 1.0e-13])
====================================================== 1 failed, 34 passed, 7 skipped in 3.43s =======================================================
It looks like that particular computation falls just a little outside the comparison tolerance.
Running the mpi-enabled pytest script seems to pass but it skips several things:
./pytest-mpi -oo -n 2 -ns
################################################################################
################################# RANK 0 / 2 ###################################
################################################################################
============================= test session starts ==============================
platform linux -- Python 3.8.12, pytest-7.1.1, pluggy-1.0.0
plugins: mpi-0.6
collected 42 items
test/test_distribute_input.py ssss [ 9%]
test/test_field.py . [ 11%]
test/test_force.py ssssss [ 26%]
test/test_hamiltonian.py sssssssss [ 47%]
test/test_input_parser.py ss.....sssss [ 76%]
test/test_integrator.py sssssssss [ 97%]
test/test_thermostat.py . [100%]
=================== 7 passed, 35 skipped, 1 warning in 0.22s ===================
################################################################################
################################# RANK 1 / 2 ###################################
################################################################################
============================= test session starts ==============================
platform linux -- Python 3.8.12, pytest-7.1.1, pluggy-1.0.0
plugins: mpi-0.6
collected 42 items
test/test_distribute_input.py ssss [ 9%]
test/test_field.py . [ 11%]
test/test_force.py ssssss [ 26%]
test/test_hamiltonian.py sssssssss [ 47%]
test/test_input_parser.py ss.....sssss [ 76%]
test/test_integrator.py sssssssss [ 97%]
test/test_thermostat.py . [100%]
================== 7 passed, 35 skipped, 22 warnings in 0.23s ==================
Here are my conda environment details:
channels:
- defaults
dependencies:
- _libgcc_mutex=0.1=main
- _openmp_mutex=4.5=1_gnu
- ca-certificates=2022.3.18=h06a4308_0
- certifi=2021.10.8=py38h06a4308_2
- ld_impl_linux-64=2.35.1=h7274673_9
- libffi=3.3=he6710b0_2
- libgcc-ng=9.3.0=h5101ec6_17
- libgomp=9.3.0=h5101ec6_17
- libstdcxx-ng=9.3.0=hd4cf53a_17
- ncurses=6.3=h7f8727e_2
- openssl=1.1.1n=h7f8727e_0
- pip=21.2.4=py38h06a4308_0
- python=3.8.12=h12debd9_0
- readline=8.1.2=h7f8727e_1
- setuptools=58.0.4=py38h06a4308_0
- sqlite=3.38.0=hc218d9a_0
- tk=8.6.11=h1ccaba5_0
- wheel=0.37.1=pyhd3eb1b0_0
- xz=5.2.5=h7b6447c_0
- zlib=1.2.11=h7f8727e_4
- pip:
- attrs==21.4.0
- cython==0.29.28
- h5py==3.6.0
- hymd==1.0.6.post1
- iniconfig==1.1.1
- mpi4py==3.1.3
- mpmath==1.2.1
- mpsort==0.1.17
- networkx==2.7.1
- numpy==1.22.3
- packaging==21.3
- pfft-python==0.1.21
- pluggy==1.0.0
- pmesh==0.1.56
- py==1.11.0
- pyparsing==3.0.7
- pytest==7.1.1
- pytest-mpi==0.6
- sympy==1.10.1
- tomli==2.0.1
I used openmpi to install/build h5py and mpi4py.
In a clean ubuntu:20.04
docker container, the following runs and does not reproduce this error:
apt-get update -y
apt-get install -y python3 python3-pip # Install python3 and pip
apt-get install -y libopenmpi-dev # Install MPI development headers
apt-get install -y libhdf5-openmpi-dev # Install MPI-enabled HDF5
apt-get install -y pkg-config # Install pkg-config, required for h5py install
apt-get install -y curl wget
apt-get install -y git
cd /tmp
curl -O https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
bash Anaconda3-2021.11-Linux-x86_64.sh
source ~/.bashrc
conda create --name hymd python=3.8
conda activate hymd
python3 -m ensurepip --upgrade
CC="mpicc" HDF5_MPI="ON" python3 -m pip install --no-binary=h5py h5py
python3 -m pip install mpi4py numpy cython
python3 -m pip install pmesh mpsort tomli sympy
python3 -m pip install hymd
cd /tmp
git clone https://github.com/Cascella-Group-UiO/HyMD.git hymd
cd hymd
python3 -m pip install pytest pytest-mpi
pytest
At this point I am stumped and starting to think that the tolerance we defined is just slightly too strict for the level of numerical precision we can expect to get with double-type force calculations across different machines. 🤔
This is using the conda environment ```bash # packages in environment at /root/anaconda3/envs/hymd: # # Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 4.5 1_gnu attrs 21.4.0 pypi_0 pypi ca-certificates 2022.3.18 h06a4308_0 certifi 2021.10.8 py38h06a4308_2 cython 0.29.28 pypi_0 pypi h5py 3.6.0 pypi_0 pypi hymd 1.0.6.post1 pypi_0 pypi iniconfig 1.1.1 pypi_0 pypi ld_impl_linux-64 2.35.1 h7274673_9 libffi 3.3 he6710b0_2 libgcc-ng 9.3.0 h5101ec6_17 libgomp 9.3.0 h5101ec6_17 libstdcxx-ng 9.3.0 hd4cf53a_17 mpi4py 3.1.3 pypi_0 pypi mpmath 1.2.1 pypi_0 pypi mpsort 0.1.17 pypi_0 pypi ncurses 6.3 h7f8727e_2 networkx 2.7.1 pypi_0 pypi numpy 1.22.3 pypi_0 pypi openssl 1.1.1n h7f8727e_0 packaging 21.3 pypi_0 pypi pfft-python 0.1.21 pypi_0 pypi pip 21.2.4 py38h06a4308_0 pluggy 1.0.0 pypi_0 pypi pmesh 0.1.56 pypi_0 pypi py 1.11.0 pypi_0 pypi pyparsing 3.0.7 pypi_0 pypi pytest 7.1.1 pypi_0 pypi pytest-mpi 0.6 pypi_0 pypi python 3.8.12 h12debd9_0 readline 8.1.2 h7f8727e_1 setuptools 58.0.4 py38h06a4308_0 sqlite 3.38.0 hc218d9a_0 sympy 1.10.1 pypi_0 pypi tk 8.6.11 h1ccaba5_0 tomli 2.0.1 pypi_0 pypi wheel 0.37.1 pyhd3eb1b0_0 xz 5.2.5 h7b6447c_0 zlib 1.2.11 h7f8727e_4 ```
This is using the `apt` environment ```bash (hymd) root@bfca519f2696:/tmp/hymd# apt list --installed Listing... Done adduser/focal,now 3.118ubuntu2 all [installed] apt/focal-updates,now 2.0.6 amd64 [installed] autoconf/focal,now 2.69-11.1 all [installed,automatic] automake/focal,now 1:1.16.1-4ubuntu6 all [installed,automatic] autotools-dev/focal,now 20180224.1 all [installed,automatic] base-files/now 11ubuntu5.4 amd64 [installed,upgradable to: 11ubuntu5.5] base-passwd/focal,now 3.5.47 amd64 [installed] bash/focal-updates,now 5.0-6ubuntu1.1 amd64 [installed] binutils-common/focal-updates,focal-security,now 2.34-6ubuntu1.3 amd64 [installed,automatic] binutils-x86-64-linux-gnu/focal-updates,focal-security,now 2.34-6ubuntu1.3 amd64 [installed,automatic] binutils/focal-updates,focal-security,now 2.34-6ubuntu1.3 amd64 [installed,automatic] bsdutils/now 1:2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 1:2.34-0.1ubuntu9.3] build-essential/focal-updates,now 12.8ubuntu1.1 amd64 [installed,automatic] bzip2/focal,now 1.0.8-2 amd64 [installed] ca-certificates/focal-updates,focal-security,now 20210119~20.04.2 all [installed,automatic] coreutils/focal,now 8.30-3ubuntu2 amd64 [installed] cpp-8/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] cpp-9/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] cpp/focal,now 4:9.3.0-1ubuntu2 amd64 [installed,automatic] curl/focal-updates,focal-security,now 7.68.0-1ubuntu2.7 amd64 [installed] dash/focal,now 0.5.10.2-6 amd64 [installed] debconf/focal,now 1.5.73 all [installed] debianutils/focal,now 4.9.1 amd64 [installed] diffutils/focal,now 1:3.7-3 amd64 [installed] dirmngr/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] dpkg-dev/focal,now 1.19.7ubuntu3 all [installed,automatic] dpkg/focal,now 1.19.7ubuntu3 amd64 [installed] e2fsprogs/focal,now 1.45.5-2ubuntu1 amd64 [installed] fakeroot/focal,now 1.24-1 amd64 [installed,automatic] fdisk/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] file/focal,now 1:5.38-4 amd64 [installed,automatic] findutils/focal,now 4.7.0-1ubuntu1 amd64 [installed] g++-9/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] g++/focal,now 4:9.3.0-1ubuntu2 amd64 [installed,automatic] gcc-10-base/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed] gcc-8-base/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] gcc-8/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] gcc-9-base/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] gcc-9/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] gcc/focal,now 4:9.3.0-1ubuntu2 amd64 [installed,automatic] gfortran-8/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] gfortran-9/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] gfortran/focal,now 4:9.3.0-1ubuntu2 amd64 [installed,automatic] git-man/focal-updates,focal-security,now 1:2.25.1-1ubuntu3.2 all [installed,automatic] git/focal-updates,focal-security,now 1:2.25.1-1ubuntu3.2 amd64 [installed] gnupg-l10n/focal-updates,now 2.2.19-3ubuntu2.1 all [installed,automatic] gnupg-utils/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gnupg/focal-updates,now 2.2.19-3ubuntu2.1 all [installed,automatic] gpg-agent/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gpg-wks-client/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gpg-wks-server/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gpg/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gpgconf/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gpgsm/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed,automatic] gpgv/focal-updates,now 2.2.19-3ubuntu2.1 amd64 [installed] grep/focal,now 3.4-1 amd64 [installed] gzip/focal,now 1.10-0ubuntu4 amd64 [installed] hostname/focal,now 3.23 amd64 [installed] ibverbs-providers/focal,now 28.0-1ubuntu1 amd64 [installed,automatic] init-system-helpers/focal,now 1.57 all [installed] krb5-locales/focal-updates,focal-security,now 1.17-6ubuntu4.1 all [installed,automatic] less/focal-updates,now 551-1ubuntu0.1 amd64 [installed,automatic] libacl1/focal,now 2.2.53-6 amd64 [installed] libaec-dev/focal,now 1.0.4-1 amd64 [installed,automatic] libaec0/focal,now 1.0.4-1 amd64 [installed,automatic] libalgorithm-diff-perl/focal,now 1.19.03-2 all [installed,automatic] libalgorithm-diff-xs-perl/focal,now 0.04-6 amd64 [installed,automatic] libalgorithm-merge-perl/focal,now 0.08-3 all [installed,automatic] libapt-pkg6.0/focal-updates,now 2.0.6 amd64 [installed] libasan5/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] libasn1-8-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libassuan0/focal,now 2.5.3-7ubuntu2 amd64 [installed,automatic] libatomic1/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libattr1/focal,now 1:2.4.48-5 amd64 [installed] libaudit-common/focal,now 1:2.8.5-2ubuntu6 all [installed] libaudit1/focal,now 1:2.8.5-2ubuntu6 amd64 [installed] libbinutils/focal-updates,focal-security,now 2.34-6ubuntu1.3 amd64 [installed,automatic] libblkid1/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] libbrotli1/focal-updates,focal-security,now 1.0.7-6ubuntu0.1 amd64 [installed,automatic] libbsd0/focal,now 0.10.0-1 amd64 [installed,automatic] libbz2-1.0/focal,now 1.0.8-2 amd64 [installed] libc-bin/now 2.31-0ubuntu9.2 amd64 [installed,upgradable to: 2.31-0ubuntu9.7] libc-dev-bin/focal-updates,focal-security,now 2.31-0ubuntu9.7 amd64 [installed,automatic] libc6-dev/focal-updates,focal-security,now 2.31-0ubuntu9.7 amd64 [installed,automatic] libc6/focal-updates,focal-security,now 2.31-0ubuntu9.7 amd64 [installed] libcaf-openmpi-3/focal,now 2.8.0-1 amd64 [installed,automatic] libcap-ng0/focal,now 0.7.9-2.1build1 amd64 [installed] libcbor0.6/focal,now 0.6.0-0ubuntu1 amd64 [installed,automatic] libcc1-0/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libcoarrays-dev/focal,now 2.8.0-1 amd64 [installed,automatic] libcoarrays-openmpi-dev/focal,now 2.8.0-1 amd64 [installed,automatic] libcom-err2/focal,now 1.45.5-2ubuntu1 amd64 [installed] libcrypt-dev/focal,now 1:4.4.10-10ubuntu4 amd64 [installed,automatic] libcrypt1/focal,now 1:4.4.10-10ubuntu4 amd64 [installed] libctf-nobfd0/focal-updates,focal-security,now 2.34-6ubuntu1.3 amd64 [installed,automatic] libctf0/focal-updates,focal-security,now 2.34-6ubuntu1.3 amd64 [installed,automatic] libcurl3-gnutls/focal-updates,focal-security,now 7.68.0-1ubuntu2.7 amd64 [installed,automatic] libcurl4/focal-updates,focal-security,now 7.68.0-1ubuntu2.7 amd64 [installed,automatic] libdb5.3/focal,now 5.3.28+dfsg1-0.6ubuntu2 amd64 [installed] libdebconfclient0/focal,now 0.251ubuntu1 amd64 [installed] libdpkg-perl/focal,now 1.19.7ubuntu3 all [installed,automatic] libedit2/focal,now 3.1-20191231-1 amd64 [installed,automatic] liberror-perl/focal,now 0.17029-1 all [installed,automatic] libevent-2.1-7/focal,now 2.1.11-stable-1 amd64 [installed,automatic] libevent-core-2.1-7/focal,now 2.1.11-stable-1 amd64 [installed,automatic] libevent-dev/focal,now 2.1.11-stable-1 amd64 [installed,automatic] libevent-extra-2.1-7/focal,now 2.1.11-stable-1 amd64 [installed,automatic] libevent-openssl-2.1-7/focal,now 2.1.11-stable-1 amd64 [installed,automatic] libevent-pthreads-2.1-7/focal,now 2.1.11-stable-1 amd64 [installed,automatic] libexpat1-dev/focal-updates,focal-security,now 2.2.9-1ubuntu0.4 amd64 [installed,automatic] libexpat1/focal-updates,focal-security,now 2.2.9-1ubuntu0.4 amd64 [installed,automatic] libext2fs2/focal,now 1.45.5-2ubuntu1 amd64 [installed] libfabric1/focal,now 1.6.2-3 amd64 [installed,automatic] libfakeroot/focal,now 1.24-1 amd64 [installed,automatic] libfdisk1/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] libffi7/focal,now 3.3-4 amd64 [installed] libfido2-1/focal,now 1.3.1-1ubuntu2 amd64 [installed,automatic] libfile-fcntllock-perl/focal,now 0.22-3build4 amd64 [installed,automatic] libgcc-8-dev/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] libgcc-9-dev/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] libgcc-s1/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed] libgcrypt20/focal-updates,focal-security,now 1.8.5-5ubuntu1.1 amd64 [installed] libgdbm-compat4/focal,now 1.18.1-5 amd64 [installed,automatic] libgdbm6/focal,now 1.18.1-5 amd64 [installed,automatic] libgfortran-8-dev/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] libgfortran-9-dev/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] libgfortran5/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libglib2.0-0/focal-updates,now 2.64.6-1~ubuntu20.04.4 amd64 [installed,automatic] libglib2.0-data/focal-updates,now 2.64.6-1~ubuntu20.04.4 all [installed,automatic] libgmp10/focal,now 2:6.2.0+dfsg-4 amd64 [installed] libgnutls30/focal-updates,focal-security,now 3.6.13-2ubuntu1.6 amd64 [installed] libgomp1/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libgpg-error0/focal,now 1.37-1 amd64 [installed] libgssapi-krb5-2/focal-updates,focal-security,now 1.17-6ubuntu4.1 amd64 [installed,automatic] libgssapi3-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libhcrypto4-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libhdf5-openmpi-103/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic] libhdf5-openmpi-dev/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed] libheimbase1-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libheimntlm0-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libhogweed5/focal-updates,focal-security,now 3.5.1+really3.5.1-2ubuntu0.2 amd64 [installed] libhwloc-dev/focal,now 2.1.0+dfsg-4 amd64 [installed,automatic] libhwloc-plugins/focal,now 2.1.0+dfsg-4 amd64 [installed,automatic] libhwloc15/focal,now 2.1.0+dfsg-4 amd64 [installed,automatic] libhx509-5-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libibverbs-dev/focal,now 28.0-1ubuntu1 amd64 [installed,automatic] libibverbs1/focal,now 28.0-1ubuntu1 amd64 [installed,automatic] libicu66/focal-updates,focal-security,now 66.1-2ubuntu2.1 amd64 [installed,automatic] libidn2-0/focal,now 2.2.0-2 amd64 [installed] libisl22/focal,now 0.22.1-1 amd64 [installed,automatic] libitm1/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libjpeg-dev/focal,now 8c-2ubuntu8 amd64 [installed,automatic] libjpeg-turbo8-dev/focal-updates,focal-security,now 2.0.3-0ubuntu1.20.04.1 amd64 [installed,automatic] libjpeg-turbo8/focal-updates,focal-security,now 2.0.3-0ubuntu1.20.04.1 amd64 [installed,automatic] libjpeg8-dev/focal,now 8c-2ubuntu8 amd64 [installed,automatic] libjpeg8/focal,now 8c-2ubuntu8 amd64 [installed,automatic] libk5crypto3/focal-updates,focal-security,now 1.17-6ubuntu4.1 amd64 [installed,automatic] libkeyutils1/focal,now 1.6-6ubuntu1 amd64 [installed,automatic] libkrb5-26-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libkrb5-3/focal-updates,focal-security,now 1.17-6ubuntu4.1 amd64 [installed,automatic] libkrb5support0/focal-updates,focal-security,now 1.17-6ubuntu4.1 amd64 [installed,automatic] libksba8/focal,now 1.3.5-2 amd64 [installed,automatic] libldap-2.4-2/focal-updates,now 2.4.49+dfsg-2ubuntu1.8 amd64 [installed,automatic] libldap-common/focal-updates,now 2.4.49+dfsg-2ubuntu1.8 all [installed,automatic] liblocale-gettext-perl/focal,now 1.07-4 amd64 [installed,automatic] liblsan0/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libltdl-dev/focal,now 2.4.6-14 amd64 [installed,automatic] libltdl7/focal,now 2.4.6-14 amd64 [installed,automatic] liblz4-1/focal-updates,focal-security,now 1.9.2-2ubuntu0.20.04.1 amd64 [installed] liblzma5/focal-updates,now 5.2.4-1ubuntu1 amd64 [installed] libmagic-mgc/focal,now 1:5.38-4 amd64 [installed,automatic] libmagic1/focal,now 1:5.38-4 amd64 [installed,automatic] libmount1/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] libmpc3/focal,now 1.1.0-1 amd64 [installed,automatic] libmpdec2/focal,now 2.4.2-3 amd64 [installed,automatic] libmpfr6/focal,now 4.0.2-1 amd64 [installed,automatic] libmpx2/focal,now 8.4.0-3ubuntu2 amd64 [installed,automatic] libncurses6/focal,now 6.2-0ubuntu2 amd64 [installed] libncursesw6/focal,now 6.2-0ubuntu2 amd64 [installed] libnettle7/focal-updates,focal-security,now 3.5.1+really3.5.1-2ubuntu0.2 amd64 [installed] libnghttp2-14/focal,now 1.40.0-1build1 amd64 [installed,automatic] libnl-3-200/focal,now 3.4.0-1 amd64 [installed,automatic] libnl-3-dev/focal,now 3.4.0-1 amd64 [installed,automatic] libnl-route-3-200/focal,now 3.4.0-1 amd64 [installed,automatic] libnl-route-3-dev/focal,now 3.4.0-1 amd64 [installed,automatic] libnpth0/focal,now 1.6-1 amd64 [installed,automatic] libnuma-dev/focal,now 2.0.12-1 amd64 [installed,automatic] libnuma1/focal,now 2.0.12-1 amd64 [installed,automatic] libopenmpi-dev/focal,now 4.0.3-0ubuntu1 amd64 [installed] libopenmpi3/focal,now 4.0.3-0ubuntu1 amd64 [installed,automatic] libp11-kit0/focal-updates,focal-security,now 0.23.20-1ubuntu0.1 amd64 [installed] libpam-modules-bin/focal-updates,now 1.3.1-5ubuntu4.3 amd64 [installed] libpam-modules/focal-updates,now 1.3.1-5ubuntu4.3 amd64 [installed] libpam-runtime/focal-updates,now 1.3.1-5ubuntu4.3 all [installed] libpam0g/focal-updates,now 1.3.1-5ubuntu4.3 amd64 [installed] libpciaccess0/focal,now 0.16-0ubuntu1 amd64 [installed,automatic] libpcre2-8-0/focal,now 10.34-7 amd64 [installed] libpcre3/focal,now 2:8.39-12build1 amd64 [installed] libperl5.30/focal-updates,focal-security,now 5.30.0-9ubuntu0.2 amd64 [installed,automatic] libpmix2/focal,now 3.1.5-1 amd64 [installed,automatic] libprocps8/focal-updates,now 2:3.3.16-1ubuntu2.3 amd64 [installed] libpsl5/focal,now 0.21.0-1ubuntu1 amd64 [installed,automatic] libpsm-infinipath1/focal,now 3.3+20.604758e7-6 amd64 [installed,automatic] libpsm2-2/focal,now 11.2.86-1 amd64 [installed,automatic] libpython3-dev/focal,now 3.8.2-0ubuntu2 amd64 [installed,automatic] libpython3-stdlib/focal,now 3.8.2-0ubuntu2 amd64 [installed,automatic] libpython3.8-dev/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] libpython3.8-minimal/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] libpython3.8-stdlib/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] libpython3.8/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] libquadmath0/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] librdmacm1/focal,now 28.0-1ubuntu1 amd64 [installed,automatic] libreadline8/focal,now 8.0-4 amd64 [installed,automatic] libroken18-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] librtmp1/focal,now 2.4+20151223.gitfa8646d.1-2build1 amd64 [installed,automatic] libsasl2-2/focal-updates,focal-security,now 2.1.27+dfsg-2ubuntu0.1 amd64 [installed,automatic] libsasl2-modules-db/focal-updates,focal-security,now 2.1.27+dfsg-2ubuntu0.1 amd64 [installed,automatic] libsasl2-modules/focal-updates,focal-security,now 2.1.27+dfsg-2ubuntu0.1 amd64 [installed,automatic] libseccomp2/now 2.5.1-1ubuntu1~20.04.1 amd64 [installed,upgradable to: 2.5.1-1ubuntu1~20.04.2] libselinux1/focal,now 3.0-1build2 amd64 [installed] libsemanage-common/focal,now 3.0-1build2 all [installed] libsemanage1/focal,now 3.0-1build2 amd64 [installed] libsepol1/focal,now 3.0-1 amd64 [installed] libsigsegv2/focal,now 2.12-2 amd64 [installed,automatic] libsmartcols1/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] libsqlite3-0/focal-updates,focal-security,now 3.31.1-4ubuntu0.2 amd64 [installed,automatic] libss2/focal,now 1.45.5-2ubuntu1 amd64 [installed] libssh-4/focal-updates,focal-security,now 0.9.3-2ubuntu2.2 amd64 [installed,automatic] libssl1.1/focal-updates,focal-security,now 1.1.1f-1ubuntu2.12 amd64 [installed,automatic] libstdc++-9-dev/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 amd64 [installed,automatic] libstdc++6/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed] libsystemd0/now 245.4-4ubuntu3.13 amd64 [installed,upgradable to: 245.4-4ubuntu3.15] libsz2/focal,now 1.0.4-1 amd64 [installed,automatic] libtasn1-6/focal,now 4.16.0-2 amd64 [installed] libtinfo6/focal,now 6.2-0ubuntu2 amd64 [installed] libtool/focal,now 2.4.6-14 all [installed,automatic] libtsan0/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libubsan1/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 amd64 [installed,automatic] libudev1/now 245.4-4ubuntu3.13 amd64 [installed,upgradable to: 245.4-4ubuntu3.15] libunistring2/focal,now 0.9.10-2 amd64 [installed] libuuid1/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] libwind0-heimdal/focal,now 7.7.0+dfsg-1ubuntu1 amd64 [installed,automatic] libx11-6/focal-updates,focal-security,now 2:1.6.9-2ubuntu1.2 amd64 [installed,automatic] libx11-data/focal-updates,focal-security,now 2:1.6.9-2ubuntu1.2 all [installed,automatic] libxau6/focal,now 1:1.0.9-0ubuntu1 amd64 [installed,automatic] libxcb1/focal,now 1.14-2 amd64 [installed,automatic] libxdmcp6/focal,now 1:1.1.3-0ubuntu1 amd64 [installed,automatic] libxext6/focal,now 2:1.3.4-0ubuntu1 amd64 [installed,automatic] libxml2/focal-updates,focal-security,now 2.9.10+dfsg-5ubuntu0.20.04.2 amd64 [installed,automatic] libxmuu1/focal,now 2:1.1.3-0ubuntu1 amd64 [installed,automatic] libxnvctrl0/focal-updates,now 470.57.01-0ubuntu0.20.04.3 amd64 [installed,automatic] libzstd1/focal-updates,focal-security,now 1.4.4+dfsg-3ubuntu0.1 amd64 [installed] linux-libc-dev/focal-updates,focal-security,now 5.4.0-105.119 amd64 [installed,automatic] login/focal-updates,now 1:4.8.1-1ubuntu5.20.04.1 amd64 [installed] logsave/focal,now 1.45.5-2ubuntu1 amd64 [installed] lsb-base/focal,now 11.1.0ubuntu2 all [installed] m4/focal,now 1.4.18-4 amd64 [installed,automatic] make/focal,now 4.2.1-1.2 amd64 [installed,automatic] manpages-dev/focal,now 5.05-1 all [installed,automatic] manpages/focal,now 5.05-1 all [installed,automatic] mawk/focal,now 1.3.4.20200120-2 amd64 [installed] mime-support/focal,now 3.64ubuntu1 all [installed,automatic] mount/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] ncurses-base/focal,now 6.2-0ubuntu2 all [installed] ncurses-bin/focal,now 6.2-0ubuntu2 amd64 [installed] netbase/focal,now 6.1 all [installed,automatic] ocl-icd-libopencl1/focal,now 2.2.11-1ubuntu1 amd64 [installed,automatic] openmpi-bin/focal,now 4.0.3-0ubuntu1 amd64 [installed,automatic] openmpi-common/focal,now 4.0.3-0ubuntu1 all [installed,automatic] openssh-client/focal-updates,now 1:8.2p1-4ubuntu0.4 amd64 [installed,automatic] openssl/focal-updates,focal-security,now 1.1.1f-1ubuntu2.12 amd64 [installed,automatic] passwd/focal-updates,now 1:4.8.1-1ubuntu5.20.04.1 amd64 [installed] patch/focal,now 2.7.6-6 amd64 [installed,automatic] perl-base/focal-updates,focal-security,now 5.30.0-9ubuntu0.2 amd64 [installed] perl-modules-5.30/focal-updates,focal-security,now 5.30.0-9ubuntu0.2 all [installed,automatic] perl/focal-updates,focal-security,now 5.30.0-9ubuntu0.2 amd64 [installed,automatic] pinentry-curses/focal,now 1.1.0-3build1 amd64 [installed,automatic] pkg-config/focal,now 0.29.1-0ubuntu4 amd64 [installed] procps/focal-updates,now 2:3.3.16-1ubuntu2.3 amd64 [installed] publicsuffix/focal,now 20200303.0012-1 all [installed,automatic] python-pip-whl/focal-updates,now 20.0.2-5ubuntu1.6 all [installed,automatic] python3-dev/focal,now 3.8.2-0ubuntu2 amd64 [installed,automatic] python3-distutils/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04 all [installed,automatic] python3-lib2to3/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04 all [installed,automatic] python3-minimal/focal,now 3.8.2-0ubuntu2 amd64 [installed,automatic] python3-pip/focal-updates,now 20.0.2-5ubuntu1.6 all [installed] python3-pkg-resources/focal,now 45.2.0-1 all [installed,automatic] python3-setuptools/focal,now 45.2.0-1 all [installed,automatic] python3-wheel/focal,now 0.34.2-1 all [installed,automatic] python3.8-dev/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] python3.8-minimal/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] python3.8/focal-updates,focal-security,now 3.8.10-0ubuntu1~20.04.2 amd64 [installed,automatic] python3/focal,now 3.8.2-0ubuntu2 amd64 [installed] readline-common/focal,now 8.0-4 all [installed,automatic] sed/focal,now 4.7-1 amd64 [installed] sensible-utils/focal,now 0.0.12+nmu1 all [installed] shared-mime-info/focal,now 1.15-1 amd64 [installed,automatic] sysvinit-utils/focal,now 2.96-2.1ubuntu1 amd64 [installed] tar/now 1.30+dfsg-7ubuntu0.20.04.1 amd64 [installed,upgradable to: 1.30+dfsg-7ubuntu0.20.04.2] tzdata/focal-updates,focal-security,now 2022a-0ubuntu0.20.04 all [installed,automatic] ubuntu-keyring/focal-updates,now 2020.02.11.4 all [installed] util-linux/now 2.34-0.1ubuntu9.1 amd64 [installed,upgradable to: 2.34-0.1ubuntu9.3] wget/focal-updates,now 1.20.3-1ubuntu2 amd64 [installed] xauth/focal,now 1:1.1-0ubuntu1 amd64 [installed,automatic] xdg-user-dirs/focal,now 0.17-2ubuntu1 amd64 [installed,automatic] xz-utils/focal-updates,now 5.2.4-1ubuntu1 amd64 [installed,automatic] zlib1g-dev/focal-updates,now 1:1.2.11.dfsg-2ubuntu1.2 amd64 [installed,automatic] zlib1g/focal-updates,now 1:1.2.11.dfsg-2ubuntu1.2 amd64 [installed]```
After all, there is nothing magical about this 1e-13
number I picked out of thin air.
Running the mpi-enabled pytest script seems to pass but it skips several things:
This is expected as the pytest-mpi thing is setup to only run the specific tests tagged with
@pytest.mark.mpi()
and skip everything else.
Ok. Thanks @mortele .
I also finally got around to trying it on a different machine running Ubuntu 20.04 and it ran without error in that case using the same conda environment setup.
In the case where I get the failure I am running Ubuntu 20.04 through WSL2 on Windows 11, so maybe there is something particular to that platform (maybe in the WSL2 layer?) that leads to a difference in the floating point precision.
Anyways, I think you can probably go ahead and close this issue.
Hi,
This issue is part of the JOSS Review at https://github.com/openjournals/joss-reviews/issues/4149
When I run the standard automated tests with pytest I get some errors: test_distribute_input.py EEEE
When I run
pytest test_distribute_input.py
it gives more details. Here is the summary:And the recurring error at all 4 locations is this:
Did I miss something? Or should I just be running the pytest-mpi script instead?