diff --git a/darshan-log-format.h b/darshan-log-format.h index 315192e8fe09761fffb7125d4e44192652625971..f6067e25c73125ca05aff1d2ea038d6fe08207ea 100644 --- a/darshan-log-format.h +++ b/darshan-log-format.h @@ -12,7 +12,7 @@ #include "darshan-config.h" /* update this on file format changes */ -#define CP_VERSION "1.23" +#define CP_VERSION "1.24" /* size (in bytes) of job record */ #define CP_JOB_RECORD_SIZE 1024 diff --git a/darshan-logutils.c b/darshan-logutils.c index 44b63d242f3d1d8d5cc746445c666acbd2226bc7..5e41b9172053fd9b8608303977ffaff9bc15e389 100644 --- a/darshan-logutils.c +++ b/darshan-logutils.c @@ -260,6 +260,8 @@ int darshan_log_getjob(darshan_fd file, struct darshan_job *job) return(0); if(strcmp(job->version_string, "1.23") == 0) return(0); + if(strcmp(job->version_string, "1.24") == 0) + return(0); fprintf(stderr, "Error: incompatible darshan file.\n"); fprintf(stderr, "Error: expected version %s, but got %s\n", @@ -325,9 +327,19 @@ int darshan_log_getfile(darshan_fd fd, struct darshan_job *job, struct darshan_f } } else if(strcmp(job->version_string, "1.23") == 0) + { + /* data format is compatible with 1.24 */ + ret = gzread(fd, file, sizeof(*file)); + if(ret == sizeof(*file)) + { + /* got exactly one, correct size record */ + return(1); + } + } + else if(strcmp(job->version_string, "1.24") == 0) { /* make sure this is the current version */ - assert(strcmp("1.23", CP_VERSION) == 0); + assert(strcmp("1.24", CP_VERSION) == 0); ret = gzread(fd, file, sizeof(*file)); if(ret == sizeof(*file)) @@ -478,12 +490,17 @@ void darshan_log_close(darshan_fd file) */ void darshan_log_print_version_warnings(struct darshan_job *job) { - if(strcmp(job->version_string, "1.23") == 0) + if(strcmp(job->version_string, "1.24") == 0) { /* nothing to do, this is the current version */ return; } + if(strcmp(job->version_string, "1.23") == 0) + { + printf("# WARNING: version 1.23 log format may have incorrect mount point mappings for files with rank > 0\n"); + } + if(strcmp(job->version_string, "1.22") == 0) { printf("# WARNING: version 1.22 log format does not support the following parameters:\n");