Commit e3125b83 authored by Sudheer Chunduri's avatar Sudheer Chunduri
Browse files

Merge branch 'snyder/new-darshan-api' into 'master'

update AutoPerf for new Darshan API changes

See merge request AutoPerf/autoperf!11
parents b5f510f5 6d2ddb4d
......@@ -282,9 +282,11 @@ static void apmpi_mpi_redux(
darshan_record_id *shared_recs,
int shared_rec_count);
#endif
static void apmpi_shutdown(
static void apmpi_output(
void **buffer,
int *size);
static void apmpi_cleanup(
void);
/* macros for obtaining/releasing the apmpi module lock */
#define APMPI_LOCK() pthread_mutex_lock(&apmpi_runtime_mutex)
......@@ -345,7 +347,8 @@ static void apmpi_runtime_initialize()
#ifdef HAVE_MPI
.mod_redux_func = &apmpi_mpi_redux,
#endif
.mod_shutdown_func = &apmpi_shutdown
.mod_output_func = &apmpi_output,
.mod_cleanup_func = &apmpi_cleanup
};
APMPI_LOCK();
......@@ -591,7 +594,7 @@ static void apmpi_mpi_redux(
}
//#endif
static void apmpi_shutdown(
static void apmpi_output(
void **apmpi_buf,
int *apmpi_buf_sz)
{
......@@ -602,6 +605,14 @@ static void apmpi_shutdown(
*apmpi_buf_sz += sizeof( *apmpi_runtime->header_record);
}
*apmpi_buf_sz += sizeof( *apmpi_runtime->perf_record);
APMPI_UNLOCK();
return;
}
static void apmpi_cleanup()
{
APMPI_LOCK();
assert(apmpi_runtime);
finalize_counters();
free(apmpi_runtime);
......
......@@ -82,9 +82,11 @@ static void apxc_mpi_redux(
darshan_record_id *shared_recs,
int shared_rec_count);
//#endif
static void apxc_shutdown(
static void apxc_output(
void **buffer,
int *size);
static void apxc_cleanup(
void);
/* macros for obtaining/releasing the APXC module lock */
#define APXC_LOCK() pthread_mutex_lock(&apxc_runtime_mutex)
......@@ -156,7 +158,8 @@ void apxc_runtime_initialize()
//#ifdef HAVE_MPI
.mod_redux_func = &apxc_mpi_redux,
//#endif
.mod_shutdown_func = &apxc_shutdown
.mod_output_func = &apxc_output,
.mod_cleanup_func = &apxc_cleanup
};
APXC_LOCK();
......@@ -410,7 +413,7 @@ static void apxc_mpi_redux(
}
//#endif
static void apxc_shutdown(
static void apxc_output(
void **apxc_buf,
int *apxc_buf_sz)
{
......@@ -426,10 +429,18 @@ static void apxc_shutdown(
{
*apxc_buf_sz += sizeof( *apxc_runtime->perf_record);
}
APXC_UNLOCK();
return;
}
static void apxc_cleanup()
{
APXC_LOCK();
assert(apxc_runtime);
finalize_counters();
free(apxc_runtime);
apxc_runtime = NULL;
APXC_UNLOCK();
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment