[MOAB-dev] r2291 - in MOAB/trunk: . parallel refiner
dcthomp at mcs.anl.gov
dcthomp at mcs.anl.gov
Fri Nov 28 17:06:10 CST 2008
Author: dcthomp
Date: 2008-11-28 17:06:10 -0600 (Fri, 28 Nov 2008)
New Revision: 2291
Modified:
MOAB/trunk/CMakeLists.txt
MOAB/trunk/parallel/CMakeLists.txt
MOAB/trunk/refiner/CMakeLists.txt
MOAB/trunk/refiner/test_mesh_refiner.cpp
Log:
COMP: Keep the CMake build working.
Modified: MOAB/trunk/CMakeLists.txt
===================================================================
--- MOAB/trunk/CMakeLists.txt 2008-11-26 23:36:07 UTC (rev 2290)
+++ MOAB/trunk/CMakeLists.txt 2008-11-28 23:06:10 UTC (rev 2291)
@@ -4,6 +4,8 @@
if ( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW )
endif ( COMMAND cmake_policy )
+ # Always build tests
+ enable_testing()
include( ${MOAB_SOURCE_DIR}/cmake/GetAcInitVersion.cmake )
get_ac_init_version()
@@ -130,7 +132,6 @@
MBBSPTree.cpp
MBCN.cpp
MBCartVect.cpp
- MBHandleUtils.cpp
MBMatrix3.cpp
MBCore.cpp
MBFactory.cpp
@@ -151,6 +152,7 @@
PolyElementSeq.cpp
ReadGmsh.cpp
ReadIDEAS.cpp
+ ReadSms.cpp
ReadSTL.cpp
ReadVtk.cpp
ScdElementData.cpp
@@ -310,8 +312,6 @@
# Testing
- # Always build tests
- enable_testing()
# Point to the input decks for the tests
configure_file( ${MOAB_SOURCE_DIR}/cmake/TestingConfig.h.in ${MOAB_BINARY_DIR}/testdir.h )
@@ -326,12 +326,6 @@
COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
add_test( TestTypeSequenceManager ${EXECUTABLE_OUTPUT_PATH}/seq_man_test )
- add_executable( internals_test internals_test.cpp )
- set_source_files_properties( internals_test.cpp
- COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
- target_link_libraries( internals_test MOAB )
- add_test( TestInternals ${EXECUTABLE_OUTPUT_PATH}/internals_test )
-
add_executable( homxform_test HomXform.cpp )
set_source_files_properties( HomXform.cpp
COMPILE_FLAGS "-DTEST ${MOAB_DEFINES}" )
Modified: MOAB/trunk/parallel/CMakeLists.txt
===================================================================
--- MOAB/trunk/parallel/CMakeLists.txt 2008-11-26 23:36:07 UTC (rev 2290)
+++ MOAB/trunk/parallel/CMakeLists.txt 2008-11-28 23:06:10 UTC (rev 2291)
@@ -52,10 +52,29 @@
if ( MOAB_USE_MPI AND MPI_FOUND )
add_executable ( mbparallelcomm_test mbparallelcomm_test.cpp )
target_link_libraries( mbparallelcomm_test MOAB )
- add_test( TestParallelCommunications ${EXECUTABLE_OUTPUT_PATH}/mbparallelcomm_test )
set_source_files_properties( mbparallelcomm_test.cpp
COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
+ add_test( TestParallelComm-BcastDelete
+ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
+ ${EXECUTABLE_OUTPUT_PATH}/mbparallelcomm_test ${MPIEXEC_POSTFLAGS} 0 ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
+ add_test( TestParallelComm-ReadDelete
+ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
+ ${EXECUTABLE_OUTPUT_PATH}/mbparallelcomm_test ${MPIEXEC_POSTFLAGS} -1 ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
+ add_test( TestParallelComm-ReadParallel
+ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
+ ${EXECUTABLE_OUTPUT_PATH}/mbparallelcomm_test ${MPIEXEC_POSTFLAGS} -2 ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
+ add_test( TestParallelComm-Broadcast
+ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
+ ${EXECUTABLE_OUTPUT_PATH}/mbparallelcomm_test ${MPIEXEC_POSTFLAGS} -3 ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
+ add_executable ( parallel_unit_tests parallel_unit_tests.cpp )
+ target_link_libraries( parallel_unit_tests MOAB )
+ add_test( TestParallel
+ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
+ ${EXECUTABLE_OUTPUT_PATH}/parallel_unit_tests ${MPIEXEC_POSTFLAGS} ${MOAB_SOURCE_DIR}/parallel/ptest.cub )
+ set_source_files_properties( parallel_unit_tests.cpp
+ COMPILE_FLAGS "-DIS_BUILDING_MB ${MOAB_DEFINES}" )
+
if ( MOAB_USE_HDF )
add_executable( mhdf_parallel mhdf_parallel.c )
target_link_libraries( mhdf_parallel MOAB MOABpar mhdf )
Modified: MOAB/trunk/refiner/CMakeLists.txt
===================================================================
--- MOAB/trunk/refiner/CMakeLists.txt 2008-11-26 23:36:07 UTC (rev 2290)
+++ MOAB/trunk/refiner/CMakeLists.txt 2008-11-28 23:06:10 UTC (rev 2291)
@@ -26,5 +26,8 @@
set_source_files_properties( test_mesh_refiner.cpp
COMPILE_FLAGS "-DTEST ${MOAB_DEFINES}" )
target_link_libraries( test_mesh_refiner MOAB MOABrefiner )
-add_test( TestMeshRefiner ${EXECUTABLE_OUTPUT_PATH}/test_mesh_refiner )
+add_test( TestMeshRefiner
+ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 4 ${MPIEXEC_PREFLAGS}
+ ${EXECUTABLE_OUTPUT_PATH}/test_mesh_refiner ${MPIEXEC_POSTFLAGS}
+ ${MOAB_SOURCE_DIR}/refiner/fourVolsBare.cub )
Modified: MOAB/trunk/refiner/test_mesh_refiner.cpp
===================================================================
--- MOAB/trunk/refiner/test_mesh_refiner.cpp 2008-11-26 23:36:07 UTC (rev 2290)
+++ MOAB/trunk/refiner/test_mesh_refiner.cpp 2008-11-28 23:06:10 UTC (rev 2291)
@@ -32,26 +32,28 @@
// Create the input mesh and, if -new-mesh is specified, an output mesh
const char* ifname = argc > 1 ? argv[1] : "fourVolsBare.cub";
bool input_is_output = ( argc > 2 && ! strcmp( argv[2], "-new-mesh" ) ) ? false : true;
- MBInterface* imesh = new MBCore( rank, nprocs );
- MBInterface* omesh = input_is_output ? imesh : new MBCore( rank, nprocs );
+ MBInterface* imesh = new MBCore; // ( rank, nprocs );
+ MBInterface* omesh = input_is_output ? imesh : new MBCore; // ( rank, nprocs );
#ifdef USE_MPI
// Use an MBParallelComm object to help set up the input mesh
MBParallelComm* ipcomm = new MBParallelComm( imesh );
- ReadParallel* readpar = new ReadParallel( imesh, ipcomm );
+ //ReadParallel* readpar = new ReadParallel( imesh, ipcomm );
#endif // USE_MPI
MBEntityHandle set_handle;
std::ostringstream parallel_options;
parallel_options
- << "PARALLEL=BCAST_DELETE" << ";" // NB: You can use BCAST_DELETE or READ_DELETE here.
+ << "PARALLEL=READ_DELETE" << ";" // NB: You can use BCAST_DELETE or READ_DELETE here.
+ //<< "PARALLEL=BCAST_DELETE" << ";" // NB: You can use BCAST_DELETE or READ_DELETE here.
<< "PARTITION=MATERIAL_SET" << ";"
//<< "PARTITION_DISTRIBUTE" << ";"
<< "PARTITION_VAL=" << ( rank + 1 ) << ";"
<< "PARALLEL_RESOLVE_SHARED_ENTS" << ";"
<< "CPUTIME";
#ifdef USE_MPI
- readpar->load_file( ifname, set_handle, FileOptions( parallel_options.str().c_str() ), 0, 0 );
+ //readpar->load_file( ifname, set_handle, FileOptions( parallel_options.str().c_str() ), 0, 0 );
+ imesh->load_file( ifname, set_handle, parallel_options.str().c_str() );
// Print out what we have so far, one process at a time
for ( int i = 0; i < nprocs; ++ i )
{
@@ -110,7 +112,7 @@
// Clean up
#ifdef USE_MPI
- delete readpar;
+ //delete readpar;
delete ipcomm;
#endif // USE_MPI
if ( omesh != imesh )
More information about the moab-dev
mailing list