Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ AC_DEFINE_UNQUOTED([MINOR_VERSION],$GENERIC_MINOR_VERSION,[Minor version])
AC_DEFINE_UNQUOTED([MICRO_VERSION],$GENERIC_MICRO_VERSION,[Micro version])


# by default CFLAGS and CXXFLAGS are set to '-g -O2' on systems that support them.
# this causes a problem if we then declare a different optimization level. So
# default them to empty, regardless of what the system supports.
: ${CFLAGS=""}
: ${CXXFLAGS=""}


dnl------------------------------
dnl Checks for compilers
Expand Down
66 changes: 54 additions & 12 deletions test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,29 @@ TESTS =

if BUILD_DBG_MODE
message_tag_unit_dbg_SOURCES = message_tag_unit.C
packed_range_unit_dbg_SOURCES = packed_range_unit.C
parallel_sync_unit_dbg_SOURCES = parallel_sync_unit.C
parallel_unit_dbg_SOURCES = parallel_unit.C
dispatch_to_packed_unit_dbg_SOURCES = dispatch_to_packed_unit.C
message_tag_unit_dbg_LDFLAGS = $(top_builddir)/src/libtimpi_dbg.la
message_tag_unit_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
message_tag_unit_dbg_CXXFLAGS = $(CXXFLAGS_DBG)

packed_range_unit_dbg_SOURCES = packed_range_unit.C
packed_range_unit_dbg_LDFLAGS = $(top_builddir)/src/libtimpi_dbg.la
packed_range_unit_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
packed_range_unit_dbg_CXXFLAGS = $(CXXFLAGS_DBG)

parallel_sync_unit_dbg_SOURCES = parallel_sync_unit.C
parallel_sync_unit_dbg_LDFLAGS = $(top_builddir)/src/libtimpi_dbg.la
parallel_sync_unit_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
parallel_sync_unit_dbg_CXXFLAGS = $(CXXFLAGS_DBG)

parallel_unit_dbg_SOURCES = parallel_unit.C
parallel_unit_dbg_LDFLAGS = $(top_builddir)/src/libtimpi_dbg.la
parallel_unit_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
parallel_unit_dbg_CXXFLAGS = $(CXXFLAGS_DBG)

dispatch_to_packed_unit_dbg_SOURCES = dispatch_to_packed_unit.C
dispatch_to_packed_unit_dbg_LDFLAGS = $(top_builddir)/src/libtimpi_dbg.la
dispatch_to_packed_unit_dbg_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
dispatch_to_packed_unit_dbg_CXXFLAGS = $(CXXFLAGS_DBG)

TESTS += message_tag_unit-dbg
TESTS += packed_range_unit-dbg
Expand All @@ -31,15 +45,29 @@ endif

if BUILD_DEVEL_MODE
message_tag_unit_devel_SOURCES = message_tag_unit.C
packed_range_unit_devel_SOURCES = packed_range_unit.C
parallel_sync_unit_devel_SOURCES = parallel_sync_unit.C
parallel_unit_devel_SOURCES = parallel_unit.C
dispatch_to_packed_unit_devel_SOURCES = dispatch_to_packed_unit.C
message_tag_unit_devel_LDFLAGS = $(top_builddir)/src/libtimpi_devel.la
message_tag_unit_devel_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
message_tag_unit_devel_CXXFLAGS = $(CXXFLAGS_DEVEL)

packed_range_unit_devel_SOURCES = packed_range_unit.C
packed_range_unit_devel_LDFLAGS = $(top_builddir)/src/libtimpi_devel.la
packed_range_unit_devel_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
packed_range_unit_devel_CXXFLAGS = $(CXXFLAGS_DEVEL)

parallel_sync_unit_devel_SOURCES = parallel_sync_unit.C
parallel_sync_unit_devel_LDFLAGS = $(top_builddir)/src/libtimpi_devel.la
parallel_sync_unit_devel_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
parallel_sync_unit_devel_CXXFLAGS = $(CXXFLAGS_DEVEL)

parallel_unit_devel_SOURCES = parallel_unit.C
parallel_unit_devel_LDFLAGS = $(top_builddir)/src/libtimpi_devel.la
parallel_unit_devel_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
parallel_unit_devel_CXXFLAGS = $(CXXFLAGS_DEVEL)

dispatch_to_packed_unit_devel_SOURCES = dispatch_to_packed_unit.C
dispatch_to_packed_unit_devel_LDFLAGS = $(top_builddir)/src/libtimpi_devel.la
dispatch_to_packed_unit_devel_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
dispatch_to_packed_unit_devel_CXXFLAGS = $(CXXFLAGS_DEVEL)

TESTS += message_tag_unit-devel
TESTS += packed_range_unit-devel
Expand All @@ -50,15 +78,29 @@ endif

if BUILD_OPT_MODE
message_tag_unit_opt_SOURCES = message_tag_unit.C
packed_range_unit_opt_SOURCES = packed_range_unit.C
parallel_sync_unit_opt_SOURCES = parallel_sync_unit.C
parallel_unit_opt_SOURCES = parallel_unit.C
dispatch_to_packed_unit_opt_SOURCES = dispatch_to_packed_unit.C
message_tag_unit_opt_LDFLAGS = $(top_builddir)/src/libtimpi_opt.la
message_tag_unit_opt_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
message_tag_unit_opt_CXXFLAGS = $(CXXFLAGS_OPT)

packed_range_unit_opt_SOURCES = packed_range_unit.C
packed_range_unit_opt_LDFLAGS = $(top_builddir)/src/libtimpi_opt.la
packed_range_unit_opt_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
packed_range_unit_opt_CXXFLAGS = $(CXXFLAGS_OPT)

parallel_sync_unit_opt_SOURCES = parallel_sync_unit.C
parallel_sync_unit_opt_LDFLAGS = $(top_builddir)/src/libtimpi_opt.la
parallel_sync_unit_opt_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
parallel_sync_unit_opt_CXXFLAGS = $(CXXFLAGS_OPT)

parallel_unit_opt_SOURCES = parallel_unit.C
parallel_unit_opt_LDFLAGS = $(top_builddir)/src/libtimpi_opt.la
parallel_unit_opt_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
parallel_unit_opt_CXXFLAGS = $(CXXFLAGS_OPT)

dispatch_to_packed_unit_opt_SOURCES = dispatch_to_packed_unit.C
dispatch_to_packed_unit_opt_LDFLAGS = $(top_builddir)/src/libtimpi_opt.la
dispatch_to_packed_unit_opt_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
dispatch_to_packed_unit_opt_CXXFLAGS = $(CXXFLAGS_OPT)

TESTS += message_tag_unit-opt
TESTS += packed_range_unit-opt
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_sync_unit.C
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Communicator *TestCommWorld;
// Test the received results, for each processor id p we're in
// charge of.
std::vector<std::size_t> checked_sizes(size, 0);
for (int p=rank; p != M; p += size)
for (int p=rank; p < M; p += size)
for (int srcp=0; srcp != size; ++srcp)
{
int diffsize = std::abs(srcp-p);
Expand Down Expand Up @@ -564,4 +564,4 @@ int main(int argc, const char * const * argv)
testPushMultimapVecVecOversized();

return 0;
};
}
6 changes: 3 additions & 3 deletions test/parallel_unit.C
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,18 @@ std::vector<std::string> pt_number;
// Test Scalar scatter
{
std::vector<processor_id_type> src;
processor_id_type dest;
processor_id_type dest = 0;

if (TestCommWorld->rank() == 0)
{
src.resize(TestCommWorld->size());
for (processor_id_type i=0; i<src.size(); i++)
src[i] = i;
src[i] = i + 1;
}

TestCommWorld->scatter(src, dest);

TIMPI_UNIT_ASSERT( TestCommWorld->rank() == dest );
TIMPI_UNIT_ASSERT( TestCommWorld->rank() + 1 == dest );
}

// Test Vector Scatter (equal-sized chunks)
Expand Down