From 5605f9fa24da2711dacc7c64326fa24a3b2c07cf Mon Sep 17 00:00:00 2001 From: carns Date: Tue, 11 May 2010 17:49:32 +0000 Subject: [PATCH] merge misc. fixes from trunk to 1.1 branch git-svn-id: https://svn.mcs.anl.gov/repos/darshan/branches/darshan-1.1@232 3b7491f3-a168-0410-bf4b-c445ed680a29 --- Makefile.in | 2 +- darshan-diff.c | 16 ++++++++-------- darshan-gen-cc.pl.in | 10 +++++----- darshan-gen-cxx.pl.in | 10 +++++----- darshan-log-params.c | 4 ++-- darshan-parser.c | 4 ++-- test/gz-bench.c | 4 ++-- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4a91522..0a793f5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -129,4 +129,4 @@ install:: all install -m 755 compilers/mpixlf95_r-trace-bgp-V1R4 $(bindir)/fast/mpixlf95_r clean:: - rm -f *.o *.a lib/*.o lib/*.a darshan-parser darshan-diff darshan-analyzer + rm -f *.o *.a lib/*.o lib/*.a darshan-parser darshan-diff darshan-analyzer darshan-log-params diff --git a/darshan-diff.c b/darshan-diff.c index 99e0fec..692a715 100644 --- a/darshan-diff.c +++ b/darshan-diff.c @@ -24,8 +24,8 @@ static void cd_print_int(char * prefix, int arg1, int arg2) } static void cd_print_int64(char * prefix, int64_t arg1, int64_t arg2) { - printf("- %s %lld\n", prefix, arg1); - printf("+ %s %lld\n", prefix, arg2); + printf("- %s %lld\n", prefix, lld(arg1)); + printf("+ %s %lld\n", prefix, lld(arg2)); } @@ -117,23 +117,23 @@ int main(int argc, char ** argv) if (cp_file1.counters[i] != cp_file2.counters[i]) { printf("- "); printf("%d\t%llu\t%s\t%lld\t...%s\n", - cp_file1.rank, cp_file1.hash, darshan_names[i], - cp_file1.counters[i], cp_file1.name_suffix); + cp_file1.rank, llu(cp_file1.hash), darshan_names[i], + lld(cp_file1.counters[i]), cp_file1.name_suffix); printf("+ "); printf("%d\t%llu\t%s\t%lld\t...%s\n", - cp_file2.rank, cp_file2.hash, darshan_names[i], - cp_file2.counters[i], cp_file2.name_suffix); + cp_file2.rank, llu(cp_file2.hash), darshan_names[i], + lld(cp_file2.counters[i]), cp_file2.name_suffix); } } for(i=0; i$output_file") || die("Error opening output file: $!"); # substitute arguments and darshan options into commands $base_link_cmd = $link_cmd; $base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g; -$link_cmd =~ s/foo.o -o foo/"\$\{newallargs\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS/g; +$link_cmd =~ s/foo.o -o foo/\$\{newallargs\} -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -ldarshan-mpi-io -lz $CP_WRAPPERS/g; $link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g; $compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g; -print OUTPUT <<'EOF'; +print OUTPUT<<'EOF'; #!/bin/bash # # Auto-generated mpicc script from darshan-gen-cc.pl @@ -94,7 +94,7 @@ if [ "$linking" = yes ] ; then mpilibs="$C_LINKPATH_SHL$libdir $mpilibs" fi EOF -print OUTPUT < --output diff --git a/darshan-gen-cxx.pl.in b/darshan-gen-cxx.pl.in index e0f9f4d..701d236 100644 --- a/darshan-gen-cxx.pl.in +++ b/darshan-gen-cxx.pl.in @@ -49,11 +49,11 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!"); # substitute arguments and darshan options into commands $base_link_cmd = $link_cmd; $base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g; -$link_cmd =~ s/foo.o -o foo/"\$\{newallargs\}" -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -lmpichcxx -ldarshan-mpi-io -lz $CP_WRAPPERS/g; +$link_cmd =~ s/foo.o -o foo/\$\{newallargs\} -L$DARSHAN_LIB_PATH $CP_ZLIB_LINK_FLAGS -lmpichcxx -ldarshan-mpi-io -lz $CP_WRAPPERS/g; $link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g; $compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g; -print OUTPUT <<'EOF'; +print OUTPUT<<'EOF'; #!/bin/bash # # Auto-generated mpicc script from darshan-gen-cc.pl @@ -94,7 +94,7 @@ if [ "$linking" = yes ] ; then mpilibs="$C_LINKPATH_SHL$libdir $mpilibs" fi EOF -print OUTPUT < --output diff --git a/darshan-log-params.c b/darshan-log-params.c index 77e3994..d959bb3 100644 --- a/darshan-log-params.c +++ b/darshan-log-params.c @@ -5,8 +5,8 @@ int main(int argc, char **argv) { printf("version: %s\n", CP_VERSION); printf("CP_JOB_RECORD_SIZE: %d\n", CP_JOB_RECORD_SIZE); - printf("CP_EXE_LEN: %d\n", CP_EXE_LEN); - printf("CP_FILE_RECORD_SIZE: %d\n", CP_FILE_RECORD_SIZE); + printf("CP_EXE_LEN: %lu\n", CP_EXE_LEN); + printf("CP_FILE_RECORD_SIZE: %lu\n", CP_FILE_RECORD_SIZE); printf("CP_NAME_SUFFIX_LEN: %d\n", CP_NAME_SUFFIX_LEN); printf("CP_NUM_INDICES: %d\n", CP_NUM_INDICES); printf("CP_F_NUM_INDICES: %d\n", CP_F_NUM_INDICES); diff --git a/darshan-parser.c b/darshan-parser.c index 3283bae..fe25b68 100644 --- a/darshan-parser.c +++ b/darshan-parser.c @@ -66,8 +66,8 @@ int main(int argc, char **argv) /* print job summary */ printf("# darshan log version: %s\n", job.version_string); - printf("# size of file statistics: %d bytes\n", sizeof(cp_file)); - printf("# size of job statistics: %d bytes\n", sizeof(job)); + printf("# size of file statistics: %lu bytes\n", sizeof(cp_file)); + printf("# size of job statistics: %lu bytes\n", sizeof(job)); printf("# exe: %s\n", tmp_string); printf("# uid: %d\n", job.uid); printf("# start_time: %ld\n", (long)job.start_time); diff --git a/test/gz-bench.c b/test/gz-bench.c index edae167..ae7e153 100644 --- a/test/gz-bench.c +++ b/test/gz-bench.c @@ -82,7 +82,7 @@ int main(int argc, char **argv) return(-1); } - printf("# size of file statistics: %d bytes\n", sizeof(cp_file)); + printf("# size of file statistics: %lu bytes\n", sizeof(cp_file)); printf("# exe: %s\n", tmp_string); printf("# uid: %d\n", job.uid); printf("# start_time: %ld\n", (long)job.start_time); @@ -172,7 +172,7 @@ int main(int argc, char **argv) percentage -= tmp_stream.total_out; percentage = percentage / (i*sizeof(cp_file)); - printf("%d\t%d\t%lu\t%f\n", i, i*sizeof(cp_file), tmp_stream.total_out, + printf("%d\t%lu\t%lu\t%f\n", i, i*sizeof(cp_file), tmp_stream.total_out, percentage); deflateEnd(&tmp_stream); -- 2.26.2