Use default of 1 if no cores requested. refs #12026
authorTom Morris <tfmorris@veritasgenetics.com>
Fri, 15 Mar 2019 04:47:38 +0000 (00:47 -0400)
committerTom Morris <tfmorris@veritasgenetics.com>
Thu, 21 Mar 2019 20:00:21 +0000 (16:00 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Morris <tfmorris@veritasgenetics.com>

tools/crunchstat-summary/crunchstat_summary/summarizer.py
tools/crunchstat-summary/tests/container_9tee4-dz642-lymtndkpy39eibk-crunchstat.txt.gz.report
tools/crunchstat-summary/tests/container_9tee4-dz642-lymtndkpy39eibk.txt.gz.report
tools/crunchstat-summary/tests/logfile_20151204190335.txt.gz.report

index 6d1fd918e4c9ab3df68643cb8d2bc25b7f92f5d6..96da98cdd9561cffd92f30d041ee78da60a5b153 100644 (file)
@@ -341,7 +341,9 @@ class Summarizer(object):
         # take average CPU usage into account as well or % time at max
         used_cores = max(1, int(math.ceil(cpu_max_rate)))
         asked_cores = self.existing_constraints.get(constraint_key)
-        if asked_cores is None or used_cores < asked_cores:
+        if asked_cores is None:
+            asked_cores = 1
+        if used_cores < asked_cores:
             yield (
                 '#!! {} max CPU usage was {}% -- '
                 'try runtime_constraints "{}":{}'
index b61da154ffbdfd720ce2f69d1ee76e01cf2b687a..3f53126e63fd1fd937d6d854fc26aaeb38127c4c 100644 (file)
@@ -23,5 +23,4 @@ time  elapsed 20      -       20
 # Max network speed in a single interval: 0.00MB/s
 # Keep cache miss rate 0.00%
 # Keep cache utilization 0.00%
-#!! container max CPU usage was 24% -- try runtime_constraints "vcpus":1
 #!! container max RSS was 67 MiB -- try runtime_constraints "ram":1020054732
index 9d3cd78d3f81f88239b1521c9a530b7898686e60..3b0d6a3f7b9729d7b7d0b846d4f091c7e4f458dc 100644 (file)
@@ -34,5 +34,4 @@ time  elapsed 20      -       20
 # Max network speed in a single interval: 0.00MB/s
 # Keep cache miss rate 0.00%
 # Keep cache utilization 0.00%
-#!! container max CPU usage was 24% -- try runtime_constraints "vcpus":1
 #!! container max RSS was 67 MiB -- try runtime_constraints "ram":1020054732
index f0a60957bba706b18b6d41288f5fc46ded754b1c..eee771519646c446f16c1f124ba5fec9a534339e 100644 (file)
@@ -31,5 +31,4 @@ time  elapsed 80      -       80
 # Max network speed in a single interval: 42.58MB/s
 # Keep cache miss rate 0.00%
 # Keep cache utilization 0.00%
-#!! 4xphq-8i9sb-jq0ekny1xou3zoh max CPU usage was 13% -- try runtime_constraints "min_cores_per_node":1
 #!! 4xphq-8i9sb-jq0ekny1xou3zoh max RSS was 334 MiB -- try runtime_constraints "min_ram_mb_per_node":972