diff --git a/apcxi/Makefile.darshan b/apcxi/Makefile.darshan new file mode 100644 index 0000000..aeb9981 --- /dev/null +++ b/apcxi/Makefile.darshan @@ -0,0 +1,20 @@ +# +# AutoPerf Make rules for Darshan +# +DARSHAN_STATIC_MOD_OBJS += lib/darshan-apcxi.o +DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-apcxi.po + +VPATH += :$(srcdir)/../modules/autoperf/apcxi +CFLAGS += \ + -DDARSHAN_USE_APCXI \ + -I$(srcdir)/../modules/autoperf/apcxi + +CFLAGS_SHARED += \ + -DDARSHAN_USE_APCXI \ + -I$(srcdir)/../modules/autoperf/apcxi + +lib/darshan-apcxi.o: lib/darshan-apcxi.c lib/darshan-apcxi-utils.h darshan.h darshan-common.h $(DARSHAN_LOG_FORMAT) darshan-apcxi-log-format.h | lib + $(CC) $(CFLAGS) -c $< -o $@ + +lib/darshan-apcxi.po: lib/darshan-apcxi.c lib/darshan-apcxi-utils.h darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) darshan-apcxi-log-format.h | lib + $(CC) $(CFLAGS_SHARED) -c $< -o $@ diff --git a/apss/darshan-apss-log-format.h b/apcxi/darshan-apcxi-log-format.h similarity index 83% rename from apss/darshan-apss-log-format.h rename to apcxi/darshan-apcxi-log-format.h index 8e12eb2..e54c25e 100644 --- a/apss/darshan-apss-log-format.h +++ b/apcxi/darshan-apcxi-log-format.h @@ -4,13 +4,13 @@ * */ -#ifndef __APSS_LOG_FORMAT_H -#define __APSS_LOG_FORMAT_H +#ifndef __APCXI_LOG_FORMAT_H +#define __APCXI_LOG_FORMAT_H /* current AutoPerf Cray XC log format version */ -#define APSS_VER 1 +#define APCXI_VER 1 -#define APSS_MAGIC ('A'*0x100000000000000+\ +#define APCXI_MAGIC ('A'*0x100000000000000+\ 'U'*0x1000000000000+\ 'T'*0x10000000000+\ 'O'*0x100000000+\ @@ -19,7 +19,7 @@ 'R'*0x100+\ 'F'*0x1) -#define APSS_PERF_COUNTERS \ +#define APCXI_PERF_COUNTERS \ /* PAPI counters */\ X(CQ_CQ_OXE_NUM_STALLS) \ X(CQ_CQ_OXE_NUM_FLITS) \ @@ -72,21 +72,21 @@ X(HNI_TX_OK_4096_TO_8191) \ X(HNI_TX_OK_8192_TO_MAX) \ /* end of counters */\ - Z(APSS_NUM_INDICES) + Z(APCXI_NUM_INDICES) #define X(a) a, #define Z(a) a -/* integer counters for the "APSS" example module */ -enum darshan_apss_perf_indices +/* integer counters for the "APCXI" example module */ +enum darshan_apcxi_perf_indices { - APSS_PERF_COUNTERS + APCXI_PERF_COUNTERS }; #undef Z #undef X -/* the darshan_apss_router_record structure encompasses the data/counters +/* the darshan_apcxi_router_record structure encompasses the data/counters * which would actually be logged to file by Darshan for the AP HPE Slingshot * module. This example implementation logs the following data for each * record: @@ -94,7 +94,7 @@ enum darshan_apss_perf_indices * - integer I/O counters * - floating point I/O counters */ -struct darshan_apss_perf_record +struct darshan_apcxi_perf_record { struct darshan_base_record base_rec; int64_t group; @@ -102,10 +102,10 @@ struct darshan_apss_perf_record int64_t slot; int64_t blade; int64_t node; - uint64_t counters[APSS_NUM_INDICES]; + uint64_t counters[APCXI_NUM_INDICES]; }; -struct darshan_apss_header_record +struct darshan_apcxi_header_record { struct darshan_base_record base_rec; int64_t magic; @@ -116,4 +116,4 @@ struct darshan_apss_header_record uint64_t appid; }; -#endif /* __APSS_LOG_FORMAT_H */ +#endif /* __APCXI_LOG_FORMAT_H */ diff --git a/apss/lib/crusher_nodelist.h b/apcxi/lib/crusher_nodelist.h similarity index 100% rename from apss/lib/crusher_nodelist.h rename to apcxi/lib/crusher_nodelist.h diff --git a/apss/lib/darshan-apss-utils.h b/apcxi/lib/darshan-apcxi-utils.h similarity index 96% rename from apss/lib/darshan-apss-utils.h rename to apcxi/lib/darshan-apcxi-utils.h index f4bc7fd..b82394c 100644 --- a/apss/lib/darshan-apss-utils.h +++ b/apcxi/lib/darshan-apcxi-utils.h @@ -1,5 +1,5 @@ -#ifndef __APSS_UTILS_H__ -#define __APSS_UTILS_H__ +#ifndef __APCXI_UTILS_H__ +#define __APCXI_UTILS_H__ #include extern char crusher_nodelist[192][14]; diff --git a/apss/lib/darshan-apss.c b/apcxi/lib/darshan-apcxi.c similarity index 52% rename from apss/lib/darshan-apss.c rename to apcxi/lib/darshan-apcxi.c index f98bfbe..caca68b 100644 --- a/apss/lib/darshan-apss.c +++ b/apcxi/lib/darshan-apcxi.c @@ -24,9 +24,9 @@ #include "uthash.h" #include "darshan.h" #include "darshan-dynamic.h" -#include "darshan-apss-log-format.h" +#include "darshan-apcxi-log-format.h" -#include "darshan-apss-utils.h" +#include "darshan-apcxi-utils.h" #include "crusher_nodelist.h" /* @@ -36,7 +36,7 @@ #define Z(a) #a static char* PAPI_events[] = { - APSS_PERF_COUNTERS + APCXI_PERF_COUNTERS }; #undef X #undef Z @@ -57,10 +57,10 @@ static char* PAPI_events[] = /* * Global runtime struct for tracking data needed at runtime */ -struct apss_runtime +struct apcxi_runtime { - struct darshan_apss_header_record *header_record; - struct darshan_apss_perf_record *perf_record; + struct darshan_apcxi_header_record *header_record; + struct darshan_apcxi_perf_record *perf_record; darshan_record_id header_id; darshan_record_id rtr_id; int PAPI_event_set; @@ -73,32 +73,32 @@ struct apss_runtime int perf_record_marked; }; -static struct apss_runtime *apss_runtime = NULL; -static pthread_mutex_t apss_runtime_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; +static struct apcxi_runtime *apcxi_runtime = NULL; +static pthread_mutex_t apcxi_runtime_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; /* my_rank indicates the MPI rank of this process */ static int my_rank = -1; -/* internal helper functions for the APSS module */ -void apss_runtime_initialize(void); +/* internal helper functions for the APCXI module */ +void apcxi_runtime_initialize(void); /* forward declaration for shutdown function needed to interface with darshan-core */ //#ifdef HAVE_MPI -static void apss_mpi_redux( +static void apcxi_mpi_redux( void *buffer, MPI_Comm mod_comm, darshan_record_id *shared_recs, int shared_rec_count); //#endif -static void apss_output( +static void apcxi_output( void **buffer, int *size); -static void apss_cleanup( +static void apcxi_cleanup( void); -/* macros for obtaining/releasing the APSS module lock */ -#define APSS_LOCK() pthread_mutex_lock(&apss_runtime_mutex) -#define APSS_UNLOCK() pthread_mutex_unlock(&apss_runtime_mutex) +/* macros for obtaining/releasing the APCXI module lock */ +#define APCXI_LOCK() pthread_mutex_lock(&apcxi_runtime_mutex) +#define APCXI_UNLOCK() pthread_mutex_unlock(&apcxi_runtime_mutex) /* * Initialize counters using PAPI @@ -109,8 +109,8 @@ static void initialize_counters (void) int code = 0; PAPI_library_init(PAPI_VER_CURRENT); - apss_runtime->PAPI_event_set = PAPI_NULL; - PAPI_create_eventset(&apss_runtime->PAPI_event_set); + apcxi_runtime->PAPI_event_set = PAPI_NULL; + PAPI_create_eventset(&apcxi_runtime->PAPI_event_set); #if 0 /* Determine the number of NIC devices - read the number of dirs in /sys/class/cxi/ */ int num_nics = 0; @@ -130,24 +130,24 @@ static void initialize_counters (void) #endif /* start with first PAPI counter */ for (i = CQ_CQ_OXE_NUM_STALLS; - strcmp(PAPI_events[i], "APSS_NUM_INDICES") != 0; + strcmp(PAPI_events[i], "APCXI_NUM_INDICES") != 0; i++) { PAPI_event_name_to_code(PAPI_events[i], &code); - PAPI_add_event(apss_runtime->PAPI_event_set, code); + PAPI_add_event(apcxi_runtime->PAPI_event_set, code); } - apss_runtime->PAPI_event_count = i; + apcxi_runtime->PAPI_event_count = i; - PAPI_start(apss_runtime->PAPI_event_set); + PAPI_start(apcxi_runtime->PAPI_event_set); return; } static void finalize_counters (void) { - PAPI_cleanup_eventset(apss_runtime->PAPI_event_set); - PAPI_destroy_eventset(&apss_runtime->PAPI_event_set); + PAPI_cleanup_eventset(apcxi_runtime->PAPI_event_set); + PAPI_destroy_eventset(&apcxi_runtime->PAPI_event_set); PAPI_shutdown(); return; @@ -156,120 +156,120 @@ static void finalize_counters (void) /* * Function which updates all the counter data */ -static void capture(struct darshan_apss_perf_record *rec, +static void capture(struct darshan_apcxi_perf_record *rec, darshan_record_id rec_id) { - PAPI_stop(apss_runtime->PAPI_event_set, + PAPI_stop(apcxi_runtime->PAPI_event_set, (long long*) &rec->counters[CQ_CQ_OXE_NUM_STALLS]); - PAPI_reset(apss_runtime->PAPI_event_set); + PAPI_reset(apcxi_runtime->PAPI_event_set); - rec->group = apss_runtime->group; - rec->chassis = apss_runtime->chassis; - rec->slot = apss_runtime->slot; - rec->blade = apss_runtime->blade; - rec->node = apss_runtime->node; + rec->group = apcxi_runtime->group; + rec->chassis = apcxi_runtime->chassis; + rec->slot = apcxi_runtime->slot; + rec->blade = apcxi_runtime->blade; + rec->node = apcxi_runtime->node; rec->base_rec.id = rec_id; rec->base_rec.rank = my_rank; return; } -void apss_runtime_initialize() +void apcxi_runtime_initialize() { - size_t apss_buf_size; + size_t apcxi_buf_size; char rtr_rec_name[128]; darshan_module_funcs mod_funcs = { //#ifdef HAVE_MPI - .mod_redux_func = &apss_mpi_redux, + .mod_redux_func = &apcxi_mpi_redux, //#endif - .mod_output_func = &apss_output, - .mod_cleanup_func = &apss_cleanup + .mod_output_func = &apcxi_output, + .mod_cleanup_func = &apcxi_cleanup }; - APSS_LOCK(); + APCXI_LOCK(); /* don't do anything if already initialized */ - if(apss_runtime) + if(apcxi_runtime) { - APSS_UNLOCK(); + APCXI_UNLOCK(); return; } - apss_buf_size = sizeof(struct darshan_apss_header_record) + - sizeof(struct darshan_apss_perf_record); + apcxi_buf_size = sizeof(struct darshan_apcxi_header_record) + + sizeof(struct darshan_apcxi_perf_record); - /* register the APSS module with the darshan-core component */ + /* register the APCXI module with the darshan-core component */ darshan_core_register_module( - DARSHAN_APSS_MOD, + DARSHAN_APCXI_MOD, mod_funcs, - &apss_buf_size, + &apcxi_buf_size, &my_rank, NULL); /* initialize module's global state */ - apss_runtime = malloc(sizeof(*apss_runtime)); - if(!apss_runtime) + apcxi_runtime = malloc(sizeof(*apcxi_runtime)); + if(!apcxi_runtime) { - darshan_core_unregister_module(DARSHAN_APSS_MOD); - APSS_UNLOCK(); + darshan_core_unregister_module(DARSHAN_APCXI_MOD); + APCXI_UNLOCK(); return; } - memset(apss_runtime, 0, sizeof(*apss_runtime)); + memset(apcxi_runtime, 0, sizeof(*apcxi_runtime)); if (my_rank == 0) { - apss_runtime->header_id = darshan_core_gen_record_id("darshan-apss-header"); + apcxi_runtime->header_id = darshan_core_gen_record_id("darshan-apcxi-header"); - /* register the apss file record with darshan-core */ - apss_runtime->header_record = darshan_core_register_record( - apss_runtime->header_id, + /* register the apcxi file record with darshan-core */ + apcxi_runtime->header_record = darshan_core_register_record( + apcxi_runtime->header_id, //NULL, - "darshan-apss-header", - DARSHAN_APSS_MOD, - sizeof(struct darshan_apss_header_record), + "darshan-apcxi-header", + DARSHAN_APCXI_MOD, + sizeof(struct darshan_apcxi_header_record), NULL); - if(!(apss_runtime->header_record)) + if(!(apcxi_runtime->header_record)) { - darshan_core_unregister_module(DARSHAN_APSS_MOD); - free(apss_runtime); - apss_runtime = NULL; - APSS_UNLOCK(); + darshan_core_unregister_module(DARSHAN_APCXI_MOD); + free(apcxi_runtime); + apcxi_runtime = NULL; + APCXI_UNLOCK(); return; } - apss_runtime->header_record->base_rec.id = apss_runtime->header_id; - apss_runtime->header_record->base_rec.rank = my_rank; - apss_runtime->header_record->magic = APSS_MAGIC; + apcxi_runtime->header_record->base_rec.id = apcxi_runtime->header_id; + apcxi_runtime->header_record->base_rec.rank = my_rank; + apcxi_runtime->header_record->magic = APCXI_MAGIC; } - sstopo_get_mycoords(&apss_runtime->group, - &apss_runtime->chassis, - &apss_runtime->slot, - &apss_runtime->blade, - &apss_runtime->node); - sprintf(rtr_rec_name, "darshan-apss-rtr-%d-%d-%d-%d", - apss_runtime->group, apss_runtime->chassis, apss_runtime->slot, apss_runtime->blade); - //apss_runtime->rtr_id = darshan_core_gen_record_id(rtr_rec_name); - apss_runtime->rtr_id = darshan_core_gen_record_id("APSS"); - apss_runtime->perf_record = darshan_core_register_record( - apss_runtime->rtr_id, + sstopo_get_mycoords(&apcxi_runtime->group, + &apcxi_runtime->chassis, + &apcxi_runtime->slot, + &apcxi_runtime->blade, + &apcxi_runtime->node); + sprintf(rtr_rec_name, "darshan-apcxi-rtr-%d-%d-%d-%d", + apcxi_runtime->group, apcxi_runtime->chassis, apcxi_runtime->slot, apcxi_runtime->blade); + //apcxi_runtime->rtr_id = darshan_core_gen_record_id(rtr_rec_name); + apcxi_runtime->rtr_id = darshan_core_gen_record_id("APCXI"); + apcxi_runtime->perf_record = darshan_core_register_record( + apcxi_runtime->rtr_id, //NULL, - "APSS", // we want the record for each rank to be treated as shared records so that mpi_redux can operate on + "APCXI", // we want the record for each rank to be treated as shared records so that mpi_redux can operate on //rtr_rec_name, - DARSHAN_APSS_MOD, - sizeof(struct darshan_apss_perf_record), + DARSHAN_APCXI_MOD, + sizeof(struct darshan_apcxi_perf_record), NULL); - if(!(apss_runtime->perf_record)) + if(!(apcxi_runtime->perf_record)) { - darshan_core_unregister_module(DARSHAN_APSS_MOD); - free(apss_runtime); - apss_runtime = NULL; - APSS_UNLOCK(); + darshan_core_unregister_module(DARSHAN_APCXI_MOD); + free(apcxi_runtime); + apcxi_runtime = NULL; + APCXI_UNLOCK(); return; } initialize_counters(); - APSS_UNLOCK(); + APCXI_UNLOCK(); return; } @@ -278,10 +278,10 @@ void apss_runtime_initialize() * shutdown function exported by this module for coordinating with darshan-core * ********************************************************************************/ -/* Pass data for the apss module back to darshan-core to log to file. */ +/* Pass data for the apcxi module back to darshan-core to log to file. */ //#ifdef HAVE_MPI -static void apss_mpi_redux( - void *apss_buf, +static void apcxi_mpi_redux( + void *apcxi_buf, MPI_Comm mod_comm, darshan_record_id *shared_recs, int shared_rec_count) @@ -299,10 +299,10 @@ static void apss_mpi_redux( unsigned int bitsiz; MPI_Comm router_comm; - APSS_LOCK(); - if (!apss_runtime) + APCXI_LOCK(); + if (!apcxi_runtime) { - APSS_UNLOCK(); + APCXI_UNLOCK(); return; } @@ -312,11 +312,11 @@ static void apss_mpi_redux( bitvec = malloc(bitlen); /* collect perf counters */ - capture(apss_runtime->perf_record, apss_runtime->rtr_id); + capture(apcxi_runtime->perf_record, apcxi_runtime->rtr_id); if (my_rank == 0) { - apss_runtime->header_record->appid = atoi((char*)getenv( APP_ID )); + apcxi_runtime->header_record->appid = atoi((char*)getenv( APP_ID )); } #if 1 /* count network dimensions */ @@ -329,8 +329,8 @@ static void apss_mpi_redux( /* group */ memset(bitvec, 0, bitlen); - idx = apss_runtime->group / bitcnt; - bitvec[idx] |= (1 << apss_runtime->group % bitcnt); + idx = apcxi_runtime->group / bitcnt; + bitvec[idx] |= (1 << apcxi_runtime->group % bitcnt); PMPI_Reduce((my_rank ? bitvec : MPI_IN_PLACE), bitvec, bitsiz, @@ -342,7 +342,7 @@ static void apss_mpi_redux( /* chassis */ memset(bitvec, 0, bitlen); - uchassis = apss_runtime->group * 8 + apss_runtime->chassis; + uchassis = apcxi_runtime->group * 8 + apcxi_runtime->chassis; idx = uchassis / bitcnt; bitvec[idx] |= (1 << uchassis % bitcnt); PMPI_Reduce((my_rank ? bitvec : MPI_IN_PLACE), @@ -356,7 +356,7 @@ static void apss_mpi_redux( /* slot */ memset(bitvec, 0, bitlen); - uslot = uchassis * 8 + apss_runtime->slot; + uslot = uchassis * 8 + apcxi_runtime->slot; idx = uslot / bitcnt; bitvec[idx] |= (1 << uslot % bitcnt); PMPI_Reduce((my_rank ? bitvec : MPI_IN_PLACE), @@ -370,7 +370,7 @@ static void apss_mpi_redux( /* blade */ memset(bitvec, 0, bitlen); - ublade = uchassis * 8 + uslot * 8 + apss_runtime->blade; + ublade = uchassis * 8 + uslot * 8 + apcxi_runtime->blade; idx = ublade / bitcnt; bitvec[idx] |= (1 << ublade % bitcnt); PMPI_Reduce((my_rank ? bitvec : MPI_IN_PLACE), @@ -384,19 +384,19 @@ static void apss_mpi_redux( if (my_rank == 0) { - apss_runtime->header_record->nblades = router_count; - apss_runtime->header_record->nchassis = chassis_count; - apss_runtime->header_record->nslots = slot_count; - apss_runtime->header_record->ngroups = group_count; + apcxi_runtime->header_record->nblades = router_count; + apcxi_runtime->header_record->nchassis = chassis_count; + apcxi_runtime->header_record->nslots = slot_count; + apcxi_runtime->header_record->ngroups = group_count; } free(bitvec); } else { - apss_runtime->header_record->nblades = 0; - apss_runtime->header_record->nslots = 0; - apss_runtime->header_record->nchassis = 0; - apss_runtime->header_record->ngroups = 0; + apcxi_runtime->header_record->nblades = 0; + apcxi_runtime->header_record->nslots = 0; + apcxi_runtime->header_record->nchassis = 0; + apcxi_runtime->header_record->ngroups = 0; } /* @@ -406,19 +406,19 @@ static void apss_mpi_redux( * create a communicator with all the ranks that share the same node * */ - color = (apss_runtime->group << (7+3)) + \ - (apss_runtime->chassis << (3+4)) + \ - (apss_runtime->slot << (3+1)) + \ - (apss_runtime->blade << 1) + apss_runtime->node; + color = (apcxi_runtime->group << (7+3)) + \ + (apcxi_runtime->chassis << (3+4)) + \ + (apcxi_runtime->slot << (3+1)) + \ + (apcxi_runtime->blade << 1) + apcxi_runtime->node; #endif #if 1 PMPI_Comm_split(MPI_COMM_WORLD, color, my_rank, &router_comm); PMPI_Comm_rank(router_comm, &router_rank); PMPI_Comm_size(router_comm, &router_count); /* - PMPI_Reduce((router_rank?apss_runtime->perf_record->counters:MPI_IN_PLACE), - apss_runtime->perf_record->counters, - APSS_NUM_INDICES, + PMPI_Reduce((router_rank?apcxi_runtime->perf_record->counters:MPI_IN_PLACE), + apcxi_runtime->perf_record->counters, + APCXI_NUM_INDICES, MPI_LONG_LONG_INT, MPI_SUM, 0, @@ -427,49 +427,49 @@ static void apss_mpi_redux( if (router_rank == 0) { /* - for (i = 0; i < APSS_NUM_INDICES; i++) + for (i = 0; i < APCXI_NUM_INDICES; i++) { - apss_runtime->perf_record->counters[i] /= router_count; + apcxi_runtime->perf_record->counters[i] /= router_count; } */ - apss_runtime->perf_record_marked = -1; + apcxi_runtime->perf_record_marked = -1; } PMPI_Comm_free(&router_comm); #endif - APSS_UNLOCK(); + APCXI_UNLOCK(); return; } //#endif -static void apss_output( - void **apss_buf, - int *apss_buf_sz) +static void apcxi_output( + void **apcxi_buf, + int *apcxi_buf_sz) { - APSS_LOCK(); - assert(apss_runtime); - *apss_buf_sz = 0; + APCXI_LOCK(); + assert(apcxi_runtime); + *apcxi_buf_sz = 0; if (my_rank == 0) { - *apss_buf_sz += sizeof(*apss_runtime->header_record); + *apcxi_buf_sz += sizeof(*apcxi_runtime->header_record); } - if (apss_runtime->perf_record_marked == -1) + if (apcxi_runtime->perf_record_marked == -1) { - *apss_buf_sz += sizeof( *apss_runtime->perf_record); + *apcxi_buf_sz += sizeof( *apcxi_runtime->perf_record); } - APSS_UNLOCK(); + APCXI_UNLOCK(); return; } -static void apss_cleanup() +static void apcxi_cleanup() { - APSS_LOCK(); - assert(apss_runtime); + APCXI_LOCK(); + assert(apcxi_runtime); finalize_counters(); - free(apss_runtime); - apss_runtime = NULL; - APSS_UNLOCK(); + free(apcxi_runtime); + apcxi_runtime = NULL; + APCXI_UNLOCK(); return; } diff --git a/apcxi/util/Makefile.darshan b/apcxi/util/Makefile.darshan new file mode 100644 index 0000000..3953b88 --- /dev/null +++ b/apcxi/util/Makefile.darshan @@ -0,0 +1,27 @@ +# +# AutoPerf Make rules for Darshan +# + +VPATH += :$(srcdir)/../modules/autoperf/apcxi/util + +DARSHAN_MOD_LOG_FORMATS += $(srcdir)/../modules/autoperf/apcxi/darshan-apcxi-log-format.h +DARSHAN_MOD_LOGUTIL_HEADERS += darshan-apcxi-logutils.h +DARSHAN_STATIC_MOD_OBJS += darshan-apcxi-logutils.o +DARSHAN_DYNAMIC_MOD_OBJS += darshan-apcxi-logutils.po + +CFLAGS += \ + -DDARSHAN_USE_apcxi \ + -I$(srcdir)/../modules/autoperf/apcxi \ + -I$(srcdir)/../modules/autoperf/apcxi/util + +CFLAGS_SHARED += \ + -DDARSHAN_USE_apcxi \ + -I$(srcdir)/../modules/autoperf/apcxi \ + -I$(srcdir)/../modules/autoperf/apcxi/util + +darshan-apcxi-logutils.o: darshan-apcxi-logutils.c darshan-logutils.h darshan-apcxi-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../modules/autoperf/apcxi/darshan-apcxi-log-format.h | uthash-1.9.2 + $(CC) $(CFLAGS) -c $< -o $@ + +darshan-apcxi-logutils.po: darshan-apcxi-logutils.c darshan-logutils.h darshan-apcxi-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../modules/autoperf/apcxi/darshan-apcxi-log-format.h | uthash-1.9.2 + $(CC) $(CFLAGS_SHARED) -c $< -o $@ + diff --git a/apss/util/apss-analysis.py b/apcxi/util/apcxi-analysis.py similarity index 76% rename from apss/util/apss-analysis.py rename to apcxi/util/apcxi-analysis.py index 854562e..e02eda2 100755 --- a/apss/util/apss-analysis.py +++ b/apcxi/util/apcxi-analysis.py @@ -1,9 +1,9 @@ #!/usr/bin/env python -# DarshanUtils for Python for processing APSS records +# DarshanUtils for Python for processing APCXI records # This script gives an overview of features provided by the Python bindings for DarshanUtils. -# By default all APSS module records, metadata, and the name records are loaded when opening a Darshan log: +# By default all APCXI module records, metadata, and the name records are loaded when opening a Darshan log: import argparse import darshan @@ -48,19 +48,19 @@ def main(): report = darshan.DarshanReport(args.logname[0], read_all=False) report.info() - if "APSS" not in report.modules: + if "APCXI" not in report.modules: print("This log does not contain AutoPerf XC data") return - r = report.mod_read_all_apss_records("APSS") + r = report.mod_read_all_apcxi_records("APCXI") report.update_name_records() report.info() - #pdf = matplotlib.backends.backend_pdf.PdfPages("apss_output.pdf") + #pdf = matplotlib.backends.backend_pdf.PdfPages("apcxi_output.pdf") - header_rec = report.records["APSS"][0] + header_rec = report.records["APCXI"][0] - for rec in report.records["APSS"][1:]: + for rec in report.records["APCXI"][1:]: # skip the first record which is header record print(rec) diff --git a/apss/util/apss-backend.py b/apcxi/util/apcxi-backend.py similarity index 85% rename from apss/util/apss-backend.py rename to apcxi/util/apcxi-backend.py index d6dbc2f..a18bf83 100644 --- a/apss/util/apss-backend.py +++ b/apcxi/util/apcxi-backend.py @@ -4,9 +4,9 @@ import numpy as np import darshan.backend.cffi_backend -# apss structure defs +# apcxi structure defs structdefs = ''' -struct darshan_apss_perf_record +struct darshan_apcxi_perf_record { struct darshan_base_record base_rec; int64_t group; @@ -15,7 +15,7 @@ int64_t node; uint64_t counters[10]; }; -struct darshan_apss_header_record +struct darshan_apcxi_header_record { struct darshan_base_record base_rec; int64_t magic; @@ -25,16 +25,16 @@ uint64_t appid; }; -extern char *apss_counter_names[]; +extern char *apcxi_counter_names[]; ''' -def get_apss_defs(): +def get_apcxi_defs(): return structdefs # load header record -def log_get_apss_record(log, mod_name, structname, dtype='dict'): +def log_get_apcxi_record(log, mod_name, structname, dtype='dict'): from darshan.backend.cffi_backend import ffi, libdutil, log_get_modules, counter_names, _structdefs modules = log_get_modules(log) @@ -47,7 +47,7 @@ def log_get_apss_record(log, mod_name, structname, dtype='dict'): if r < 1: return None - if mod_type == 'struct darshan_apss_header_record **': + if mod_type == 'struct darshan_apcxi_header_record **': hdr = ffi.cast(mod_type, buf) rec['id'] = hdr[0].base_rec.id rec['rank'] = hdr[0].base_rec.rank diff --git a/apss/util/darshan-apss-logutils.c b/apcxi/util/darshan-apcxi-logutils.c similarity index 57% rename from apss/util/darshan-apss-logutils.c rename to apcxi/util/darshan-apcxi-logutils.c index 9f9115b..9fc80b3 100644 --- a/apss/util/darshan-apss-logutils.c +++ b/apcxi/util/darshan-apcxi-logutils.c @@ -18,62 +18,62 @@ #include #include "darshan-logutils.h" -#include "darshan-apss-log-format.h" +#include "darshan-apcxi-log-format.h" -/* counter name strings for the apss module */ +/* counter name strings for the apcxi module */ #define Y(a) #a, -#define X(a) Y(APSS_ ## a) +#define X(a) Y(APCXI_ ## a) #define Z(a) #a -char *apss_counter_names[] = { - APSS_PERF_COUNTERS +char *apcxi_counter_names[] = { + APCXI_PERF_COUNTERS }; #undef Y #undef X #undef Z -static int darshan_log_get_apss_rec(darshan_fd fd, void** buf_p); -static int darshan_log_put_apss_rec(darshan_fd fd, void* buf); -static void darshan_log_print_apss_rec(void *file_rec, +static int darshan_log_get_apcxi_rec(darshan_fd fd, void** buf_p); +static int darshan_log_put_apcxi_rec(darshan_fd fd, void* buf); +static void darshan_log_print_apcxi_rec(void *file_rec, char *file_name, char *mnt_pt, char *fs_type); -static void darshan_log_print_apss_description(int ver); -static void darshan_log_print_apss_rec_diff(void *file_rec1, char *file_name1, +static void darshan_log_print_apcxi_description(int ver); +static void darshan_log_print_apcxi_rec_diff(void *file_rec1, char *file_name1, void *file_rec2, char *file_name2); -struct darshan_mod_logutil_funcs apss_logutils = +struct darshan_mod_logutil_funcs apcxi_logutils = { - .log_get_record = &darshan_log_get_apss_rec, - .log_put_record = &darshan_log_put_apss_rec, - .log_print_record = &darshan_log_print_apss_rec, - .log_print_description = &darshan_log_print_apss_description, - .log_print_diff = &darshan_log_print_apss_rec_diff, + .log_get_record = &darshan_log_get_apcxi_rec, + .log_put_record = &darshan_log_put_apcxi_rec, + .log_print_record = &darshan_log_print_apcxi_rec, + .log_print_description = &darshan_log_print_apcxi_description, + .log_print_diff = &darshan_log_print_apcxi_rec_diff, .log_agg_records = NULL }; -static int darshan_log_get_apss_rec(darshan_fd fd, void** buf_p) +static int darshan_log_get_apcxi_rec(darshan_fd fd, void** buf_p) { - struct darshan_apss_header_record *hdr_rec; - struct darshan_apss_perf_record *prf_rec; + struct darshan_apcxi_header_record *hdr_rec; + struct darshan_apcxi_perf_record *prf_rec; int rec_len; char *buffer; int i; int ret = -1; static int first_rec = 1; - if(fd->mod_map[DARSHAN_APSS_MOD].len == 0) + if(fd->mod_map[DARSHAN_APCXI_MOD].len == 0) return(0); - if(fd->mod_ver[DARSHAN_APSS_MOD] == 0 || - fd->mod_ver[DARSHAN_APSS_MOD] > APSS_VER) + if(fd->mod_ver[DARSHAN_APCXI_MOD] == 0 || + fd->mod_ver[DARSHAN_APCXI_MOD] > APCXI_VER) { - fprintf(stderr, "Error: Invalid APSS module version number (got %d)\n", - fd->mod_ver[DARSHAN_APSS_MOD]); + fprintf(stderr, "Error: Invalid APCXI module version number (got %d)\n", + fd->mod_ver[DARSHAN_APCXI_MOD]); return(-1); } if (!*buf_p) { /* assume this is the largest possible record size */ - buffer = malloc(sizeof(struct darshan_apss_perf_record)); + buffer = malloc(sizeof(struct darshan_apcxi_perf_record)); if (!buffer) { return(-1); @@ -84,32 +84,32 @@ static int darshan_log_get_apss_rec(darshan_fd fd, void** buf_p) buffer = *buf_p; } - if (fd->mod_ver[DARSHAN_APSS_MOD] < APSS_VER) + if (fd->mod_ver[DARSHAN_APCXI_MOD] < APCXI_VER) { /* perform conversion as needed */ } /* v1, current version */ - if (fd->mod_ver[DARSHAN_APSS_MOD] == APSS_VER) + if (fd->mod_ver[DARSHAN_APCXI_MOD] == APCXI_VER) { if (first_rec) { - rec_len = sizeof(struct darshan_apss_header_record); + rec_len = sizeof(struct darshan_apcxi_header_record); first_rec = 0; } else - rec_len = sizeof(struct darshan_apss_perf_record); + rec_len = sizeof(struct darshan_apcxi_perf_record); - ret = darshan_log_get_mod(fd, DARSHAN_APSS_MOD, buffer, rec_len); + ret = darshan_log_get_mod(fd, DARSHAN_APCXI_MOD, buffer, rec_len); } if (ret == rec_len) { if(fd->swap_flag) { - if (rec_len == sizeof(struct darshan_apss_header_record)) + if (rec_len == sizeof(struct darshan_apcxi_header_record)) { - hdr_rec = (struct darshan_apss_header_record*)buffer; + hdr_rec = (struct darshan_apcxi_header_record*)buffer; /* swap bytes if necessary */ DARSHAN_BSWAP64(&(hdr_rec->base_rec.id)); DARSHAN_BSWAP64(&(hdr_rec->base_rec.rank)); @@ -122,7 +122,7 @@ static int darshan_log_get_apss_rec(darshan_fd fd, void** buf_p) } else { - prf_rec = (struct darshan_apss_perf_record*)buffer; + prf_rec = (struct darshan_apcxi_perf_record*)buffer; DARSHAN_BSWAP64(&(prf_rec->base_rec.id)); DARSHAN_BSWAP64(&(prf_rec->base_rec.rank)); DARSHAN_BSWAP64(&(prf_rec->group)); @@ -130,7 +130,7 @@ static int darshan_log_get_apss_rec(darshan_fd fd, void** buf_p) DARSHAN_BSWAP64(&(prf_rec->slot)); DARSHAN_BSWAP64(&(prf_rec->blade)); DARSHAN_BSWAP64(&(prf_rec->node)); - for (i = 0; i < APSS_NUM_INDICES; i++) + for (i = 0; i < APCXI_NUM_INDICES; i++) { DARSHAN_BSWAP64(&prf_rec->counters[i]); } @@ -155,7 +155,7 @@ static int darshan_log_get_apss_rec(darshan_fd fd, void** buf_p) } } -static int darshan_log_put_apss_rec(darshan_fd fd, void* buf) +static int darshan_log_put_apcxi_rec(darshan_fd fd, void* buf) { int ret; int rec_len; @@ -163,74 +163,74 @@ static int darshan_log_put_apss_rec(darshan_fd fd, void* buf) if (first_rec) { - rec_len = sizeof(struct darshan_apss_header_record); + rec_len = sizeof(struct darshan_apcxi_header_record); first_rec = 0; } else - rec_len = sizeof(struct darshan_apss_perf_record); + rec_len = sizeof(struct darshan_apcxi_perf_record); - ret = darshan_log_put_mod(fd, DARSHAN_APSS_MOD, buf, - rec_len, APSS_VER); + ret = darshan_log_put_mod(fd, DARSHAN_APCXI_MOD, buf, + rec_len, APCXI_VER); if(ret < 0) return(-1); return(0); } -static void darshan_log_print_apss_rec(void *rec, char *file_name, +static void darshan_log_print_apcxi_rec(void *rec, char *file_name, char *mnt_pt, char *fs_type) { int i; static int first_rec = 1; - struct darshan_apss_header_record *hdr_rec; - struct darshan_apss_perf_record *prf_rec; + struct darshan_apcxi_header_record *hdr_rec; + struct darshan_apcxi_perf_record *prf_rec; if (first_rec) { hdr_rec = rec; - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec->base_rec.rank, hdr_rec->base_rec.id, - "APSS_GROUPS", hdr_rec->ngroups, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_GROUPS", hdr_rec->ngroups, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec->base_rec.rank, hdr_rec->base_rec.id, - "APSS_CHASSIS", hdr_rec->nchassis, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_CHASSIS", hdr_rec->nchassis, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec->base_rec.rank, hdr_rec->base_rec.id, - "APSS_SLOTS", hdr_rec->nslots, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_SLOTS", hdr_rec->nslots, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec->base_rec.rank, hdr_rec->base_rec.id, - "APSS_BLADES", hdr_rec->nblades, "", "", ""); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_BLADES", hdr_rec->nblades, "", "", ""); + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec->base_rec.rank, hdr_rec->base_rec.id, - "APSS_APPLICATION_ID", hdr_rec->appid, "", "", ""); + "APCXI_APPLICATION_ID", hdr_rec->appid, "", "", ""); first_rec = 0; } else { prf_rec = rec; - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec->base_rec.rank, prf_rec->base_rec.id, - "APSS_GROUP", prf_rec->group, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_GROUP", prf_rec->group, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec->base_rec.rank, prf_rec->base_rec.id, - "APSS_CHASSIS", prf_rec->chassis, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_CHASSIS", prf_rec->chassis, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec->base_rec.rank, prf_rec->base_rec.id, - "APSS_SLOT", prf_rec->slot, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_SLOT", prf_rec->slot, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec->base_rec.rank, prf_rec->base_rec.id, - "APSS_BLADE", prf_rec->blade, "", "", ""); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + "APCXI_BLADE", prf_rec->blade, "", "", ""); + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec->base_rec.rank, prf_rec->base_rec.id, - "APSS_NODE", prf_rec->node, "", "", ""); + "APCXI_NODE", prf_rec->node, "", "", ""); - for(i = 0; i < APSS_NUM_INDICES; i++) + for(i = 0; i < APCXI_NUM_INDICES; i++) { - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec->base_rec.rank, prf_rec->base_rec.id, - apss_counter_names[i], prf_rec->counters[i], + apcxi_counter_names[i], prf_rec->counters[i], "", "", ""); } } @@ -238,150 +238,150 @@ static void darshan_log_print_apss_rec(void *rec, char *file_name, return; } -static void darshan_log_print_apss_description(int ver) +static void darshan_log_print_apcxi_description(int ver) { - printf("\n# description of apss counters:\n"); - printf("# global summary stats for the apss module:\n"); - printf("# APSS_GROUPS: total number of groups\n"); - printf("# APSS_CHASSIS: total number of chassis\n"); - printf("# APSS_BLADES: total number of blades\n"); - printf("# APSS_SLOTS: total number of slots\n"); - printf("# per-router statistics for the apss module:\n"); - printf("# APSS_GROUP: group this router is on\n"); - printf("# APSS_CHASSIS: chassis this router is on\n"); - printf("# APSS_SLOT: slot in the chassis this router is on\n"); - printf("# APSS_BLADE: blade this router is on\n"); - printf("# APSS_NODE: node connected to this router\n"); - printf("# APSS_AR_RTR_* port counters for the 40 router-router ports\n"); - //printf("# APSS_AR_RTR_x_y_INQ_PRF_INCOMING_FLIT_VC[0-7]: flits on VCs of x y tile\n"); - //printf("# APSS_AR_RTR_x_y_INQ_PRF_ROWBUS_STALL_CNT: stalls on x y tile\n"); - //printf("# APSS_AR_RTR_PT_* port counters for the 8 router-nic ports\n"); - //printf("# APSS_AR_RTR_PT_x_y_INQ_PRF_INCOMING_FLIT_VC[0,4]: flits on VCs of x y tile\n"); - //printf("# APSS_AR_RTR_PT_x_y_INQ_PRF_REQ_ROWBUS_STALL_CNT: stalls on x y tile\n"); + printf("\n# description of apcxi counters:\n"); + printf("# global summary stats for the apcxi module:\n"); + printf("# APCXI_GROUPS: total number of groups\n"); + printf("# APCXI_CHASSIS: total number of chassis\n"); + printf("# APCXI_BLADES: total number of blades\n"); + printf("# APCXI_SLOTS: total number of slots\n"); + printf("# per-router statistics for the apcxi module:\n"); + printf("# APCXI_GROUP: group this router is on\n"); + printf("# APCXI_CHASSIS: chassis this router is on\n"); + printf("# APCXI_SLOT: slot in the chassis this router is on\n"); + printf("# APCXI_BLADE: blade this router is on\n"); + printf("# APCXI_NODE: node connected to this router\n"); + printf("# APCXI_AR_RTR_* port counters for the 40 router-router ports\n"); + //printf("# APCXI_AR_RTR_x_y_INQ_PRF_INCOMING_FLIT_VC[0-7]: flits on VCs of x y tile\n"); + //printf("# APCXI_AR_RTR_x_y_INQ_PRF_ROWBUS_STALL_CNT: stalls on x y tile\n"); + //printf("# APCXI_AR_RTR_PT_* port counters for the 8 router-nic ports\n"); + //printf("# APCXI_AR_RTR_PT_x_y_INQ_PRF_INCOMING_FLIT_VC[0,4]: flits on VCs of x y tile\n"); + //printf("# APCXI_AR_RTR_PT_x_y_INQ_PRF_REQ_ROWBUS_STALL_CNT: stalls on x y tile\n"); return; } -static void darshan_log_print_apss_rec_diff(void *file_rec1, char *file_name1, +static void darshan_log_print_apcxi_rec_diff(void *file_rec1, char *file_name1, void *file_rec2, char *file_name2) { - struct darshan_apss_header_record *hdr_rec1; - struct darshan_apss_header_record *hdr_rec2; - struct darshan_apss_perf_record *prf_rec1; - struct darshan_apss_perf_record *prf_rec2; + struct darshan_apcxi_header_record *hdr_rec1; + struct darshan_apcxi_header_record *hdr_rec2; + struct darshan_apcxi_perf_record *prf_rec1; + struct darshan_apcxi_perf_record *prf_rec2; - hdr_rec1 = (struct darshan_apss_header_record*) file_rec1; - hdr_rec2 = (struct darshan_apss_header_record*) file_rec2; - prf_rec1 = (struct darshan_apss_perf_record*) file_rec1; - prf_rec2 = (struct darshan_apss_perf_record*) file_rec2; + hdr_rec1 = (struct darshan_apcxi_header_record*) file_rec1; + hdr_rec2 = (struct darshan_apcxi_header_record*) file_rec2; + prf_rec1 = (struct darshan_apcxi_perf_record*) file_rec1; + prf_rec2 = (struct darshan_apcxi_perf_record*) file_rec2; - if (hdr_rec1->magic == APSS_MAGIC) + if (hdr_rec1->magic == APCXI_MAGIC) { /* this is the header record */ if (!hdr_rec2) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_GROUPS", hdr_rec1->ngroups, "", "", ""); + "APCXI_GROUPS", hdr_rec1->ngroups, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_CHASSIS", hdr_rec1->nchassis, "", "", ""); + "APCXI_CHASSIS", hdr_rec1->nchassis, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_SLOTS", hdr_rec1->nslots, "", "", ""); + "APCXI_SLOTS", hdr_rec1->nslots, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_BLADES", hdr_rec1->nblades, "", "", ""); + "APCXI_BLADES", hdr_rec1->nblades, "", "", ""); printf("- "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_APPLICATION_ID", hdr_rec1->appid, "", "", ""); + "APCXI_APPLICATION_ID", hdr_rec1->appid, "", "", ""); } else if (!hdr_rec1) { printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_GROUPS", hdr_rec2->ngroups, "", "", ""); + "APCXI_GROUPS", hdr_rec2->ngroups, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_CHASSIS", hdr_rec2->nchassis, "", "", ""); + "APCXI_CHASSIS", hdr_rec2->nchassis, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_SLOTS", hdr_rec2->nslots, "", "", ""); + "APCXI_SLOTS", hdr_rec2->nslots, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_BLADES", hdr_rec2->nblades, "", "", ""); + "APCXI_BLADES", hdr_rec2->nblades, "", "", ""); printf("+ "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_APPLICATION_ID", hdr_rec2->appid, "", "", ""); + "APCXI_APPLICATION_ID", hdr_rec2->appid, "", "", ""); } else { if (hdr_rec1->ngroups != hdr_rec2->ngroups) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_GROUPS", hdr_rec1->ngroups, "", "", ""); + "APCXI_GROUPS", hdr_rec1->ngroups, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_GROUPS", hdr_rec2->ngroups, "", "", ""); + "APCXI_GROUPS", hdr_rec2->ngroups, "", "", ""); } if (hdr_rec1->nchassis != hdr_rec2->nchassis) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_CHASSIS", hdr_rec1->nchassis, "", "", ""); + "APCXI_CHASSIS", hdr_rec1->nchassis, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_CHASSIS", hdr_rec2->nchassis, "", "", ""); + "APCXI_CHASSIS", hdr_rec2->nchassis, "", "", ""); } if (hdr_rec1->nslots != hdr_rec2->nslots) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_SLOTS", hdr_rec1->nslots, "", "", ""); + "APCXI_SLOTS", hdr_rec1->nslots, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_SLOTS", hdr_rec2->nslots, "", "", ""); + "APCXI_SLOTS", hdr_rec2->nslots, "", "", ""); } if (hdr_rec1->nblades != hdr_rec2->nblades) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_BLADES", hdr_rec1->nblades, "", "", ""); + "APCXI_BLADES", hdr_rec1->nblades, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_BLADES", hdr_rec2->nblades, "", "", ""); + "APCXI_BLADES", hdr_rec2->nblades, "", "", ""); } if (hdr_rec1->appid != hdr_rec2->appid) { printf("- "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec1->base_rec.rank, hdr_rec1->base_rec.id, - "APSS_APPLICATION_ID", hdr_rec1->appid, "", "", ""); + "APCXI_APPLICATION_ID", hdr_rec1->appid, "", "", ""); printf("+ "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], hdr_rec2->base_rec.rank, hdr_rec2->base_rec.id, - "APSS_APPLICATION_ID", hdr_rec2->appid, "", "", ""); + "APCXI_APPLICATION_ID", hdr_rec2->appid, "", "", ""); } } } @@ -390,139 +390,139 @@ static void darshan_log_print_apss_rec_diff(void *file_rec1, char *file_name1, if (!prf_rec2) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_GROUP", prf_rec1->group, "", "", ""); + "APCXI_GROUP", prf_rec1->group, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_CHASSIS", prf_rec1->chassis, "", "", ""); + "APCXI_CHASSIS", prf_rec1->chassis, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_SLOT", prf_rec1->slot, "", "", ""); + "APCXI_SLOT", prf_rec1->slot, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_BLADE", prf_rec1->blade, "", "", ""); + "APCXI_BLADE", prf_rec1->blade, "", "", ""); printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_NODE", prf_rec1->node, "", "", ""); + "APCXI_NODE", prf_rec1->node, "", "", ""); } else if (!prf_rec1) { printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_GROUP", prf_rec2->group, "", "", ""); + "APCXI_GROUP", prf_rec2->group, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_CHASSIS", prf_rec2->chassis, "", "", ""); + "APCXI_CHASSIS", prf_rec2->chassis, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_SLOT", prf_rec2->slot, "", "", ""); + "APCXI_SLOT", prf_rec2->slot, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_BLADE", prf_rec2->blade, "", "", ""); + "APCXI_BLADE", prf_rec2->blade, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_NODE", prf_rec2->node, "", "", ""); + "APCXI_NODE", prf_rec2->node, "", "", ""); } else { if (prf_rec1->group != prf_rec2->group) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_GROUP", prf_rec1->group, "", "", ""); + "APCXI_GROUP", prf_rec1->group, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_GROUP", prf_rec2->group, "", "", ""); + "APCXI_GROUP", prf_rec2->group, "", "", ""); } if (prf_rec1->chassis != prf_rec2->chassis) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_CHASSIS", prf_rec1->chassis, "", "", ""); + "APCXI_CHASSIS", prf_rec1->chassis, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_CHASSIS", prf_rec2->chassis, "", "", ""); + "APCXI_CHASSIS", prf_rec2->chassis, "", "", ""); } if (prf_rec1->slot != prf_rec2->slot) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_SLOT", prf_rec1->slot, "", "", ""); + "APCXI_SLOT", prf_rec1->slot, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_SLOT", prf_rec2->slot, "", "", ""); + "APCXI_SLOT", prf_rec2->slot, "", "", ""); } if (prf_rec1->blade != prf_rec2->blade) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_BLADE", prf_rec1->blade, "", "", ""); + "APCXI_BLADE", prf_rec1->blade, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_BLADE", prf_rec2->blade, "", "", ""); + "APCXI_BLADE", prf_rec2->blade, "", "", ""); } if (prf_rec1->node != prf_rec2->node) { printf("- "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - "APSS_NODE", prf_rec1->node, "", "", ""); + "APCXI_NODE", prf_rec1->node, "", "", ""); printf("+ "); - DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_D_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - "APSS_NODE", prf_rec2->node, "", "", ""); + "APCXI_NODE", prf_rec2->node, "", "", ""); } } int i; /* router tile record */ - for(i = 0; i < APSS_NUM_INDICES; i++) + for(i = 0; i < APCXI_NUM_INDICES; i++) { if (!prf_rec2) { printf("- "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - apss_counter_names[i], prf_rec1->counters[i], + apcxi_counter_names[i], prf_rec1->counters[i], "", "", ""); } else if (!prf_rec1) { printf("+ "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - apss_counter_names[i], prf_rec2->counters[i], + apcxi_counter_names[i], prf_rec2->counters[i], "", "", ""); } else if (prf_rec1->counters[i] != prf_rec2->counters[i]) { printf("- "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec1->base_rec.rank, prf_rec1->base_rec.id, - apss_counter_names[i], prf_rec1->counters[i], + apcxi_counter_names[i], prf_rec1->counters[i], "", "", ""); printf("+ "); - DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APSS_MOD], + DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APCXI_MOD], prf_rec2->base_rec.rank, prf_rec2->base_rec.id, - apss_counter_names[i], prf_rec2->counters[i], + apcxi_counter_names[i], prf_rec2->counters[i], "", "", ""); } } diff --git a/apcxi/util/darshan-apcxi-logutils.h b/apcxi/util/darshan-apcxi-logutils.h new file mode 100644 index 0000000..1c0b256 --- /dev/null +++ b/apcxi/util/darshan-apcxi-logutils.h @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2018 University of Chicago. + * See COPYRIGHT notice in top-level directory. + * + */ + +#ifndef __APCXI_LOG_UTILS_H +#define __APCXI_LOG_UTILS_H + +extern char *apcxi_counter_names[]; + +extern struct darshan_mod_logutil_funcs apcxi_logutils; + +#endif + diff --git a/apcxi/util/print-apcxi-size.c b/apcxi/util/print-apcxi-size.c new file mode 100644 index 0000000..80cd4af --- /dev/null +++ b/apcxi/util/print-apcxi-size.c @@ -0,0 +1,12 @@ +#include +#include "darshan-log-format.h" +#include "darshan-apcxi-log-format.h" + +int main (int argc, char **argv) +{ + printf ("APCXI_NUM_INDICES = %d\n", APCXI_NUM_INDICES); + printf ("sizeof darshan_apcxi_header_record = %d\n", sizeof(struct darshan_apcxi_header_record)); + printf ("sizeof darshan_apcxi_perf_record = %d\n", sizeof(struct darshan_apcxi_perf_record)); + + return 0; +} diff --git a/apss/Makefile.darshan b/apss/Makefile.darshan deleted file mode 100644 index bec287a..0000000 --- a/apss/Makefile.darshan +++ /dev/null @@ -1,20 +0,0 @@ -# -# AutoPerf Make rules for Darshan -# -DARSHAN_STATIC_MOD_OBJS += lib/darshan-apss.o -DARSHAN_DYNAMIC_MOD_OBJS += lib/darshan-apss.po - -VPATH += :$(srcdir)/../modules/autoperf/apss -CFLAGS += \ - -DDARSHAN_USE_APSS \ - -I$(srcdir)/../modules/autoperf/apss - -CFLAGS_SHARED += \ - -DDARSHAN_USE_APSS \ - -I$(srcdir)/../modules/autoperf/apss - -lib/darshan-apss.o: lib/darshan-apss.c lib/darshan-apss-utils.h darshan.h darshan-common.h $(DARSHAN_LOG_FORMAT) darshan-apss-log-format.h | lib - $(CC) $(CFLAGS) -c $< -o $@ - -lib/darshan-apss.po: lib/darshan-apss.c lib/darshan-apss-utils.h darshan.h darshan-dynamic.h darshan-common.h $(DARSHAN_LOG_FORMAT) darshan-apss-log-format.h | lib - $(CC) $(CFLAGS_SHARED) -c $< -o $@ diff --git a/apss/util/Makefile.darshan b/apss/util/Makefile.darshan deleted file mode 100644 index 1a9784b..0000000 --- a/apss/util/Makefile.darshan +++ /dev/null @@ -1,27 +0,0 @@ -# -# AutoPerf Make rules for Darshan -# - -VPATH += :$(srcdir)/../modules/autoperf/apss/util - -DARSHAN_MOD_LOG_FORMATS += $(srcdir)/../modules/autoperf/apss/darshan-apss-log-format.h -DARSHAN_MOD_LOGUTIL_HEADERS += darshan-apss-logutils.h -DARSHAN_STATIC_MOD_OBJS += darshan-apss-logutils.o -DARSHAN_DYNAMIC_MOD_OBJS += darshan-apss-logutils.po - -CFLAGS += \ - -DDARSHAN_USE_apss \ - -I$(srcdir)/../modules/autoperf/apss \ - -I$(srcdir)/../modules/autoperf/apss/util - -CFLAGS_SHARED += \ - -DDARSHAN_USE_apss \ - -I$(srcdir)/../modules/autoperf/apss \ - -I$(srcdir)/../modules/autoperf/apss/util - -darshan-apss-logutils.o: darshan-apss-logutils.c darshan-logutils.h darshan-apss-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../modules/autoperf/apss/darshan-apss-log-format.h | uthash-1.9.2 - $(CC) $(CFLAGS) -c $< -o $@ - -darshan-apss-logutils.po: darshan-apss-logutils.c darshan-logutils.h darshan-apss-logutils.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../modules/autoperf/apss/darshan-apss-log-format.h | uthash-1.9.2 - $(CC) $(CFLAGS_SHARED) -c $< -o $@ - diff --git a/apss/util/darshan-apss-logutils.h b/apss/util/darshan-apss-logutils.h deleted file mode 100644 index 6d12e17..0000000 --- a/apss/util/darshan-apss-logutils.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2018 University of Chicago. - * See COPYRIGHT notice in top-level directory. - * - */ - -#ifndef __apss_LOG_UTILS_H -#define __apss_LOG_UTILS_H - -extern char *apss_counter_names[]; - -extern struct darshan_mod_logutil_funcs apss_logutils; - -#endif - diff --git a/apss/util/print-apss-size.c b/apss/util/print-apss-size.c deleted file mode 100644 index a60244f..0000000 --- a/apss/util/print-apss-size.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include "darshan-log-format.h" -#include "darshan-apss-log-format.h" - -int main (int argc, char **argv) -{ - printf ("APSS_NUM_INDICES = %d\n", APSS_NUM_INDICES); - printf ("sizeof darshan_apss_header_record = %d\n", sizeof(struct darshan_apss_header_record)); - printf ("sizeof darshan_apss_perf_record = %d\n", sizeof(struct darshan_apss_perf_record)); - - return 0; -}