My program is showing a CPU running time longer than the time the program was actually running, with no parallelization written in the code.
The code is written mostly in Fortran 90 (there's one or two later-Fortran things I added in) and compiled with my Linux machine's native gfortran
compiler (--version
information: GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) ). I understand that gfortran
compiles to later standards than 90.
When the program starts it calls call cpu_time(time_start)
and before it ended it calls call cpu_time(time_end)
. In this case, time_end - time_start
gives elapsed CPU time in seconds.
So here's the curious thing: I used HTCondor to submit my code to run on whatever machine in my local network had an available CPU. My HTCondor log files show the job was submitted 07/24 14:17:46, started running 15 seconds later, then ran to completion on that same machine, ending 07/30 11:01:52, a clock time of less than six days. However, the time_end - time_start
says that the CPU time was 993535 seconds, or over 11 days. My code is not parallelized at all so I do not understand how this can be. How can this be?
I've ran this code hundreds of times before and never noticed this phenomenon, however I've never checked closely either.
Edit: I wish to note once again that my code is not parallelized, at least not explicitly. I do compiled with the -O3
flag, but I don't think this introduces parallelization. If the linked question/answer about parallel Fortran does indeed answer my question about a serial process, please help me understand how because I do not see the connection.
My HTCondor submission script is as follows. I condor_submit
this script and that's how I run the code.
executable = /path/to/executable
universe = standard
log = condorlog.log
output = condorstdout.out
error = condorerror.out
should_transfer_files = IF_NEEDED
when_to_transfer_output = ON_EXIT
queue