Coder Social home page Coder Social logo

Tests SIGSEGV about lambrex HOT 3 CLOSED

otbrown avatar otbrown commented on August 19, 2024
Tests SIGSEGV

from lambrex.

Comments (3)

otbrown avatar otbrown commented on August 19, 2024

Hi Rupert,

I'm not entirely surprised -- I've not tested with MPI turned on at all yet. This should work if you build AMReX with ENABLE_MPI=OFF, but it'll be useful to work out why this occurs regardless. Might provide some useful insight ahead of actually turning on MPI!

from lambrex.

otbrown avatar otbrown commented on August 19, 2024

Haven't checked yet, but this is almost certainly a consequence of the way Catch runs Test Cases. It reruns everything in TEST_CASE scope but each SECTION only once, currently amrex::Initialize and amrex::Finalize are called in TEST_CASE scope. Repeat calls to both are fine in serial but follow MPI initialization rules when MPI is included in AMReX.

Possible solutions:

  • Move Initialize and Finalize to their own sections - as long as Catch always respects the order of sections (and I'm sure it does) this should be fine.
  • Change to more traditional class based test fixtures with setup and teardown, which Catch also supports.

I'm inclined to solution 1 for its simplicity, will implement and test ASAP.

from lambrex.

otbrown avatar otbrown commented on August 19, 2024

Rupert pointed out to me that creating Initialize and Finalize sections required one TEST_CASE per executable. Luckily Catch provides a way of doing test run set-up and teardown through event listeners. Amrex (and MPI) are now initialised and finalised at the beginning and end of a test run. Will push and close.

Closed by 6599d81 and f82a0e0.

from lambrex.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.