|
Lines 40-45
Link Here
|
| 40 |
# include "config.h" |
40 |
# include "config.h" |
| 41 |
#endif |
41 |
#endif |
| 42 |
|
42 |
|
|
|
43 |
#if HAVE_FLOAT_H |
| 44 |
# include <float.h> |
| 45 |
#endif |
| 43 |
#if HAVE_STDINT_H |
46 |
#if HAVE_STDINT_H |
| 44 |
# include <stdint.h> |
47 |
# include <stdint.h> |
| 45 |
#endif |
48 |
#endif |
|
Lines 49-54
Link Here
|
| 49 |
#ifdef WITH_PTHREADS |
52 |
#ifdef WITH_PTHREADS |
| 50 |
# include <pthread.h> |
53 |
# include <pthread.h> |
| 51 |
#endif /* WITH_PTHREADS */ |
54 |
#endif /* WITH_PTHREADS */ |
|
|
55 |
#if HAVE_VALUES_H |
| 56 |
# include <values.h> |
| 57 |
#endif |
| 52 |
|
58 |
|
| 53 |
#include <sys/stat.h> |
59 |
#include <sys/stat.h> |
| 54 |
#include <stdio.h> |
60 |
#include <stdio.h> |
|
Lines 1015-1023
static void *_decay_thread(void *no_data)
Link Here
|
| 1015 |
|
1021 |
|
| 1016 |
if (run_delta <= 0) |
1022 |
if (run_delta <= 0) |
| 1017 |
goto get_usage; |
1023 |
goto get_usage; |
| 1018 |
|
1024 |
real_decay = pow(decay_factor, (double)run_delta); |
| 1019 |
real_decay = pow(decay_factor, run_delta); |
1025 |
#ifdef DBL_MIN |
| 1020 |
|
1026 |
if (real_decay <= DBL_MIN) |
|
|
1027 |
real_decay = DBL_MIN; |
| 1028 |
#endif |
| 1021 |
if (priority_debug) |
1029 |
if (priority_debug) |
| 1022 |
info("Decay factor over %g seconds goes " |
1030 |
info("Decay factor over %g seconds goes " |
| 1023 |
"from %.15f -> %.15f", |
1031 |
"from %.15f -> %.15f", |
|
Lines 1025-1031
static void *_decay_thread(void *no_data)
Link Here
|
| 1025 |
|
1033 |
|
| 1026 |
/* first apply decay to used time */ |
1034 |
/* first apply decay to used time */ |
| 1027 |
if (_apply_decay(real_decay) != SLURM_SUCCESS) { |
1035 |
if (_apply_decay(real_decay) != SLURM_SUCCESS) { |
| 1028 |
error("problem applying decay"); |
1036 |
error("priority/multifactor: problem applying decay"); |
| 1029 |
running_decay = 0; |
1037 |
running_decay = 0; |
| 1030 |
slurm_mutex_unlock(&decay_lock); |
1038 |
slurm_mutex_unlock(&decay_lock); |
| 1031 |
break; |
1039 |
break; |