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