BoxLibHelper.C 740 Bytes
Newer Older
1
2
3
// xxx(kitware)
#if VTK_MODULE_ENABLE_VTK_mpi
// if MPI is enabled, let BoxLib know that too.
4
5
6
#define BL_USE_MPI 1
#endif

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "BoxLibHelper.h"
#include <BoxLib.H>

// We need to call BoxLib::Initialize without BL_USE_MPI being set to 1 (as done
// in avtBoxLibFileFormat.C to avoid conflicts between the MPI implementation
// VisIt uses and BoxLib's serial dummy MPI implementation) as this potentially
// changes the signature of this function (different types for MPI communicator).

void BoxLibHelper::InitializeBoxLib()
{
    int dummyArgC = 1;
    char dummyArgVisit[] = "visit";
    char *dummyArgV[] = { dummyArgVisit };
    char **argv = dummyArgV; // Avoid implicit type conversion
    BoxLib::Initialize(dummyArgC, argv);
}