Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost test and openmpi
From: Richard (legalize+jeeves_at_[hidden])
Date: 2014-02-19 14:01:42

[Please do not mail me a copy of your followup]

boost-users_at_[hidden] spake the secret code
<4075154.HSbG0KVyOh_at_arlin17> thusly:

>BOOST_AUTO_TEST_CASE( mpi_functionality_parenv_init )
> MPI_Init(&m_argc,&m_argv);
>BOOST_AUTO_TEST_CASE( mpi_functionality_parenv_finalize )
> MPI_Finalize();

These aren't separate test cases, they are setup/teardown for an
individual test case.

<> and
indicate that these two functions should always be paired.

Furthermore, not even MPI_Init can be called after MPI_Finalize.
Therefore, you can't call these pairs of functions once per test case
or once per fixture, you can only call them once per process.

Therefore, you probably want to write your own implementation of
main() that handles MPI_Init and MPI_Finalize before calling the test

Since you are using the shared library version of Boost.Test, see this
page for an example of how to write your own implementation of main.

"The Direct3D Graphics Pipeline" free book <>
     The Computer Graphics Museum <>
         The Terminals Wiki <>
  Legalize Adulthood! (my blog) <>

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at