1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <cstdio>
#include <cstring>
#include "moab_mpi.h"
#include "iMeshP.h"

#define IMESH_ASSERT( ierr ) \
    if( ( ierr ) != 0 ) printf( "imesh assert\n" );
#define IMESH_NULL      0
#define STRINGIFY_( X ) #X
#define STRINGIFY( X )  STRINGIFY_( X )

int main( int argc, char* argv[] )
{
    MPI_Init( &argc, &argv );
    printf( "Hello\n" );

    iMesh_Instance imesh;
    iMeshP_PartitionHandle partn;
    int ierr, num_sets;

    iBase_EntitySetHandle root;
    imesh = IMESH_NULL;
    iMesh_newMesh( 0, &imesh, &ierr, 0 );<--- Skipping configuration 'MOAB_FC_FUNC' since the value of 'MOAB_FC_FUNC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.<--- Skipping configuration 'MOAB_FC_FUNC_' since the value of 'MOAB_FC_FUNC_' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
    IMESH_ASSERT( ierr );
    iMesh_getRootSet( imesh, &root, &ierr );<--- Skipping configuration 'MOAB_FC_FUNC' since the value of 'MOAB_FC_FUNC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.<--- Skipping configuration 'MOAB_FC_FUNC_' since the value of 'MOAB_FC_FUNC_' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
    IMESH_ASSERT( ierr );

    iMeshP_createPartitionAll( imesh, MPI_COMM_WORLD, &partn, &ierr );<--- Skipping configuration 'MOAB_FC_FUNC' since the value of 'MOAB_FC_FUNC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.<--- Skipping configuration 'MOAB_FC_FUNC_' since the value of 'MOAB_FC_FUNC_' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
    IMESH_ASSERT( ierr );

    const char options[] = " moab:PARALLEL=READ_PART "
                           " moab:PARTITION=PARALLEL_PARTITION "
                           " moab:PARALLEL_RESOLVE_SHARED_ENTS "
                           " moab:PARTITION_DISTRIBUTE ";
    const char* filename = STRINGIFY( MESHDIR ) "/64bricks_1khex.h5m";
    ;

    iMeshP_loadAll( imesh, partn, root, filename, options, &ierr, strlen( filename ), strlen( options ) );<--- Skipping configuration 'MOAB_FC_FUNC' since the value of 'MOAB_FC_FUNC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.<--- Skipping configuration 'MOAB_FC_FUNC_' since the value of 'MOAB_FC_FUNC_' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
    IMESH_ASSERT( ierr );

    iMesh_getNumEntSets( imesh, IMESH_NULL, 1, &num_sets, &ierr );<--- Skipping configuration 'MOAB_FC_FUNC' since the value of 'MOAB_FC_FUNC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.<--- Skipping configuration 'MOAB_FC_FUNC_' since the value of 'MOAB_FC_FUNC_' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
    IMESH_ASSERT( ierr );
    printf( "There's %d entity sets here\n", num_sets );

    iMesh_dtor( imesh, &ierr );<--- Skipping configuration 'MOAB_FC_FUNC' since the value of 'MOAB_FC_FUNC' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.<--- Skipping configuration 'MOAB_FC_FUNC_' since the value of 'MOAB_FC_FUNC_' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.
    IMESH_ASSERT( ierr );

    printf( "Done\n" );
    MPI_Finalize();  // probably the 4th time this is called.. no big deal
}