Commit 5f40cfef authored by Sudheer Chunduri's avatar Sudheer Chunduri
Browse files

modules name updates

parent a95ea110
......@@ -4,13 +4,13 @@
*
*/
#ifndef __DARSHAN_APMPI_LOG_FORMAT_H
#define __DARSHAN_APMPI_LOG_FORMAT_H
#ifndef __APMPI_LOG_FORMAT_H
#define __APMPI_LOG_FORMAT_H
/* current AutoPerf MPI log format version */
#define DARSHAN_APMPI_VER 1
#define APMPI_VER 1
#define DARSHAN_APMPI_MAGIC ('A'*0x100000000+\
#define APMPI_MAGIC ('A'*0x100000000+\
'P'*0x1000000+\
'M'*0x10000+\
'P'*0x100+\
......@@ -101,4 +101,4 @@ struct darshan_apmpi_perf_record
};
#endif /* __DARSHAN_APMPI_LOG_FORMAT_H */
#endif /* __APMPI_LOG_FORMAT_H */
#ifndef __DARSHAN_APMPI_UTILS_H__
#define __DARSHAN_APMPI_UTILS_H__
#ifndef __APMPI_UTILS_H__
#define __APMPI_UTILS_H__
#include <regex.h>
......
......@@ -210,7 +210,7 @@ void apmpi_runtime_initialize()
/* register the apmpi module with the darshan-core component */
darshan_core_register_module(
DARSHAN_APMPI_MOD,
APMPI_MOD,
mod_funcs,
&apmpi_buf_size,
&my_rank,
......@@ -219,7 +219,7 @@ void apmpi_runtime_initialize()
/* not enough memory to fit apmpi module record */
if(apmpi_buf_size < sizeof(struct darshan_apmpi_perf_record))
{
darshan_core_unregister_module(DARSHAN_APMPI_MOD);
darshan_core_unregister_module(APMPI_MOD);
APMPI_UNLOCK();
return;
}
......@@ -228,7 +228,7 @@ void apmpi_runtime_initialize()
apmpi_runtime = malloc(sizeof(*apmpi_runtime));
if(!apmpi_runtime)
{
darshan_core_unregister_module(DARSHAN_APMPI_MOD);
darshan_core_unregister_module(APMPI_MOD);
APMPI_UNLOCK();
return;
}
......@@ -240,12 +240,12 @@ void apmpi_runtime_initialize()
apmpi_runtime->perf_record = darshan_core_register_record(
apmpi_runtime->rec_id,
"APMPI",
DARSHAN_APMPI_MOD,
APMPI_MOD,
sizeof(struct darshan_apmpi_perf_record),
NULL);
if(!(apmpi_runtime->perf_record))
{
darshan_core_unregister_module(DARSHAN_APMPI_MOD);
darshan_core_unregister_module(APMPI_MOD);
free(apmpi_runtime);
apmpi_runtime = NULL;
APMPI_UNLOCK();
......
......@@ -59,7 +59,7 @@ static int darshan_log_get_apmpi_rec(darshan_fd fd, void** buf_p)
int i;
int ret = -1;
if(fd->mod_map[DARSHAN_APMPI_MOD].len == 0)
if(fd->mod_map[APMPI_MOD].len == 0)
return(0);
if (!*buf_p)
......@@ -76,25 +76,25 @@ static int darshan_log_get_apmpi_rec(darshan_fd fd, void** buf_p)
buffer = *buf_p;
}
if (fd->mod_ver[DARSHAN_APMPI_MOD] == 0)
if (fd->mod_ver[APMPI_MOD] == 0)
{
printf("Either unknown or debug version: %d\n",
fd->mod_ver[DARSHAN_APMPI_MOD]);
fd->mod_ver[APMPI_MOD]);
return(0);
}
if ((fd->mod_ver[DARSHAN_APMPI_MOD] > 0) &&
(fd->mod_ver[DARSHAN_APMPI_MOD] < DARSHAN_APMPI_VER))
if ((fd->mod_ver[APMPI_MOD] > 0) &&
(fd->mod_ver[APMPI_MOD] < APMPI_VER))
{
/* perform conversion as needed */
}
/* v1, current version */
if (fd->mod_ver[DARSHAN_APMPI_MOD] == DARSHAN_APMPI_VER)
if (fd->mod_ver[APMPI_MOD] == APMPI_VER)
{
rec_len = sizeof(struct darshan_apmpi_perf_record);
ret = darshan_log_get_mod(fd, DARSHAN_APMPI_MOD, buffer, rec_len);
ret = darshan_log_get_mod(fd, APMPI_MOD, buffer, rec_len);
}
if (ret == rec_len)
......@@ -143,8 +143,8 @@ static int darshan_log_put_apmpi_rec(darshan_fd fd, void* buf)
rec_len = sizeof(struct darshan_apmpi_perf_record);
ret = darshan_log_put_mod(fd, DARSHAN_APMPI_MOD, buf,
rec_len, DARSHAN_APMPI_VER);
ret = darshan_log_put_mod(fd, APMPI_MOD, buf,
rec_len, APMPI_VER);
if(ret < 0)
return(-1);
......@@ -161,14 +161,14 @@ static void darshan_log_print_apmpi_rec(void *rec, char *file_name,
for(i = 0; i < APMPI_NUM_INDICES; i++)
{
DARSHAN_U_COUNTER_PRINT(darshan_module_names[DARSHAN_APMPI_MOD],
DARSHAN_U_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec->base_rec.rank, prf_rec->base_rec.id,
apmpi_counter_names[i], prf_rec->counters[i],
"", "", "");
}
for(i = 0; i < APMPI_F_NUM_INDICES; i++)
{
DARSHAN_F_COUNTER_PRINT(darshan_module_names[DARSHAN_APMPI_MOD],
DARSHAN_F_COUNTER_PRINT(darshan_module_names[APMPI_MOD],
prf_rec->base_rec.rank, prf_rec->base_rec.id,
apmpi_f_counter_names[i], prf_rec->fcounters[i],
"", "", "");
......
......@@ -4,8 +4,8 @@
*
*/
#ifndef __DARSHAN_APMPI_LOG_UTILS_H
#define __DARSHAN_APMPI_LOG_UTILS_H
#ifndef __APMPI_LOG_UTILS_H
#define __APMPI_LOG_UTILS_H
extern char *apmpi_counter_names[];
......
......@@ -4,13 +4,13 @@
*
*/
#ifndef __DARSHAN_APXC_LOG_FORMAT_H
#define __DARSHAN_APXC_LOG_FORMAT_H
#ifndef __APXC_LOG_FORMAT_H
#define __APXC_LOG_FORMAT_H
/* current AutoPerf Cray XC log format version */
#define DARSHAN_APXC_VER 1
#define APXC_VER 1
#define DARSHAN_APXC_MAGIC ('A'*0x100000000000000+\
#define APXC_MAGIC ('A'*0x100000000000000+\
'U'*0x1000000000000+\
'T'*0x10000000000+\
'O'*0x100000000+\
......@@ -482,4 +482,4 @@ struct darshan_apxc_header_record
uint64_t appid;
};
#endif /* __DARSHAN_APXC_LOG_FORMAT_H */
#endif /* __APXC_LOG_FORMAT_H */
#ifndef __DARSHAN_APXC_UTILS_H__
#define __DARSHAN_APXC_UTILS_H__
#ifndef __APXC_UTILS_H__
#define __APXC_UTILS_H__
#include <regex.h>
......
......@@ -173,7 +173,7 @@ void apxc_runtime_initialize()
/* register the APXC module with the darshan-core component */
darshan_core_register_module(
DARSHAN_APXC_MOD,
APXC_MOD,
mod_funcs,
&apxc_buf_size,
&my_rank,
......@@ -183,7 +183,7 @@ void apxc_runtime_initialize()
/* not enough memory to fit crayxc module record */
if(apxc_buf_size < sizeof(struct darshan_apxc_header_record) + sizeof(struct darshan_apxc_perf_record))
{
darshan_core_unregister_module(DARSHAN_APXC_MOD);
darshan_core_unregister_module(APXC_MOD);
APXC_UNLOCK();
return;
}
......@@ -192,7 +192,7 @@ void apxc_runtime_initialize()
apxc_runtime = malloc(sizeof(*apxc_runtime));
if(!apxc_runtime)
{
darshan_core_unregister_module(DARSHAN_APXC_MOD);
darshan_core_unregister_module(APXC_MOD);
APXC_UNLOCK();
return;
}
......@@ -207,12 +207,12 @@ void apxc_runtime_initialize()
apxc_runtime->header_id,
//NULL,
"darshan-crayxc-header",
DARSHAN_APXC_MOD,
APXC_MOD,
sizeof(struct darshan_apxc_header_record),
NULL);
if(!(apxc_runtime->header_record))
{
darshan_core_unregister_module(DARSHAN_APXC_MOD);
darshan_core_unregister_module(APXC_MOD);
free(apxc_runtime);
apxc_runtime = NULL;
APXC_UNLOCK();
......@@ -220,7 +220,7 @@ void apxc_runtime_initialize()
}
apxc_runtime->header_record->base_rec.id = apxc_runtime->header_id;
apxc_runtime->header_record->base_rec.rank = my_rank;
apxc_runtime->header_record->magic = DARSHAN_APXC_MAGIC;
apxc_runtime->header_record->magic = APXC_MAGIC;
}
get_xc_coords(&apxc_runtime->group,
......@@ -238,12 +238,12 @@ void apxc_runtime_initialize()
//NULL,
"APXC", // we want the record for each rank to be treated as shared records so that mpi_redux can operate on
//rtr_rec_name,
DARSHAN_APXC_MOD,
APXC_MOD,
sizeof(struct darshan_apxc_perf_record),
NULL);
if(!(apxc_runtime->perf_record))
{
darshan_core_unregister_module(DARSHAN_APXC_MOD);
darshan_core_unregister_module(APXC_MOD);
free(apxc_runtime);
apxc_runtime = NULL;
APXC_UNLOCK();
......
This diff is collapsed.
......@@ -4,8 +4,8 @@
*
*/
#ifndef __DARSHAN_APXC_LOG_UTILS_H
#define __DARSHAN_APXC_LOG_UTILS_H
#ifndef __APXC_LOG_UTILS_H
#define __APXC_LOG_UTILS_H
extern char *apxc_counter_names[];
......
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