Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail without printing details #2186

Open
yurivict opened this issue Aug 20, 2022 · 3 comments
Open

Tests fail without printing details #2186

yurivict opened this issue Aug 20, 2022 · 3 comments

Comments

@yurivict
Copy link

===>  Testing for py39-OpenMC-0.13.1
===>   py39-OpenMC-0.13.1 depends on package: py39-pytest>=7,1 - found
===>   py39-OpenMC-0.13.1 depends on file: /usr/local/bin/python3.9 - found
cd /disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/openmc-0.13.1 && /usr/bin/env XDG_DATA_HOME=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39  XDG_CONFIG_HOME=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39  XDG_CACHE_HOME=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/.cache  HOME=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39 PATH=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer"  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer  "  MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" PYTHONPATH=/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/stage/usr/local/lib/python3.9/site-packages /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts= 
==================================================================================== test session starts =====================================================================================
platform freebsd13 -- Python 3.9.13, pytest-7.1.2, pluggy-1.0.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/openmc-0.13.1/.hypothesis/examples')
rootdir: /disk-samsung/freebsd-ports/science/py-OpenMC/work-py39/openmc-0.13.1, configfile: pytest.ini
plugins: requests-mock-1.9.3, forked-1.4.0, hypothesis-6.53.0, xdist-2.5.0
collected 678 items / 3 skipped                                                                                                                                                              

tests/regression_tests/adj_cell_rotation/test.py::test_rotation FAILED                                                                                                                 [  0%]
tests/regression_tests/asymmetric_lattice/test.py::test_asymmetric_lattice FAILED                                                                                                      [  0%]
tests/regression_tests/cmfd_feed/test.py::test_cmfd_physical_adjoint *** Error code 255

Stop.
make: stopped in /disk-samsung/freebsd-ports/science/py-OpenMC

Version: 0.13.1
Python: 3.9
FreeBSD 13.1

@pshriwise
Copy link
Contributor

Hi @yurivict. The lack of error output does indeed make problems difficult to diagnose -- including why the error isn't being printed to screen! Even the 255 error code is listed as "undefined".

One option may be to add the -s flag to the pytest command. This will print all output from the OpenMC run to the screen. Seeing how far the simulation gets before failure may help us out quite a bit.

@yurivict
Copy link
Author

With -s the printout is:

===>   py39-OpenMC-0.13.3 depends on file: /usr/local/bin/python3.9 - found
cd /usr/ports/science/py-OpenMC/work-py39/openmc-0.13.3 && /usr/bin/env XDG_DATA_HOME=/usr/ports/science/py-OpenMC/work-py39  XDG_CONFIG_HOME=/usr/ports/science/py-OpenMC/work-py39  XDG_CACHE_HOME=/usr/ports/science/py-OpenMC/work-py39/.cache  HOME=/usr/ports/science/py-OpenMC/work-py39 PATH=/usr/local/libexec/ccache:/usr/ports/science/py-OpenMC/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/usr/ports/science/py-OpenMC/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  "  MANPREFIX="/usr/local" CCACHE_DIR="/tmp/.ccache" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" PYTHONPATH=/usr/ports/science/py-OpenMC/work-py39/stage/usr/local/lib/python3.9/site-packages /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts= -s
========================================================================================== test session starts ==========================================================================================
platform freebsd13 -- Python 3.9.16, pytest-7.2.1, pluggy-1.0.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
Using --randomly-seed=1176718354
rootdir: /usr/ports/science/py-OpenMC/work-py39/openmc-0.13.3, configfile: pytest.ini
plugins: forked-1.4.0, cov-2.9.0, randomly-3.12.0, timeout-2.1.0, rerunfailures-10.1, flaky-3.7.0, xdist-2.5.0, env-0.6.2, mock-3.10.0, freezegun-0.4.2, typeguard-3.0.2
collected 782 items / 3 skipped                                                                                                                                                                         

tests/regression_tests/photon_production/test.py::test_photon_production                                 %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.3
       Date/Time | 2023-03-30 23:36:36
  OpenMP Threads | 8

 Reading model XML file './model.xml' ...
 ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.
FAILED
tests/regression_tests/dagmc/external/test.py::test_external_dagmc SKIPPED (DAGMC is not enabled.)
tests/unit_tests/test_element_wo.py::test_element_wo FAILED
tests/regression_tests/entropy/test.py::test_entropy                                 %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.3
       Date/Time | 2023-03-30 23:36:37
  OpenMP Threads | 8

 Reading settings XML file...
 ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.
FAILED
tests/unit_tests/test_endf.py::test_float_endf FAILED
tests/unit_tests/test_endf.py::test_int_endf PASSED
tests/unit_tests/test_deplete_microxs.py::test_from_array PASSED
tests/unit_tests/test_deplete_microxs.py::test_csv PASSED
tests/unit_tests/test_data_decay.py::test_nb90_spectra ERROR
tests/unit_tests/test_data_decay.py::test_decay_photon_energy PASSED
tests/unit_tests/test_data_decay.py::test_nb90_halflife ERROR
tests/unit_tests/test_data_decay.py::test_sources ERROR
tests/unit_tests/test_data_decay.py::test_fpy ERROR
tests/unit_tests/test_data_decay.py::test_nb90_nuclide ERROR
tests/unit_tests/test_data_decay.py::test_get_decay_modes PASSED
tests/unit_tests/test_data_decay.py::test_nb90_modes ERROR
tests/regression_tests/void/test.py::test_void                                 %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.3
       Date/Time | 2023-03-30 23:36:38
  OpenMP Threads | 8

 Reading model XML file './model.xml' ...
 ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.
FAILED
tests/regression_tests/energy_cutoff/test.py::test_energy_cutoff                                 %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.3
       Date/Time | 2023-03-30 23:36:38
  OpenMP Threads | 8

 Reading model XML file './model.xml' ...
 ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.
FAILED
tests/unit_tests/test_source.py::test_source PASSED
tests/unit_tests/test_source.py::test_source_dlopen PASSED
tests/unit_tests/test_source.py::test_source_xml_roundtrip PASSED
tests/unit_tests/test_source.py::test_source_file PASSED
tests/unit_tests/test_source.py::test_spherical_uniform PASSED
tests/unit_tests/test_source.py::test_rejection                                 %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.13.3
       Date/Time | 2023-03-30 23:36:38
  OpenMP Threads | 8

 Reading settings XML file...
 ERROR: No cross_sections.xml file was specified in materials.xml or in the
        OPENMC_CROSS_SECTIONS environment variable. OpenMC needs such a file to
        identify where to find data libraries. Please consult the user's guide
        at https://docs.openmc.org/ for information on how to set up data
        libraries.
*** Error code 255

@yurivict
Copy link
Author

0.15.0 still has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants