Commit 5605f9fa authored by Philip Carns's avatar Philip Carns

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
parent b20e9f25
...@@ -129,4 +129,4 @@ install:: all ...@@ -129,4 +129,4 @@ install:: all
install -m 755 compilers/mpixlf95_r-trace-bgp-V1R4 $(bindir)/fast/mpixlf95_r install -m 755 compilers/mpixlf95_r-trace-bgp-V1R4 $(bindir)/fast/mpixlf95_r
clean:: 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
...@@ -24,8 +24,8 @@ static void cd_print_int(char * prefix, int arg1, int arg2) ...@@ -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) static void cd_print_int64(char * prefix, int64_t arg1, int64_t arg2)
{ {
printf("- %s %lld\n", prefix, arg1); printf("- %s %lld\n", prefix, lld(arg1));
printf("+ %s %lld\n", prefix, arg2); printf("+ %s %lld\n", prefix, lld(arg2));
} }
...@@ -117,23 +117,23 @@ int main(int argc, char ** argv) ...@@ -117,23 +117,23 @@ int main(int argc, char ** argv)
if (cp_file1.counters[i] != cp_file2.counters[i]) { if (cp_file1.counters[i] != cp_file2.counters[i]) {
printf("- "); printf("- ");
printf("%d\t%llu\t%s\t%lld\t...%s\n", printf("%d\t%llu\t%s\t%lld\t...%s\n",
cp_file1.rank, cp_file1.hash, darshan_names[i], cp_file1.rank, llu(cp_file1.hash), darshan_names[i],
cp_file1.counters[i], cp_file1.name_suffix); lld(cp_file1.counters[i]), cp_file1.name_suffix);
printf("+ "); printf("+ ");
printf("%d\t%llu\t%s\t%lld\t...%s\n", printf("%d\t%llu\t%s\t%lld\t...%s\n",
cp_file2.rank, cp_file2.hash, darshan_names[i], cp_file2.rank, llu(cp_file2.hash), darshan_names[i],
cp_file2.counters[i], cp_file2.name_suffix); lld(cp_file2.counters[i]), cp_file2.name_suffix);
} }
} }
for(i=0; i<CP_F_NUM_INDICES; i++) { for(i=0; i<CP_F_NUM_INDICES; i++) {
if (cp_file1.fcounters[i] != cp_file2.fcounters[i]) { if (cp_file1.fcounters[i] != cp_file2.fcounters[i]) {
printf("- "); printf("- ");
printf("%d\t%llu\t%s\t%f\t...%s\n", printf("%d\t%llu\t%s\t%f\t...%s\n",
cp_file1.rank, cp_file1.hash, darshan_f_names[i], cp_file1.rank, llu(cp_file1.hash), darshan_f_names[i],
cp_file1.fcounters[i], cp_file1.name_suffix); cp_file1.fcounters[i], cp_file1.name_suffix);
printf("+ "); printf("+ ");
printf("%d\t%llu\t%s\t%f\t...%s\n", printf("%d\t%llu\t%s\t%f\t...%s\n",
cp_file2.rank, cp_file2.hash, darshan_f_names[i], cp_file2.rank, llu(cp_file2.hash), darshan_f_names[i],
cp_file2.fcounters[i], cp_file2.name_suffix); cp_file2.fcounters[i], cp_file2.name_suffix);
} }
} }
......
...@@ -49,11 +49,11 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!"); ...@@ -49,11 +49,11 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!");
# substitute arguments and darshan options into commands # substitute arguments and darshan options into commands
$base_link_cmd = $link_cmd; $base_link_cmd = $link_cmd;
$base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g; $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; $link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g;
$compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g; $compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g;
print OUTPUT <<'EOF'; print OUTPUT<<'EOF';
#!/bin/bash #!/bin/bash
# #
# Auto-generated mpicc script from darshan-gen-cc.pl # Auto-generated mpicc script from darshan-gen-cc.pl
...@@ -94,7 +94,7 @@ if [ "$linking" = yes ] ; then ...@@ -94,7 +94,7 @@ if [ "$linking" = yes ] ; then
mpilibs="$C_LINKPATH_SHL$libdir $mpilibs" mpilibs="$C_LINKPATH_SHL$libdir $mpilibs"
fi fi
EOF EOF
print OUTPUT <<EOF; print OUTPUT<<"EOF";
# Trial run to generate a symbol listing. We only enable Darshan if: # Trial run to generate a symbol listing. We only enable Darshan if:
# a) MPI is used # a) MPI is used
# b) PMPI is _not_ used # b) PMPI is _not_ used
...@@ -105,7 +105,7 @@ print OUTPUT <<EOF; ...@@ -105,7 +105,7 @@ print OUTPUT <<EOF;
# if allargs includes any libraries, then we need to get # if allargs includes any libraries, then we need to get
# -ldarshan-mpi-io in there first # -ldarshan-mpi-io in there first
newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` newallargs=`echo \${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'`
used_darshan=0 used_darshan=0
...@@ -191,7 +191,7 @@ sub process_args ...@@ -191,7 +191,7 @@ sub process_args
sub print_help sub print_help
{ {
print <<EOF; print<<"EOF";
Usage: $PROGRAM_NAME <stock mpicc> --output <modified mpicc> Usage: $PROGRAM_NAME <stock mpicc> --output <modified mpicc>
......
...@@ -49,11 +49,11 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!"); ...@@ -49,11 +49,11 @@ open (OUTPUT, ">$output_file") || die("Error opening output file: $!");
# substitute arguments and darshan options into commands # substitute arguments and darshan options into commands
$base_link_cmd = $link_cmd; $base_link_cmd = $link_cmd;
$base_link_cmd =~ s/foo.o -o foo/"\$\{allargs\[\@\]\}"/g; $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; $link_cmd =~ s/$/ -L$DARSHAN_LIB_PATH -ldarshan-posix/g;
$compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g; $compile_cmd =~ s/-c foo.c/"\$\{allargs\[\@\]\}"/g;
print OUTPUT <<'EOF'; print OUTPUT<<'EOF';
#!/bin/bash #!/bin/bash
# #
# Auto-generated mpicc script from darshan-gen-cc.pl # Auto-generated mpicc script from darshan-gen-cc.pl
...@@ -94,7 +94,7 @@ if [ "$linking" = yes ] ; then ...@@ -94,7 +94,7 @@ if [ "$linking" = yes ] ; then
mpilibs="$C_LINKPATH_SHL$libdir $mpilibs" mpilibs="$C_LINKPATH_SHL$libdir $mpilibs"
fi fi
EOF EOF
print OUTPUT <<EOF; print OUTPUT<<"EOF";
# Trial run to generate a symbol listing. We only enable Darshan if: # Trial run to generate a symbol listing. We only enable Darshan if:
# a) MPI is used # a) MPI is used
# b) PMPI is _not_ used # b) PMPI is _not_ used
...@@ -105,7 +105,7 @@ print OUTPUT <<EOF; ...@@ -105,7 +105,7 @@ print OUTPUT <<EOF;
# if allargs includes any libraries, then we need to get # if allargs includes any libraries, then we need to get
# -ldarshan-mpi-io in there first # -ldarshan-mpi-io in there first
newallargs=`echo ${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'` newallargs=`echo \${allargs[@]} | sed 's/ -l/ -ldarshan-mpi-io -l/'`
used_darshan=0 used_darshan=0
...@@ -202,7 +202,7 @@ sub process_args ...@@ -202,7 +202,7 @@ sub process_args
sub print_help sub print_help
{ {
print <<EOF; print<<"EOF";
Usage: $PROGRAM_NAME <stock mpicxx> --output <modified mpicc> Usage: $PROGRAM_NAME <stock mpicxx> --output <modified mpicc>
......
...@@ -5,8 +5,8 @@ int main(int argc, char **argv) ...@@ -5,8 +5,8 @@ int main(int argc, char **argv)
{ {
printf("version: %s\n", CP_VERSION); printf("version: %s\n", CP_VERSION);
printf("CP_JOB_RECORD_SIZE: %d\n", CP_JOB_RECORD_SIZE); printf("CP_JOB_RECORD_SIZE: %d\n", CP_JOB_RECORD_SIZE);
printf("CP_EXE_LEN: %d\n", CP_EXE_LEN); printf("CP_EXE_LEN: %lu\n", CP_EXE_LEN);
printf("CP_FILE_RECORD_SIZE: %d\n", CP_FILE_RECORD_SIZE); printf("CP_FILE_RECORD_SIZE: %lu\n", CP_FILE_RECORD_SIZE);
printf("CP_NAME_SUFFIX_LEN: %d\n", CP_NAME_SUFFIX_LEN); printf("CP_NAME_SUFFIX_LEN: %d\n", CP_NAME_SUFFIX_LEN);
printf("CP_NUM_INDICES: %d\n", CP_NUM_INDICES); printf("CP_NUM_INDICES: %d\n", CP_NUM_INDICES);
printf("CP_F_NUM_INDICES: %d\n", CP_F_NUM_INDICES); printf("CP_F_NUM_INDICES: %d\n", CP_F_NUM_INDICES);
......
...@@ -66,8 +66,8 @@ int main(int argc, char **argv) ...@@ -66,8 +66,8 @@ int main(int argc, char **argv)
/* print job summary */ /* print job summary */
printf("# darshan log version: %s\n", job.version_string); printf("# darshan log version: %s\n", job.version_string);
printf("# size of file statistics: %d bytes\n", sizeof(cp_file)); printf("# size of file statistics: %lu bytes\n", sizeof(cp_file));
printf("# size of job statistics: %d bytes\n", sizeof(job)); printf("# size of job statistics: %lu bytes\n", sizeof(job));
printf("# exe: %s\n", tmp_string); printf("# exe: %s\n", tmp_string);
printf("# uid: %d\n", job.uid); printf("# uid: %d\n", job.uid);
printf("# start_time: %ld\n", (long)job.start_time); printf("# start_time: %ld\n", (long)job.start_time);
......
...@@ -82,7 +82,7 @@ int main(int argc, char **argv) ...@@ -82,7 +82,7 @@ int main(int argc, char **argv)
return(-1); 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("# exe: %s\n", tmp_string);
printf("# uid: %d\n", job.uid); printf("# uid: %d\n", job.uid);
printf("# start_time: %ld\n", (long)job.start_time); printf("# start_time: %ld\n", (long)job.start_time);
...@@ -172,7 +172,7 @@ int main(int argc, char **argv) ...@@ -172,7 +172,7 @@ int main(int argc, char **argv)
percentage -= tmp_stream.total_out; percentage -= tmp_stream.total_out;
percentage = percentage / (i*sizeof(cp_file)); 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); percentage);
deflateEnd(&tmp_stream); deflateEnd(&tmp_stream);
......
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