Commit 6ee1eeac authored by Sudheer Chunduri's avatar Sudheer Chunduri
Browse files

include nodeid for each rank (Cray PMI specific)

parent 51d62e47
......@@ -200,6 +200,8 @@ enum apmpi_f_mpi_global_indices
struct darshan_apmpi_perf_record
{
struct darshan_base_record base_rec;
/* nodeid is system dependent */
uint32_t nodeid;
uint64_t counters[APMPI_NUM_INDICES];
double fcounters[APMPI_F_NUM_INDICES];
double fsynccounters[APMPI_F_SYNC_NUM_INDICES];
......
......@@ -6,8 +6,6 @@
#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
/* Application id is application launcher specific - this one for ALPS*/
#define csJOBID_ENV_STR "ALPS_APP_ID"
#include "darshan-runtime-config.h"
#include <stdio.h>
......@@ -17,6 +15,9 @@
#include <assert.h>
#include <papi.h>
/* for node id - Cray PMI specific */
#include "pmi_cray_ext.h"
#include "uthash.h"
#include "darshan.h"
#include "darshan-dynamic.h"
......@@ -270,6 +271,7 @@ static void capture(struct darshan_apmpi_perf_record *rec,
{
rec->base_rec.id = rec_id;
rec->base_rec.rank = my_rank;
PMI_CNOS_Get_nid(my_rank, &rec->nodeid);
return;
}
......
......@@ -140,6 +140,7 @@ static int darshan_log_get_apmpi_rec(darshan_fd fd, void** buf_p)
else
{
prf_rec = (struct darshan_apmpi_perf_record*)buffer;
DARSHAN_BSWAP32(&(prf_rec->nodeid));
DARSHAN_BSWAP64(&(prf_rec->base_rec.id));
DARSHAN_BSWAP64(&(prf_rec->base_rec.rank));
for (i = 0; i < APMPI_NUM_INDICES; i++)
......@@ -223,7 +224,12 @@ static void darshan_log_print_apmpi_rec(void *rec, char *file_name,
else
{
prf_rec = rec;
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec->base_rec.rank, prf_rec->base_rec.id,
"nodeid", prf_rec->nodeid,
"", "", "");
for(i = 0; i < APMPI_NUM_INDICES; i++)
{
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
......@@ -339,6 +345,35 @@ static void darshan_log_print_apmpi_rec_diff(void *file_rec1, char *file_name1,
}
else
{
if(!prf_rec2)
{
printf("- ");
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec1->base_rec.rank, prf_rec1->base_rec.id,
"nodeid", prf_rec1->nodeid,
"", "", "");
}
else if (!prf_rec1)
{
printf("+ ");
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec2->base_rec.rank, prf_rec2->base_rec.id,
"nodeid", prf_rec2->nodeid,
"", "", "");
}
else if (prf_rec1->nodeid != prf_rec2->nodeid)
{
printf("- ");
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec1->base_rec.rank, prf_rec1->base_rec.id,
"nodeid", prf_rec1->nodeid,
"", "", "");
printf("+ ");
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec2->base_rec.rank, prf_rec2->base_rec.id,
"nodeid", prf_rec2->nodeid,
"", "", "");
}
int i;
for(i = 0; i < APMPI_NUM_INDICES; i++)
{
......
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