Does pbs_sched work correctly if holidays continue over 7 days?
When I was investigating another bug (see Wrong holidays file makes scheduler infinite loop),
I found the following code snippets in prime.c, at line 511.
static time_t
end_prime_status_rec(time_t start, time_t date,
enum prime_time prime_status)
{
struct tm *tmptr;
enum days day;
/* base case: if we're more then 7 days out the current prime status will
* never end. We know this because the only prime settings are weekly.
*/
if (date > start + (7 * 24 * 60 * 60))
return (time_t) SCHD_INFINITY;
Then, I have question.
If holidays continues over 7 days,
is it work correctly?
For example, this year 2019, In Japan:
(..snip..)
119 Apr 29 Showa Day (昭和の日)
120 Apr 30 National holiday (*1) (国民の休日)
121 May 1 Emperor Coronation (*2) (即位の日)
122 May 2 National holiday (*1) (国民の休日)
123 May 3 Constitution Memorial Day (憲法記念日)
124 May 4 Greenery Day (みどりの日)
125 May 5 Children's Day (こどもの日)
126 May 6 Holiday falls on a sunday, it is observed on the monday after (振替休日)
(..snip..)
(*1) Under Japanese law, a weekday between two holidays becomes "National holiday".
(*2) This holiday is carried out specially only in 2019, by the replacement of the Emperor.
(Japanese in brackets is an official name of holiday, please ignore it. On the left side of bracket,
I translated to English, but unofficially.)
In Japan, from 2019/04/26(Sat) to 2019/05/06 (mon),
non-weekday (i.e., non-prime time) continues 10 days.
And then, from 2019/05/07 (tue), it begins weekday (prime time) again.
Assuming that the head of holidays file as follows:
YEAR 2019
*
* Prime/Nonprime Table
*
* Prime Non-Prime
* Day Start Start
*
weekday 0600 1730
saturday none all
sunday none all
(...snip...)
If somebody write holidays setting like above,
does scheduler work correctly, or we see some troubles?
Excuse, I don’t have investigated above situation, so I don’t know what happens.
I sorry, but I don’t use holidays settings in our cluster, hence this is not important for us.
However, perhaps other organization uses this configuration.
Thank you.