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

Some parametric neutronics tests randomly failing in GA #768

Open
RemDelaporteMathurin opened this issue Mar 8, 2021 · 1 comment
Open
Labels
bug Something isn't working CI Relative to CI, testing

Comments

@RemDelaporteMathurin
Copy link

PRs #766 and #767 both experience what seems to be randomly failing tests.

See : https://github.com/ukaea/paramak/pull/766/checks?check_run_id=2048177525

This is the error message.

=================================== FAILURES ===================================
______ TestNeutronicsBallReactor.test_reactor_from_shapes_2d_mesh_tallies ______

self = <tests.test_parametric_neutronics.test_NeutronicModel.TestNeutronicsBallReactor testMethod=test_reactor_from_shapes_2d_mesh_tallies>

    def test_reactor_from_shapes_2d_mesh_tallies(self):
        """Makes a reactor from two shapes, then mades a neutronics model
        and tests the TBR simulation value"""
    
        os.system('rm *_on_2D_mesh_*.png')
    
        test_shape = paramak.RotateStraightShape(
            points=[(0, 0), (0, 20), (20, 20)],
            material_tag='mat1',
        )
        test_shape2 = paramak.RotateSplineShape(
            points=[(100, 100), (100, -100), (200, -100), (200, 100)],
            material_tag='blanket_mat',
            rotation_angle=180
        )
    
        test_reactor = paramak.Reactor([test_shape, test_shape2])
    
        neutronics_model = paramak.NeutronicsModel(
            geometry=test_reactor,
            source=self.source,
            materials={
                'mat1': 'copper',
                'blanket_mat': 'FLiNaK',  # used as O18 is not in nndc nuc data
            },
            mesh_tally_2d=['(n,Xt)', 'heating', 'flux'],
            simulation_batches=2,
            simulation_particles_per_batch=10,
        )
    
        # starts the neutronics simulation using trelis
>       neutronics_model.simulate(verbose=False, method='pymoab')

tests/test_parametric_neutronics/test_NeutronicModel.py:699: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
paramak/parametric_neutronics/neutronics_model.py:629: in simulate
    self.statepoint_filename = self.model.run(
opt/openmc/openmc/model/model.py:228: in run
    openmc.run(**kwargs)
opt/openmc/openmc/executor.py:218: in run
    _run(args, output, cwd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ['openmc'], output = False, cwd = '.'

    def _run(args, output, cwd):
        # Launch a subprocess
        p = subprocess.Popen(args, cwd=cwd, stdout=subprocess.PIPE,
                             stderr=subprocess.STDOUT, universal_newlines=True)
    
        # Capture and re-print OpenMC output in real-time
        lines = []
        while True:
            # If OpenMC is finished, break loop
            line = p.stdout.readline()
            if not line and p.poll() is not None:
                break
    
            lines.append(line)
            if output:
                # If user requested output, print to screen
                print(line, end='')
    
        # Raise an exception if return status is non-zero
        if p.returncode != 0:
>           raise subprocess.CalledProcessError(p.returncode, ' '.join(args),
                                                ''.join(lines))
E           subprocess.CalledProcessError: Command 'openmc' died with <Signals.SIGSEGV: 11>.

opt/openmc/openmc/executor.py:28: CalledProcessError
----------------------------- Captured stdout call -----------------------------
Saved file as  RotateStraightShape.stl
Saved file as  RotateSplineShape.stl
Saved file as  Graveyard.stl
----------------------------- Captured stderr call -----------------------------
rm: cannot remove 'dagmc_not_watertight.h5m': No such file or directory
rm: cannot remove 'geometry.xml': No such file or directory
_______ TestNeutronicsBallReactor.test_reactor_from_shapes_cell_tallies ________

self = <tests.test_parametric_neutronics.test_NeutronicModel.TestNeutronicsBallReactor testMethod=test_reactor_from_shapes_cell_tallies>

    def test_reactor_from_shapes_cell_tallies(self):
        """Makes a reactor from two shapes, then mades a neutronics model
        and tests the TBR simulation value"""
    
        test_shape = paramak.RotateStraightShape(
            points=[(0, 0), (0, 20), (20, 20)],
            material_tag='mat1',
        )
        test_shape2 = paramak.RotateSplineShape(
            points=[(100, 100), (100, -100), (200, -100), (200, 100)],
            material_tag='blanket_mat',
            rotation_angle=180
        )
    
        test_reactor = paramak.Reactor([test_shape, test_shape2])
    
        neutronics_model = paramak.NeutronicsModel(
            geometry=test_reactor,
            source=self.source,
            materials={
                'mat1': 'copper',
                'blanket_mat': 'FLiNaK',  # used as O18 is not in nndc nuc data
            },
            cell_tallies=['TBR', 'heating', 'flux'],
            simulation_batches=2,
            simulation_particles_per_batch=10,
        )
    
        # starts the neutronics simulation using trelis
>       neutronics_model.simulate(verbose=False, method='pymoab')

tests/test_parametric_neutronics/test_NeutronicModel.py:666: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
paramak/parametric_neutronics/neutronics_model.py:629: in simulate
    self.statepoint_filename = self.model.run(
opt/openmc/openmc/model/model.py:228: in run
    openmc.run(**kwargs)
opt/openmc/openmc/executor.py:218: in run
    _run(args, output, cwd)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ['openmc'], output = False, cwd = '.'

    def _run(args, output, cwd):
        # Launch a subprocess
        p = subprocess.Popen(args, cwd=cwd, stdout=subprocess.PIPE,
                             stderr=subprocess.STDOUT, universal_newlines=True)
    
        # Capture and re-print OpenMC output in real-time
        lines = []
        while True:
            # If OpenMC is finished, break loop
            line = p.stdout.readline()
            if not line and p.poll() is not None:
                break
    
            lines.append(line)
            if output:
                # If user requested output, print to screen
                print(line, end='')
    
        # Raise an exception if return status is non-zero
        if p.returncode != 0:
>           raise subprocess.CalledProcessError(p.returncode, ' '.join(args),
                                                ''.join(lines))
E           subprocess.CalledProcessError: Command 'openmc' died with <Signals.SIGSEGV: 11>.

opt/openmc/openmc/executor.py:28: CalledProcessError
----------------------------- Captured stdout call -----------------------------
Saved file as  RotateStraightShape.stl
Saved file as  RotateSplineShape.stl
Saved file as  Graveyard.stl
----------------------------- Captured stderr call -----------------------------
rm: cannot remove 'dagmc_not_watertight.h5m': No such file or directory
rm: cannot remove 'statepoint.2.h5': No such file or directory
rm: cannot remove 'geometry.xml': No such file or directory
=============================== warnings summary ===============================
@shimwell
Copy link
Collaborator

shimwell commented Mar 8, 2021

I have set verbose=True on the OpenMC simulation and re triggered the CI on PR #766.

I am hoping that this will provide us some more information from OpenMC

@RemDelaporteMathurin RemDelaporteMathurin added bug Something isn't working CI Relative to CI, testing labels Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Relative to CI, testing
Projects
None yet
Development

No branches or pull requests

2 participants