Commit 57905ed4 authored by Iulian Grindeanu's avatar Iulian Grindeanu Committed by vijaysm
Browse files

Use the stringify trick for gfortran to pass the mesh file directory to

the driver for automated tests.
parent 7783f06a
config/ar-lib
*.trs
*~
*.a
aclocal.m4
autom4te.cache/
bin
bin/*
*.ccm
config/config.guess
config/config.sub
config/depcomp
config.h
config.h.in
config/install-sh
config/libtool.m4
config.log
config.lt
config/compile
config/ltmain.sh
config/lt~obsolete.m4
config/ltoptions.m4
config/ltsugar.m4
config/ltversion.m4
config/missing
config.status
config/test-driver
config/MOABConfig.h.in
configure
.cproject
*.cub
cubit??.jou
.deps
.dirstamp
doc/config.tex
doc/dev.dox
doc/user/*
doc/user.dox
examples/CrystalRouterExample
examples/DeformMeshRemap
examples/DirectAccessNoHoles
examples/DirectAccessNoHolesF90
examples/DirectAccessWithHoles
examples/ErrorHandlingSimulation
examples/freem.mod
examples/GenLargeMesh
examples/GetEntities
examples/*.h5m
examples/HelloMOAB
examples/HelloParMOAB
examples/itaps/FindConnectF
examples/itaps/ListSetsNTagsCXX
examples/itaps/ListSetsNTagsF90
examples/itaps/TagIterateC
examples/itaps/TagIterateF
examples/LloydRelaxation
examples/LoadPartial
examples/point_in_elem_search
examples/PushParMeshIntoMoabF90
examples/ReadWriteTest
examples/ReduceExchangeTags
examples/SetsNTags
examples/structuredmesh
examples/StructuredMeshSimple
examples/TestErrorHandling
examples/TestErrorHandlingPar
examples/TestExodusII
examples/VisTags
history??.jou
hpctoolkit-*
*.hpcstruct
include
include/*
itaps/iBase_f.h
itaps/igeom/FBiGeom-Defs.inc
itaps/igeom/FBiGeom_protos.h
itaps/igeom/testgeom
itaps/igeom/testSmooth2
itaps/igeom/testSmoothGeom
itaps/imesh/FindAdjacencyF90
itaps/imesh/iMesh-Defs.inc
itaps/imesh/iMesh_extensions_protos.h
itaps/imesh/iMeshP_extensions_protos.h
itaps/imesh/iMeshP_protos.h
itaps/imesh/iMesh_protos.h
itaps/imesh/MOAB_iMesh_extensions_tests
itaps/imesh/MOAB_iMeshP_unit_tests
itaps/imesh/MOAB_iMesh_unit_tests
itaps/imesh/partest
itaps/imesh/ScdMeshF77
itaps/imesh/ScdMeshF90
itaps/imesh/testc_cbind
*.la
*.lai
lib
lib/*
.libs
libtool
*.lo
*.log
makefile
Makefile
*/Makefile
*/**/Makefile
*/**/Makefile.in
*/Makefile.in
Makefile.in
moab.config
MOABConfig.cmake
*.creator*
*.files
*.includes
moab.make
*.o
.project
*.rej
share/*
share/doc/moab
share/man/man1
*.so
src/FCDefs.h
src/io/mhdf/h5minfo
src/io/mhdf/h5mvalidate
src/MBCN_protos.h
src/moab/EntityHandle.hpp
src/MOAB_FCDefs.h
src/moab/stamp-h2
src/moab/stamp-h3
src/moab/Version.h
src/parallel/moab_mpi_config.h
src/parallel/stamp-h4
src/stamp-h5
stamp-h1
test/adaptive_kd_tree_tests
test/adj_moab_test
test/bsp_tree_poly_test
test/bsp_tree_test
test/CMakeLists.txt
test/coords_connect_iterate
test/cropvol_test
test/dagmc/dagmc_pointinvol_test
test/dagmc/dagmc_rayfire_test
test/dagmc/dagmc_simple_test
test/dual/dual_test
test/dual/dual.vtk
test/elem_eval_test
test/file_options_test
test/*.h5m
test/*.g
test/*.gen
test/geom_util_test
test/gttool_test
test/h5file/dump_sets
test/h5file/h5legacy
test/h5file/h5partial
test/h5file/h5portable
test/h5file/h5regression
test/h5file/h5sets_test
test/h5file/h5test
test/h5file/h5varlen
test/homxform_test
test/io/*.ccmg
test/io/ccmio_test
test/io/cub_file_test
test/io/exodus_test
test/io/*.h5m
test/io/*.g
test/io/gmsh_test
test/io/ideas_test
test/io/nastran_test
test/io/*.nc
test/io/read_cgm_basic_test
test/io/read_cgm_connectivity_test
test/io/read_cgm_facet_test
test/io/read_cgm_group_test
test/io/read_cgm_load_test
test/io/read_cgm_senses_test
test/io/read_gcrm_nc
test/io/read_mpas_nc
test/io/read_nc
test/io/read_ucd_nc
test/io/readutil_test
test/io/smf_test
test/io/stl_test
test/io/tqdcfr
test/io/vtk_test
test/io/write_nc
test/kd_tree_test
test/kd_tree_time
test/kd_tree_tool
test/lloyd_smoother_test
test/mbcn_test
test/mbfacet_test
test/mbground_test
test/mergemesh_test
test/mesh_set_test
test/moab_test
test/obb/obb_test
test/obb/obb_time
test/obb/obb_tree_tool
test/obb_test
test/oldinc/test_oldinc
test/parallel/gcrm_par
test/parallel/*.h5m
test/parallel/imeshp_test
test/parallel/mbparallelcomm_test
test/parallel/mhdf_parallel
test/parallel/mpastrvpart
test/parallel/*.nc
test/parallel/par_coupler_test
test/parallel/par_intx_sph
test/parallel/parallel_adj
test/parallel/parallel_hdf5_test
test/parallel/parallel_unit_tests
test/parallel/parallel_write_test
test/parallel/par_coupler_test
test/parallel/par_intx_sph
test/parallel/par_spatial_locator_test
test/parallel/parmerge
test/parallel/parmerge_test
test/parallel/partcheck
test/parallel/pcomm_serial
test/parallel/pcomm_unit
test/parallel/read_nc_par
test/parallel/scdpart
test/parallel/scdtest
test/parallel/structured3
test/parallel/uber_parallel_test
test/parallel/ucdtrvpart
test/parallel/*.vtk
test/parallel/write_nc_par
test/perf/adj_mem_time
test/perf/adj_time
test/perf/perf
test/perf/perftool
test/perf/point_in_elem
test/perf/runtest
test/perf/seqperf
test/perf/tstt_perf_binding
test/perf/umr_perf
test/perf/point_location/elem_eval_time
test/perf/point_location/point_location
test/perf/point_location/sploc_searching_perf
test/perf/point_location/tree_searching_perf
test/range_test
test/reorder_test
test/scdseq_test
test/scd_test_partn
test/seq_man_test
test/spatial_locator_test
test/test_boundbox
test/tag_test
test/test_adj
test/test_determinism
test/test_prog_opt
test/TestRunner.hpp
test/uref_mesh_test
test/var_len_test
test/var_len_test_no_template
test/verdict_test
test/xform_test
test/imoab_test
test/imoab_testF
tools/dagmc/dagmc_preproc
tools/dagmc/pt_vol_test
tools/dagmc/quads_to_tris
tools/dagmc/ray_fire_test
tools/dagmc/test_geom
tools/dagmc/update_coords
tools/hexmodops
tools/mbconvert
tools/mbmerge
tools/mbcoupler/*.h5m
tools/mbcoupler/*.g
tools/mbcoupler/parcoupler_test
tools/mbcoupler/tests/
tools/mbcslam/advection
tools/mbcslam/arc_intx_tests
tools/mbcslam/case1_test
tools/mbcslam/create_dp
tools/mbcslam/cslam_par_test
tools/mbcslam/diffusion
tools/mbcslam/intersect1.h5m
tools/mbcslam/intx1.vtk
tools/mbcslam/intx_imesh
tools/mbcslam/intx_in_plane_test
tools/mbcslam/intx_mpas
tools/mbcslam/intx_on_sphere_test
tools/mbcslam/IntxRllCssphere_test
tools/mbcslam/intx.vtk
tools/mbcslam/lagr.h5m
tools/mbcslam/lagrIni.h5m
tools/mbcslam/linear_advection
tools/mbcslam/linear_remap
tools/mbcslam/spectral.vtk
tools/mbcslam/spec_visu_test
tools/mbcslam/spherical_area_test
tools/mbcslam/polyWithEdges.vtk
tools/mbcslam/proj1
tools/mbdepth
tools/mbgsets
tools/mbmem
tools/mbpart
tools/mbquality
tools/mbsize
tools/mbskin
tools/mbsurfplot
tools/mbtagprop
tools/mbzoltan/Config.moab
tools/refiner/test_mesh_refiner
tools/spheredecomp
tools/vtkMOABReader/CMakeLists.txt
tools/vtkMOABReaderNew/CMakeLists.txt
tools/vtkMOABReaderNew/CMakeCache.txt
tools/vtkMOABReaderNew/CMakeFiles/*
tools/vtkMOABReaderNew/cmake_install.cmake
tools/vtkMOABReaderNew/vtkMoabReaderPlugin.qrc
tools/vtkMOABReaderNew/vtkMoabReaderPluginInit.cxx
tools/vtkMOABReaderNew/vtkMoabReaderPlugin_Plugin.cxx
tools/vtkMOABReaderNew/vtkMoabReaderPlugin_Plugin.h
tools/vtkMOABReaderNew/vtkSMvtkMoabReaderPluginInstantiator.cxx
tools/vtkMOABReaderNew/vtkSMvtkMoabReaderPluginInstantiator.h
......@@ -133,7 +133,7 @@ ErrCode iMOAB_Finalize()
return MB_SUCCESS;
}
ErrCode iMOAB_RegisterApplication( iMOAB_String app_name,
ErrCode iMOAB_RegisterApplication( const iMOAB_String app_name,
#ifdef MOAB_HAVE_MPI
MPI_Comm* comm,
#endif
......@@ -171,9 +171,18 @@ ErrCode iMOAB_RegisterApplication( iMOAB_String app_name,
return 0;
}
ErrCode iMOAB_RegisterFortranApplication( iMOAB_String app_name, int* comm, iMOAB_AppID pid, int app_name_length )
ErrCode iMOAB_RegisterFortranApplication( const iMOAB_String app_name,
#ifdef MOAB_HAVE_MPI
int* comm,
#endif
iMOAB_AppID pid, int app_name_length )
{
std::string name(app_name);
if ( (int)name.length() >app_name_length )
{
std::cout << " length of string issue \n";
return 1;
}
if (appIdMap.find(name)!=appIdMap.end())
{
std::cout << " application already registered \n";
......@@ -240,7 +249,7 @@ ErrCode iMOAB_DeregisterApplication( iMOAB_AppID pid )
return 0;
}
ErrCode iMOAB_ReadHeaderInfo ( iMOAB_String filename, int* num_global_vertices, int* num_global_elements, int* num_dimension, int* num_parts, int filename_length )
ErrCode iMOAB_ReadHeaderInfo ( const iMOAB_String filename, int* num_global_vertices, int* num_global_elements, int* num_dimension, int* num_parts, int filename_length )
{
#ifdef MOAB_HAVE_HDF5
std::string filen(filename);
......@@ -348,13 +357,22 @@ ErrCode iMOAB_ReadHeaderInfo ( iMOAB_String filename, int* num_global_vertices,
return 0;
}
ErrCode iMOAB_LoadMesh( iMOAB_AppID pid, iMOAB_String filename, iMOAB_String read_options, int * num_ghost_layers, int filename_length, int read_options_length )
ErrCode iMOAB_LoadMesh( iMOAB_AppID pid, const iMOAB_String filename, const iMOAB_String read_options, int * num_ghost_layers, int filename_length, int read_options_length )
{
if ( (int)strlen(filename) > filename_length)
{
std::cout<<" filename length issue\n";
return 1;
}
if ( (int)strlen(read_options) > read_options_length)
{
std::cout<<" read options length issue\n";
return 1;
}
// make sure we use the file set and pcomm associated with the *pid
std::ostringstream newopts;
#ifdef MOAB_HAVE_MPI
newopts << read_options;
#ifdef MOAB_HAVE_MPI
newopts << ";PARALLEL_COMM="<<*pid;
if (*num_ghost_layers>=1)
{
......@@ -390,6 +408,16 @@ ErrCode iMOAB_LoadMesh( iMOAB_AppID pid, iMOAB_String filename, iMOAB_String rea
ErrCode iMOAB_WriteMesh( iMOAB_AppID pid, iMOAB_String filename, iMOAB_String write_options, int filename_length, int write_options_length )
{
// maybe do some processing of strings and lengths
if ( (int) strlen(filename) > filename_length)
{
std::cout << " file name length issue\n";
return 1;
}
if ( (int) strlen(write_options) > write_options_length)
{
std::cout << " write options issue\n";
return 1;
}
// maybe do some options processing?
ErrorCode rval = MBI->write_file(filename,0, write_options, &appDatas[*pid].file_set, 1);
if (MB_SUCCESS!=rval)
......@@ -894,7 +922,7 @@ ErrCode iMOAB_GetPointerToVertexBC(iMOAB_AppID pid, int * vertex_BC_length,
return 0;
}
ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int* tag_type, int* components_per_entity, int *tag_index, int tag_storage_name_length)
ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int* tag_type, int* components_per_entity, int *tag_index, int tag_storage_name_length)
{
// see if the tag is already existing, and if yes, check the type, length
if (*tag_type <0 || *tag_type>5)
......@@ -957,7 +985,7 @@ ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, i
return 1; // some error, maybe the tag was not created
}
ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name,
ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name,
int * num_tag_storage_length, int * ent_type, int* tag_storage_data,
int tag_storage_name_length)
{
......@@ -1000,7 +1028,7 @@ ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name,
return 0; // no error
}
ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int *num_tag_storage_length, int * ent_type, int* tag_storage_data, int tag_storage_name_length)
ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *num_tag_storage_length, int * ent_type, int* tag_storage_data, int tag_storage_name_length)
{
std::string tag_name(tag_storage_name);
if (tag_storage_name_length< (int)tag_name.length())
......@@ -1043,7 +1071,7 @@ ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, i
return 0; // no error
}
ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * ent_type, double* tag_storage_data, int tag_storage_name_length)
ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int * num_tag_storage_length, int * ent_type, double* tag_storage_data, int tag_storage_name_length)
{
// exactly the same code as for int tag :) maybe should check the type of tag too
std::string tag_name(tag_storage_name);
......@@ -1088,7 +1116,7 @@ ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name
return 0; // no error
}
ErrCode iMOAB_GetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * ent_type, double* tag_storage_data, int tag_storage_name_length)
ErrCode iMOAB_GetDoubleTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int * num_tag_storage_length, int * ent_type, double* tag_storage_data, int tag_storage_name_length)
{
// exactly the same code, except tag type check
std::string tag_name(tag_storage_name);
......
......@@ -97,7 +97,7 @@ ErrCode iMOAB_Finalize();
\param[in] comm (MPI_Comm*) MPI communicator to be used for all mesh-related queries originating from this application
\param[out] pid (iMOAB_AppID) The unique pointer to the application ID
*/
ErrCode iMOAB_RegisterApplication( iMOAB_String app_name,
ErrCode iMOAB_RegisterApplication( const iMOAB_String app_name,
#ifdef MOAB_HAVE_MPI
MPI_Comm* comm,
#endif
......@@ -117,7 +117,11 @@ ErrCode iMOAB_RegisterApplication( iMOAB_String app_name,
\param[out] pid (iMOAB_AppID) The unique pointer to the application ID
\param[in] app_name_length (int) Length of application name string.
*/
ErrCode iMOAB_RegisterFortranApplication( iMOAB_String app_name, int* comm, iMOAB_AppID pid, int app_name_length );
ErrCode iMOAB_RegisterFortranApplication( const iMOAB_String app_name,
#ifdef MOAB_HAVE_MPI
int* comm,
#endif
iMOAB_AppID pid, int app_name_length );
/**
\brief De-Register application: delete mesh (set) associated with the application ID.
......@@ -146,7 +150,7 @@ ErrCode iMOAB_DeregisterApplication( iMOAB_AppID pid );
\param[out] num_parts (int*) The total number of partitions available in the mesh file, typically partitioned with mbpart during pre-processing
\param[in] filename_length (int) Length of the file name string
*/
ErrCode iMOAB_ReadHeaderInfo ( iMOAB_String filename, int* num_global_vertices, int* num_global_elements, int* num_dimension, int* num_parts, int filename_length );
ErrCode iMOAB_ReadHeaderInfo ( const iMOAB_String filename, int* num_global_vertices, int* num_global_elements, int* num_dimension, int* num_parts, int filename_length );
/**
\brief Load a MOAB mesh file in parallel and exchange ghost layers as requested.
......@@ -171,7 +175,7 @@ ErrCode iMOAB_ReadHeaderInfo ( iMOAB_String filename, int* num_global_vertices,
\param[in] filename_length (int) Length of the filename string
\param[in] read_options_length (int) Length of the read options string
*/
ErrCode iMOAB_LoadMesh( iMOAB_AppID pid, iMOAB_String filename, iMOAB_String read_options, int * num_ghost_layers, int filename_length, int read_options_length );
ErrCode iMOAB_LoadMesh( iMOAB_AppID pid, const iMOAB_String filename, const iMOAB_String read_options, int * num_ghost_layers, int filename_length, int read_options_length );
/**
\brief Write a MOAB mesh along with the solution tags to a file.
......@@ -410,7 +414,7 @@ ErrCode iMOAB_GetPointerToVertexBC(iMOAB_AppID pid, int * vertex_BC_length, iMOA
\param[out] tag_index (int*) The tag index which can be used as identifier in synchronize methods
\param[in] tag_storage_name_length (int) The length of the tag_storage_name string
*/
ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int* tag_type, int* components_per_entity, int * tag_index, int tag_storage_name_length);
ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int* tag_type, int* components_per_entity, int * tag_index, int tag_storage_name_length);
/**
\brief Store the specified values in a MOAB integer Tag.
......@@ -428,7 +432,7 @@ ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, i
\param[out] tag_storage_data (int*) The array data of type <I>int</I> to replace the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements)
\param[in] tag_storage_name_length (iMOAB_String) The length of the tag_storage_name string
*/
ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, int* tag_storage_data, int tag_storage_name_length);
ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, int* tag_storage_data, int tag_storage_name_length);
/**
\brief Get the specified values in a MOAB integer Tag.
......@@ -442,7 +446,7 @@ ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, i
\param[out] tag_storage_data (int*) The array data of type <I>int</I> to be copied from the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements)
\param[in] tag_storage_name_length (iMOAB_String) The length of the tag_storage_name string
*/
ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int *num_tag_storage_length, int * entity_type, int* tag_storage_data, int tag_storage_name_length);
ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *num_tag_storage_length, int * entity_type, int* tag_storage_data, int tag_storage_name_length);
/**
\brief Store the specified values in a MOAB double Tag.
......@@ -456,7 +460,7 @@ ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, i
\param[out] tag_storage_data (double*) The array data of type <I>double</I> to replace the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements)
\param[in] tag_storage_name_length (iMOAB_String) The length of the tag_storage_name string
*/
ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, double* tag_storage_data, int tag_storage_name_length);
ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, double* tag_storage_data, int tag_storage_name_length);
/**
\brief Retrieve the specified values in a MOAB double Tag.
......@@ -470,7 +474,7 @@ ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name
\param[out] tag_storage_data (double*) The array data of type <I>double</I> to be copied from the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements)
\param[in] tag_storage_name_length (int) The length of the tag_storage_name string
*/
ErrCode iMOAB_GetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, double* tag_storage_data, int tag_storage_name_length);
ErrCode iMOAB_GetDoubleTagStorage(iMOAB_AppID pid, const iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, double* tag_storage_data, int tag_storage_name_length);
/**
\fn ErrCode iMOAB_SynchronizeTags(iMOAB_AppID pid, int * num_tags, int * tag_indices, int * ent_type )
......
......@@ -75,7 +75,7 @@ if HAVE_HDF5
if PARALLEL
# imoab tests
TESTS += imoab_test
TESTS += imoab_test imoab_testF
endif
endif
......@@ -87,12 +87,6 @@ check_PROGRAMS = $(TESTS) \
kd_tree_tool \
kd_tree_time
if HAVE_HDF5
if PARALLEL
check_PROGRAMS += imoab_testF
endif
endif
MOSTLYCLEANFILES = mb_write.g \
mb_write2.g \
......@@ -117,7 +111,7 @@ test_Matrix3_SOURCES = test_Matrix3.cpp
imoab_testF_SOURCES = imoab_testF.F
# -DMOAB_HAVE_MPI is added just for fortran compiling; is that wrong?
# still don't know how to "stringify" for the mesh input files
imoab_testF_FFLAGS = -DMOAB_HAVE_MPI
imoab_testF_FFLAGS = -DMOAB_HAVE_MPI -DFMDIR=\"$(MESHDIR)\" -ffixed-line-length-none
imoab_testF_LDADD = $(LDADD) $(FCLIBS)
imoab_test_SOURCES = imoab_test.cpp
verdict_test_SOURCES = verdict_test.cpp
......
......@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
char* filen = 0;
const char* filen = 0;
#define CHECKRC(rc, message) if (0!=rc) { printf ("%s", message); return 1;}
#define STRINGIFY_(X) #X
......@@ -81,9 +81,9 @@ int main(int argc, char * argv[])
pid);
CHECKRC(rc, "failed to register application");
#ifdef MOAB_HAVE_MPI
char *read_opts="PARALLEL=READ_PART;PARTITION=PARALLEL_PARTITION;PARALLEL_RESOLVE_SHARED_ENTS";
const char *read_opts="PARALLEL=READ_PART;PARTITION=PARALLEL_PARTITION;PARALLEL_RESOLVE_SHARED_ENTS";
#else
char *read_opts="";
const char *read_opts="";
#endif
int num_ghost_layers=1;
......
......@@ -18,7 +18,7 @@ C include '/home/iulian/3rdparty/mpich-3.1/install/include/mpif.h'
integer ierr, num_procs, my_id
integer pid
character*10 appname
character*132 filename
character*132 filename, tmpfile
character*150 readopts
integer ngv, nge, ndim, nparts
integer nghlay
......@@ -55,6 +55,7 @@ C indices for surface BC element, reference surf BC, value
character*100 outfile, wopts
my_id = 0
#ifdef MOAB_HAVE_MPI
call MPI_INIT ( ierr )
call errorout(ierr, 'fail to initialize MPI')
......@@ -81,12 +82,13 @@ c find out MY process ID, and how many processes were started.
ierr = iMOAB_RegisterFortranApplication(appname, MPI_COMM_WORLD,
& pid)
#else
ierr = iMOAB_RegisterFortranApplication(appname, my_id,
ierr = iMOAB_RegisterFortranApplication(appname,
& pid)
#endif
call errorout(ierr, 'fail to register application')
C
filename ='p8ex1.h5m'//CHAR(0)
tmpfile =FMDIR
filename = trim(tmpfile) // '/io/p8ex1.h5m' //CHAR(0)
ierr = iMOAB_ReadHeaderInfo ( filename, ngv, nge, ndim, nparts)
call errorout(ierr, 'fail to read header info')
......@@ -194,42 +196,41 @@ C printf some of the block info */
& I3, ' block ID: ' I4)
enddo
do i=1,nblocks(3)
do i=1,nblocks(3)
print *,' block index:', i, ' block ID ', IWORK(bID+i-1)
blockID = IWORK(bID+i-1)
ierr = iMOAB_GetBlockInfo(pid, blockID , vpere, nebl)
call errorout(ierr, 'failed to elem block info')
print *, ' has' , nebl, ' elements with ', vpere, 'verts'
print *,' block index:', i, ' block ID ', IWORK(bID+i-1)
blockID = IWORK(bID+i-1)
ierr = iMOAB_GetBlockInfo(pid, blockID , vpere, nebl)
call errorout(ierr, 'failed to elem block info')
print *, ' has' , nebl, ' elements with ', vpere, 'verts'
sizeconn = nebl * vpere
eCO = ifree
ierr = iMOAB_GetBlockElementConnectivities(pid, blockID,
sizeconn = nebl * vpere
eCO = ifree
ierr = iMOAB_GetBlockElementConnectivities(pid, blockID,
& sizeconn, IWORK(eCO) )
call errorout(ierr, 'failed to get block elem connectivity')
call errorout(ierr, 'failed to get block elem connectivity')
ifree = ifree + sizeconn
eOWN = ifree
ierr = iMOAB_GetElementOwnership(pid, blockID, nebl,