Commit 83f0328e authored by Kevin Harms's avatar Kevin Harms
Browse files

Support the jobid in the log file and display in the summary output.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@276 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 1619d509
...@@ -70,6 +70,7 @@ int main(int argc, char **argv) ...@@ -70,6 +70,7 @@ int main(int argc, char **argv)
printf("# size of job statistics: %zu bytes\n", sizeof(job)); printf("# size of job statistics: %zu bytes\n", sizeof(job));
printf("# exe: %s\n", tmp_string); printf("# exe: %s\n", tmp_string);
printf("# uid: %lld\n", lld(job.uid)); printf("# uid: %lld\n", lld(job.uid));
printf("# jobid: %lld\n", lld(job.jobid));
printf("# start_time: %lld\n", lld(job.start_time)); printf("# start_time: %lld\n", lld(job.start_time));
tmp_time += job.start_time; tmp_time += job.start_time;
printf("# start_time_asci: %s", ctime(&tmp_time)); printf("# start_time_asci: %s", ctime(&tmp_time));
......
...@@ -380,6 +380,9 @@ void darshan_shutdown(int timing_flag) ...@@ -380,6 +380,9 @@ void darshan_shutdown(int timing_flag)
"%s/id%d.darshan_partial", "%s/id%d.darshan_partial",
__CP_LOG_PATH, jobid); __CP_LOG_PATH, jobid);
} }
/* add jobid */
final_job->log_job.jobid = (int64_t)jobid;
} }
/* broadcast log file name */ /* broadcast log file name */
......
...@@ -1032,7 +1032,6 @@ void darshan_initialize(int argc, char** argv, int nprocs, int rank) ...@@ -1032,7 +1032,6 @@ void darshan_initialize(int argc, char** argv, int nprocs, int rank)
darshan_global_job->log_job.uid = getuid(); darshan_global_job->log_job.uid = getuid();
darshan_global_job->log_job.start_time = time(NULL); darshan_global_job->log_job.start_time = time(NULL);
darshan_global_job->log_job.nprocs = nprocs; darshan_global_job->log_job.nprocs = nprocs;
darshan_global_job->log_job.jobid = atoi(getenv(CP_JOBID));
my_rank = rank; my_rank = rank;
/* record exe and arguments */ /* record exe and arguments */
......
...@@ -96,6 +96,9 @@ while ($line = <TRACE>) { ...@@ -96,6 +96,9 @@ while ($line = <TRACE>) {
if ($line =~ /^# uid: /) { if ($line =~ /^# uid: /) {
($junk, $uid) = split(':', $line, 2); ($junk, $uid) = split(':', $line, 2);
} }
if ($line =~ /^# jobid: /) {
($junk, $jobid) = split(':', $line, 2);
}
} }
else { else {
# parse line # parse line
...@@ -399,9 +402,9 @@ close TITLE; ...@@ -399,9 +402,9 @@ close TITLE;
open(TABLES, ">$tmp_dir/job-table.tex") || die("error opening output file:$!\n"); open(TABLES, ">$tmp_dir/job-table.tex") || die("error opening output file:$!\n");
print TABLES " print TABLES "
\\begin{tabular}{|p{.63\\columnwidth}|p{.63\\columnwidth}|p{.63\\columnwidth}|} \\begin{tabular}{|p{.47\\columnwidth}|p{.35\\columnwidth}|p{.47\\columnwidth}|p{.6\\columnwidth}|}
\\hline \\hline
uid: $uid \& nprocs: $nprocs \& runtime: $runtime seconds\\\\ jobid: $jobid \& uid: $uid \& nprocs: $nprocs \& runtime: $runtime seconds\\\\
\\hline \\hline
\\end{tabular} \\end{tabular}
"; ";
......
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