Open jbarber opened 10 years ago
In order to get walltime remaining there must be a walltime set on a job. If you use the default setup for Torque the batch queue has the resources_default.walltime attribute set. This adds the walltime to the job. If you submit jobs to a queue that do not have a walltime set or if you do not pass a walltime into the job there will be no walltime_remaining attribute returned
My point was that it isn't possible to get just the walltime.remaining attribute of a job - at least with the versions I tested.
It's not possible to request just the Walltime.Remaining attribute for a job using the pbs_statjob() function. This is problematic if a user of the API is only interested in the remaining walltime for all selectable jobs.
For example, the following code returns the error message "Undefined attribute":
Requesting all attributes (with a NULL pointer instead of *attr) returns the Walltime.Remaining.
Tested with 4.5.0 and 2.5 on RHEL6 x86_64.