Skip to content

Commit

Permalink
Merge pull request #2479 from eisenhauer/PerfMetaData
Browse files Browse the repository at this point in the history
Add a tool for measuring isolated metadata performance in staging
  • Loading branch information
eisenhauer authored Oct 5, 2020
2 parents a8fd466 + 31a1d00 commit 89010a4
Show file tree
Hide file tree
Showing 7 changed files with 585 additions and 3 deletions.
8 changes: 7 additions & 1 deletion source/adios2/toolkit/sst/cp/cp_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ SstStream SstReaderOpen(const char *Name, SstParams Params, SMPI_Comm comm)
struct _ReaderRegisterMsg ReaderRegister;

memset(&ReaderRegister, 0, sizeof(ReaderRegister));
memset(&WriterData, 0, sizeof(WriterData));
WriterData.WriterCohortSize = -1;
ReaderRegister.WriterFile = WriterFileID;
ReaderRegister.WriterResponseCondition =
CMCondition_get(Stream->CPInfo->SharedCM->cm, rank0_to_rank0_conn);
Expand Down Expand Up @@ -549,7 +551,7 @@ SstStream SstReaderOpen(const char *Name, SstParams Params, SMPI_Comm comm)
free(pointers);

/* the response value is set in the handler */
struct _WriterResponseMsg *response = NULL;
volatile struct _WriterResponseMsg *response = NULL;
CMCondition_set_client_data(Stream->CPInfo->SharedCM->cm,
ReaderRegister.WriterResponseCondition,
&response);
Expand Down Expand Up @@ -1401,6 +1403,8 @@ extern void *SstReadRemoteMemory(SstStream Stream, int Rank, long Timestep,
size_t Offset, size_t Length, void *Buffer,
void *DP_TimestepInfo)
{
if (Stream->ConfigParams->ReaderShortCircuitReads)
return NULL;
Stream->Stats.BytesTransferred += Length;
AddToReadStats(Stream, Rank, Timestep, Length);
return Stream->DP_Interface->readRemoteMemory(
Expand Down Expand Up @@ -2124,6 +2128,8 @@ extern void SstReaderClose(SstStream Stream)
// needs no locking
extern SstStatusValue SstWaitForCompletion(SstStream Stream, void *handle)
{
if (Stream->ConfigParams->ReaderShortCircuitReads)
return SstSuccess;
if (Stream->DP_Interface->waitForCompletion(&Svcs, handle) != 1)
{
return SstFatalError;
Expand Down
6 changes: 4 additions & 2 deletions source/adios2/toolkit/sst/cp/ffs_marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,8 @@ static SstStatusValue WaitForReadRequests(SstStream Stream)
if (Result == SstSuccess)
{
Info->WriterInfo[i].Status = Full;
DecodeAndPrepareData(Stream, i);
if (!Stream->ConfigParams->ReaderShortCircuitReads)
DecodeAndPrepareData(Stream, i);
}
else
{
Expand Down Expand Up @@ -1378,7 +1379,8 @@ extern SstStatusValue SstFFSPerformGets(SstStream Stream)

if (Ret == SstSuccess)
{
FillReadRequests(Stream, Info->PendingVarRequests);
if (!Stream->ConfigParams->ReaderShortCircuitReads)
FillReadRequests(Stream, Info->PendingVarRequests);
}
else
{
Expand Down
1 change: 1 addition & 0 deletions source/adios2/toolkit/sst/sst_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ typedef struct _SstStats
MACRO(AlwaysProvideLatestTimestep, Bool, int, 0) \
MACRO(SpeculativePreloadMode, SpecPreloadMode, int, SpecPreloadAuto) \
MACRO(SpecAutoNodeThreshold, Int, int, 1) \
MACRO(ReaderShortCircuitReads, Bool, int, 0) \
MACRO(ControlModule, String, char *, NULL)

typedef enum
Expand Down
1 change: 1 addition & 0 deletions testing/adios2/performance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

add_subdirectory(manyvars)
add_subdirectory(query)
add_subdirectory(metadata)
10 changes: 10 additions & 0 deletions testing/adios2/performance/metadata/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0. See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

if(ADIOS2_HAVE_MPI)
# just for executing manually for performance studies
add_executable(PerfMetaData PerfMetaData.cpp)
target_link_libraries(PerfMetaData adios2::cxx11_mpi MPI::MPI_C)
endif()
Loading

0 comments on commit 89010a4

Please sign in to comment.