diff --git a/configs/jureptool/config.yml b/configs/jureptool/config.yml
index 4137ac8..dc1702f 100644
--- a/configs/jureptool/config.yml
+++ b/configs/jureptool/config.yml
@@ -1,12 +1,13 @@
# Copyright (c) 2023 Forschungszentrum Juelich GmbH.
-# This file is part of LLview.
+# This file is part of LLview.
#
# This is an open source software distributed under the GPLv3 license. More information see the LICENSE file at the top level.
#
# Contributions must follow the Contributor License Agreement. More information see the CONTRIBUTING.md file at the top level.
#
# Contributors:
-# Filipe Guimarães (Forschungszentrum Juelich GmbH)
+# Filipe Guimarães (Forschungszentrum Juelich GmbH)
+# Matthias Lapu (CEA)
# Timezone name (a list can be found in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
timezone: 'Europe/Berlin'
@@ -17,6 +18,17 @@ timezone: 'Europe/Berlin'
# - removals can be done with: (string_to_remove)
hostname: 'https://llview.fz-juelich.de/#system(-dc)[ ,_]#'
+# JURI uses Jureptool to create html and pdf reports
+# Jureptool relies on plotly and jquery to build the html pages
+# The required javascript files for plotly and jquery are located in:
+# JURI/js/ext, (https://github.com/FZJ-JSC/JURI/tree/main/js/ext)
+# Moreover, Content Delivery Network (CDN) can also be used
+# ex :
+# jquery_location: 'https://code.jquery.com/jquery-3.6.0.min.js'
+# plotly_location: 'https://cdn.plot.ly/plotly-latest.min.js'
+plotly_location: null
+jquery_location: null
+
#Folder prefix to be added to items in plotlists file
folder_prefix: '$LLVIEW_DATA/$LLVIEW_SYSTEMNAME/tmp/jobreport/data/'
diff --git a/jureptool/README.md b/jureptool/README.md
index 8819ae0..382ca22 100644
--- a/jureptool/README.md
+++ b/jureptool/README.md
@@ -35,7 +35,7 @@ Options that can be passed via SLURM `--comment` flag:
### Usage:
```
-usage: main.py [-h] [--daemon] [--demo] [--nomove] [--nohtml] [--gzip] [--plotlyjs PLOTLYJS] [--maxjobs MAXJOBS] [--maxsec MAXSEC] [--shutdown SHUTDOWN [SHUTDOWN ...]]
+usage: main.py [-h] [--daemon] [--demo] [--nomove] [--nohtml] [--gzip] [--maxjobs MAXJOBS] [--maxsec MAXSEC] [--shutdown SHUTDOWN [SHUTDOWN ...]]
[--nprocs NPROCS] [--loglevel LOGLEVEL] [--logprefix LOGPREFIX] [--configfolder CONFIGFOLDER] [--outfolder OUTFOLDER] [--semail SEMAIL] [--remail REMAIL]
file [file ...]
@@ -51,7 +51,6 @@ optional arguments:
--nomove Don't copy files to final location
--nohtml Deactivate generation of HTML
--gzip Compress HTML using gzip
- --plotlyjs PLOTLYJS Location of the 'plotly.min.js' file (default: 'cdn')
--maxjobs MAXJOBS Maximum number of jobs to process (default: MAXJOBS=10000)
--maxsec MAXSEC Filter date range with maximum seconds range (default: no filter)
--shutdown SHUTDOWN [SHUTDOWN ...]
@@ -96,3 +95,180 @@ rm -fr ~/.cache/matplotlib
(on MacOs, matplotlib's cache folder is `~/.matplotlib`.)
+### Expected file
+
+JuRepTool uses `.json` to create PDF and HTML. The expected `.json` files are as follows:
+
+```json
+{
+ "cpu": {
+ "currentwatts_avg": null,
+ "currentwatts_max": null,
+ "currentwatts_min": null,
+ "load_avg": null,
+ "load_max": null,
+ "load_min": null,
+ "usage_avg": null,
+ "usage_max": null,
+ "usage_min": null,
+ "used_cores_avg": null,
+ "used_cores_logic_avg": null,
+ "used_cores_logic_max": null,
+ "used_cores_logic_min": null,
+ "used_cores_max": null,
+ "used_cores_min": null,
+ "used_cores_phys_avg": null,
+ "used_cores_phys_max": null,
+ "used_cores_phys_min": null,
+ "used_mem_avg": null,
+ "used_mem_max": null,
+ "used_mem_min": null
+ },
+
+ "fabric": {
+ "mbin_avg": null,
+ "mbin_max": null,
+ "mbin_min": null,
+ "mbout_avg": null,
+ "mbout_max": null,
+ "mbout_min": null,
+ "pckin_avg": null,
+ "pckin_max": null,
+ "pckin_min": null,
+ "pckout_avg": null,
+ "pckout_max": null,
+ "pckout_min": null
+ },
+
+ "files": {
+ "coreusagenodefile": "",
+ "fabricnodefile": "",
+ "fsallnodefile": "",
+ "fsfastdatanodefile": "",
+ "fshomenodefile": "",
+ "fsprojectnodefile": "",
+ "fsscratchnodefile": "",
+ "gpunodefile": "",
+ "htmlfile": "",
+ "jmcfile": "",
+ "loadmemnodefile": "",
+ "pdffile": ""
+ },
+
+ "fs": {
+ "fs_all_Mbr_sum": null,
+ "fs_all_MbrR_max": null,
+ "fs_all_Mbw_sum": null,
+ "fs_all_MbwR_max": null,
+ "fs_all_ocR_max": null,
+
+ "fs_fastdata_Mbr_sum": null,
+ "fs_fastdata_MbrR_max": null,
+ "fs_fastdata_Mbw_sum": null,
+ "fs_fastdata_MbwR_max": null,
+ "fs_fastdata_ocR_max": null,
+
+ "fs_home_Mbr_sum": null,
+ "fs_home_MbrR_max": null,
+ "fs_home_Mbw_sum": null,
+ "fs_home_MbwR_max": null,
+ "fs_home_ocR_max": null,
+
+ "fs_project_Mbr_sum": null,
+ "fs_project_MbrR_max": null,
+ "fs_project_Mbw_sum": null,
+ "fs_project_MbwR_max": null,
+ "fs_project_ocR_max": null,
+
+ "fs_scratch_Mbr_sum": null,
+ "fs_scratch_MbrR_max": null,
+ "fs_scratch_Mbw_sum": null,
+ "fs_scratch_MbwR_max": null,
+ "fs_scratch_ocR_max": null
+ },
+
+ "gpu": {
+ "gpu_active_avg": null,
+ "gpu_clk_max": null,
+ "gpu_memu_avg": null,
+ "gpu_memu_max": null,
+ "gpu_memur_avg": null,
+ "gpu_pu_avg": null,
+ "gpu_pu_max": null,
+ "gpu_sclk_max": null,
+ "gpu_temp_avg": null,
+ "gpu_temp_max": null,
+ "gpu_util_avg": null,
+ "gpulist": "",
+ "gpuspec": ""
+ },
+
+ "IC": {
+ "icgroupmap": ""
+ },
+
+ "jmc": {
+ "descs": "",
+ "maximums": "",
+ "minimums": "",
+ "names": "",
+ "numvars": 0
+ },
+
+ "job": {
+ "account": "",
+ "command": "",
+ "comment": "",
+ "endedhm": "",
+ "estendtime": "",
+ "finished": null,
+ "jobid": "",
+ "lastupdate": "",
+ "lastupdatets": null,
+ "name": "",
+ "nodelist": "",
+ "numgpus": null,
+ "numnodes": null,
+ "owner": "",
+ "queue": "",
+ "queuedate": "",
+ "runtime": null,
+ "runtimehm": "",
+ "runtimeperc": null,
+ "starttime": "",
+ "system": "",
+ "updatetime": "",
+ "waittime": "",
+ "wallh": null,
+ "wallhm": ""
+ },
+
+ "num_datapoints": {
+ "cores_ndps": null,
+ "fa_ndps": null,
+ "fs_all_ndps": null,
+ "fs_fastdata_ndps": null,
+ "fs_home_ndps": null,
+ "fs_project_ndps": null,
+ "fs_scratch_ndps": null,
+ "gpu_ndps": null,
+ "jmc_ndps": null,
+ "ld_ndps": null
+ },
+
+ "rc": {
+ "errmsgnodes": "",
+ "errmsgs": "",
+ "max_rc": null,
+ "nsteps": null,
+ "numerrnodes": null,
+ "nummsgs": null,
+ "rc_rc": null,
+ "rc_signr": null,
+ "rc_state": "",
+ "rc_wallh": null,
+ "stepspec": ""
+ }
+}
+
+```
\ No newline at end of file
diff --git a/jureptool/src/GenerateHTML.py b/jureptool/src/GenerateHTML.py
index 76eb814..67684fe 100644
--- a/jureptool/src/GenerateHTML.py
+++ b/jureptool/src/GenerateHTML.py
@@ -1,23 +1,24 @@
# Copyright (c) 2023 Forschungszentrum Juelich GmbH.
-# This file is part of LLview.
+# This file is part of LLview.
#
# This is an open source software distributed under the GPLv3 license. More information see the LICENSE file at the top level.
#
# Contributions must follow the Contributor License Agreement. More information see the CONTRIBUTING.md file at the top level.
#
# Contributors:
-# Filipe Guimarães (Forschungszentrum Juelich GmbH)
+# Filipe Guimarães (Forschungszentrum Juelich GmbH)
+# Matthias Lapu (CEA)
from tools import format_float_string,replace_vars
-def CreateHTML( config,
- figs,
- navbar="",
- first="",
- overview="",
- nodelist="",
- timeline="",
- system_report="",
+def CreateHTML( config,
+ figs,
+ navbar="",
+ first="",
+ overview="",
+ nodelist="",
+ timeline="",
+ system_report="",
filename="report.html"):
"""
Collects together various html snippets from separate figures into a single html report page
@@ -28,7 +29,7 @@ def CreateHTML( config,
"""
- html += f"""
+ html += f"""
@@ -777,8 +778,21 @@ def CreateHTML( config,
"""
- html += f" \n"
- html += f" \n"
+
+ # Getting location of plotly
+ if loc := config['appearance'].get('plotly_location'):
+ plotly_path = loc
+ else:
+ plotly_path = f"{replace_vars(config['appearance']['hostname'], config['appearance'])}/js/ext/plotly.min.js"
+ # Getting location of jquery
+ if loc := config['appearance'].get('jquery_location'):
+ jquery_path = loc
+ else:
+ jquery_path = f"{replace_vars(config['appearance']['hostname'], config['appearance'])}/js/ext/jquery.min.js"
+
+ html += f" \n"
+ html += f" \n"
+
html += f"""
Job ID {config['appearance']['jobid']} Report
@@ -843,37 +857,37 @@ def CreateHTML( config,
html += f"""
"""
- copy_link = { 'name': 'Copy link to this graph',
- 'icon': { 'width': 1634,
- 'height': 1634,
- 'path': 'M 1441 434 q 0 40 -28 68 l -208 208 q -28 28 -68 28 q -42 0 -72 -32 q 3 -3 19 -18.5 t 21.5 -21.5 t 15 -19 t 13 -25.5 t 3.5 -27.5 q 0 -40 -28 -68 t -68 -28 q -15 0 -27.5 3.5 t -25.5 13 t -19 15 t -21.5 21.5 t -18.5 19 q -33 -31 -33 -73 q 0 -40 28 -68 l 206 -207 q 27 -27 68 -27 q 40 0 68 26 l 147 146 q 28 28 28 67 z M 738 1139 q 0 40 -28 68 l -206 207 q -28 28 -68 28 q -39 0 -68 -27 l -147 -146 q -28 -28 -28 -67 q 0 -40 28 -68 l 208 -208 q 27 -27 68 -27 q 42 0 72 31 q -3 3 -19 18.5 t -21.5 21.5 t -15 19 t -13 25.5 t -3.5 27.5 q 0 40 28 68 t 68 28 q 15 0 27.5 -3.5 t 25.5 -13 t 19 -15 t 21.5 -21.5 t 18.5 -19 q 33 31 33 73 z M 1633 434 q 0 -120 -85 -203 l -147 -146 q -83 -83 -203 -83 q -121 0 -204 85 l -206 207 q -83 83 -83 203 q 0 123 88 209 l -88 88 q -86 -88 -208 -88 q -120 0 -204 84 l -208 208 q -84 84 -84 204 t 85 203 l 147 146 q 83 83 203 83 q 121 0 204 -85 l 206 -207 q 83 -83 83 -203 q 0 -123 -88 -209 l 88 -88 q 86 88 208 88 q 120 0 204 -84 l 208 -208 q 84 -84 84 -204 z',
- },
- 'attr': 'help',
- 'click': "function() { navigator.clipboard.writeText(`${window.location.href.split('#')[0]}#overview`);}" ,
+ copy_link = { 'name': 'Copy link to this graph',
+ 'icon': { 'width': 1634,
+ 'height': 1634,
+ 'path': 'M 1441 434 q 0 40 -28 68 l -208 208 q -28 28 -68 28 q -42 0 -72 -32 q 3 -3 19 -18.5 t 21.5 -21.5 t 15 -19 t 13 -25.5 t 3.5 -27.5 q 0 -40 -28 -68 t -68 -28 q -15 0 -27.5 3.5 t -25.5 13 t -19 15 t -21.5 21.5 t -18.5 19 q -33 -31 -33 -73 q 0 -40 28 -68 l 206 -207 q 27 -27 68 -27 q 40 0 68 26 l 147 146 q 28 28 28 67 z M 738 1139 q 0 40 -28 68 l -206 207 q -28 28 -68 28 q -39 0 -68 -27 l -147 -146 q -28 -28 -28 -67 q 0 -40 28 -68 l 208 -208 q 27 -27 68 -27 q 42 0 72 31 q -3 3 -19 18.5 t -21.5 21.5 t -15 19 t -13 25.5 t -3.5 27.5 q 0 40 28 68 t 68 28 q 15 0 27.5 -3.5 t 25.5 -13 t 19 -15 t 21.5 -21.5 t 18.5 -19 q 33 31 33 73 z M 1633 434 q 0 -120 -85 -203 l -147 -146 q -83 -83 -203 -83 q -121 0 -204 85 l -206 207 q -83 83 -83 203 q 0 123 88 209 l -88 88 q -86 -88 -208 -88 q -120 0 -204 84 l -208 208 q -84 84 -84 204 t 85 203 l 147 146 q 83 83 203 83 q 121 0 204 -85 l 206 -207 q 83 -83 83 -203 q 0 -123 -88 -209 l 88 -88 q 86 88 208 88 q 120 0 204 -84 l 208 -208 q 84 -84 84 -204 z',
+ },
+ 'attr': 'help',
+ 'click': "function() { navigator.clipboard.writeText(`${window.location.href.split('#')[0]}#overview`);}" ,
}
- help_button = { 'name': '1-min average CPU and GPU usage, averaged over all the nodes/GPUs',
- 'icon': { 'width': 512,
- 'height': 512,
- 'path': 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 336c-18 0-32 14-32 32s13.1 32 32 32c17.1 0 32-14 32-32S273.1 336 256 336zM289.1 128h-51.1C199 128 168 159 168 198c0 13 11 24 24 24s24-11 24-24C216 186 225.1 176 237.1 176h51.1C301.1 176 312 186 312 198c0 8-4 14.1-11 18.1L244 251C236 256 232 264 232 272V288c0 13 11 24 24 24S280 301 280 288V286l45.1-28c21-13 34-36 34-60C360 159 329 128 289.1 128z',
- },
- 'attr': 'help',
- 'click': "function() { window.open('https://apps.fz-juelich.de/jsc/llview/docu/jobreport/metrics_list/', '_blank').focus();}" ,
+ help_button = { 'name': '1-min average CPU and GPU usage, averaged over all the nodes/GPUs',
+ 'icon': { 'width': 512,
+ 'height': 512,
+ 'path': 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 336c-18 0-32 14-32 32s13.1 32 32 32c17.1 0 32-14 32-32S273.1 336 256 336zM289.1 128h-51.1C199 128 168 159 168 198c0 13 11 24 24 24s24-11 24-24C216 186 225.1 176 237.1 176h51.1C301.1 176 312 186 312 198c0 8-4 14.1-11 18.1L244 251C236 256 232 264 232 272V288c0 13 11 24 24 24S280 301 280 288V286l45.1-28c21-13 34-36 34-60C360 159 329 128 289.1 128z',
+ },
+ 'attr': 'help',
+ 'click': "function() { window.open('https://apps.fz-juelich.de/jsc/llview/docu/jobreport/metrics_list/', '_blank').focus();}" ,
}
datafile=f"{config['appearance']['system']}-{config['appearance']['jobid']}-overview.json"
- download_data_button = {'name': 'Download data',
- 'icon': { 'width': 514,
- 'height': 514,
- 'path': 'M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z',
- },
- 'attr': 'download',
- 'click': "function(gd) { download('"+datafile+"', [(({ name, x, y }) => ({ name, x, y }))(gd.data[1]), (({ name, x, y }) => ({ name, x, y }))(gd.data[3])] );}" ,
+ download_data_button = {'name': 'Download data',
+ 'icon': { 'width': 514,
+ 'height': 514,
+ 'path': 'M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z',
+ },
+ 'attr': 'download',
+ 'click': "function(gd) { download('"+datafile+"', [(({ name, x, y }) => ({ name, x, y }))(gd.data[1]), (({ name, x, y }) => ({ name, x, y }))(gd.data[3])] );}" ,
}
- html += overview.to_html( include_plotlyjs=False,
- full_html=False,
- config={'displaylogo': False,
+ html += overview.to_html( include_plotlyjs=False,
+ full_html=False,
+ config={'displaylogo': False,
# 'displayModeBar': True,
- 'modeBarButtons': [ [copy_link, help_button, "zoom2d", "pan2d", "zoomIn2d", "zoomOut2d", "resetScale2d",download_data_button] ],
- },
+ 'modeBarButtons': [ [copy_link, help_button, "zoom2d", "pan2d", "zoomIn2d", "zoomOut2d", "resetScale2d",download_data_button] ],
+ },
div_id='overview_plot').replace('"function','function').replace(';}"}','; }}') #.replace('"function(gd)','function(gd)').replace('(gd.data[3])] );}"','(gd.data[3])] );}')
html += f"""
@@ -891,38 +905,38 @@ def CreateHTML( config,
html += f"""
"""
- copy_link = { 'name': 'Copy link to this graph',
- 'icon': { 'width': 1634,
- 'height': 1634,
- 'path': 'M 1441 434 q 0 40 -28 68 l -208 208 q -28 28 -68 28 q -42 0 -72 -32 q 3 -3 19 -18.5 t 21.5 -21.5 t 15 -19 t 13 -25.5 t 3.5 -27.5 q 0 -40 -28 -68 t -68 -28 q -15 0 -27.5 3.5 t -25.5 13 t -19 15 t -21.5 21.5 t -18.5 19 q -33 -31 -33 -73 q 0 -40 28 -68 l 206 -207 q 27 -27 68 -27 q 40 0 68 26 l 147 146 q 28 28 28 67 z M 738 1139 q 0 40 -28 68 l -206 207 q -28 28 -68 28 q -39 0 -68 -27 l -147 -146 q -28 -28 -28 -67 q 0 -40 28 -68 l 208 -208 q 27 -27 68 -27 q 42 0 72 31 q -3 3 -19 18.5 t -21.5 21.5 t -15 19 t -13 25.5 t -3.5 27.5 q 0 40 28 68 t 68 28 q 15 0 27.5 -3.5 t 25.5 -13 t 19 -15 t 21.5 -21.5 t 18.5 -19 q 33 31 33 73 z M 1633 434 q 0 -120 -85 -203 l -147 -146 q -83 -83 -203 -83 q -121 0 -204 85 l -206 207 q -83 83 -83 203 q 0 123 88 209 l -88 88 q -86 -88 -208 -88 q -120 0 -204 84 l -208 208 q -84 84 -84 204 t 85 203 l 147 146 q 83 83 203 83 q 121 0 204 -85 l 206 -207 q 83 -83 83 -203 q 0 -123 -88 -209 l 88 -88 q 86 88 208 88 q 120 0 204 -84 l 208 -208 q 84 -84 84 -204 z',
- },
- 'attr': 'help',
- 'click': f"function() {{ navigator.clipboard.writeText(`${{window.location.href.split('#')[0]}}#{id}`);}}" ,
+ copy_link = { 'name': 'Copy link to this graph',
+ 'icon': { 'width': 1634,
+ 'height': 1634,
+ 'path': 'M 1441 434 q 0 40 -28 68 l -208 208 q -28 28 -68 28 q -42 0 -72 -32 q 3 -3 19 -18.5 t 21.5 -21.5 t 15 -19 t 13 -25.5 t 3.5 -27.5 q 0 -40 -28 -68 t -68 -28 q -15 0 -27.5 3.5 t -25.5 13 t -19 15 t -21.5 21.5 t -18.5 19 q -33 -31 -33 -73 q 0 -40 28 -68 l 206 -207 q 27 -27 68 -27 q 40 0 68 26 l 147 146 q 28 28 28 67 z M 738 1139 q 0 40 -28 68 l -206 207 q -28 28 -68 28 q -39 0 -68 -27 l -147 -146 q -28 -28 -28 -67 q 0 -40 28 -68 l 208 -208 q 27 -27 68 -27 q 42 0 72 31 q -3 3 -19 18.5 t -21.5 21.5 t -15 19 t -13 25.5 t -3.5 27.5 q 0 40 28 68 t 68 28 q 15 0 27.5 -3.5 t 25.5 -13 t 19 -15 t 21.5 -21.5 t 18.5 -19 q 33 31 33 73 z M 1633 434 q 0 -120 -85 -203 l -147 -146 q -83 -83 -203 -83 q -121 0 -204 85 l -206 207 q -83 83 -83 203 q 0 123 88 209 l -88 88 q -86 -88 -208 -88 q -120 0 -204 84 l -208 208 q -84 84 -84 204 t 85 203 l 147 146 q 83 83 203 83 q 121 0 204 -85 l 206 -207 q 83 -83 83 -203 q 0 -123 -88 -209 l 88 -88 q 86 88 208 88 q 120 0 204 -84 l 208 -208 q 84 -84 84 -204 z',
+ },
+ 'attr': 'help',
+ 'click': f"function() {{ navigator.clipboard.writeText(`${{window.location.href.split('#')[0]}}#{id}`);}}" ,
}
- help_button = { 'name': config['plots'][systype.replace("$",r"\$")][title]['description'],
- 'icon': { 'width': 512,
- 'height': 512,
- 'path': 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 336c-18 0-32 14-32 32s13.1 32 32 32c17.1 0 32-14 32-32S273.1 336 256 336zM289.1 128h-51.1C199 128 168 159 168 198c0 13 11 24 24 24s24-11 24-24C216 186 225.1 176 237.1 176h51.1C301.1 176 312 186 312 198c0 8-4 14.1-11 18.1L244 251C236 256 232 264 232 272V288c0 13 11 24 24 24S280 301 280 288V286l45.1-28c21-13 34-36 34-60C360 159 329 128 289.1 128z',
- },
- 'attr': 'help',
- 'click': "function() { window.open('https://apps.fz-juelich.de/jsc/llview/docu/jobreport/metrics_list/', '_blank').focus();}" ,
+ help_button = { 'name': config['plots'][systype.replace("$",r"\$")][title]['description'],
+ 'icon': { 'width': 512,
+ 'height': 512,
+ 'path': 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 336c-18 0-32 14-32 32s13.1 32 32 32c17.1 0 32-14 32-32S273.1 336 256 336zM289.1 128h-51.1C199 128 168 159 168 198c0 13 11 24 24 24s24-11 24-24C216 186 225.1 176 237.1 176h51.1C301.1 176 312 186 312 198c0 8-4 14.1-11 18.1L244 251C236 256 232 264 232 272V288c0 13 11 24 24 24S280 301 280 288V286l45.1-28c21-13 34-36 34-60C360 159 329 128 289.1 128z',
+ },
+ 'attr': 'help',
+ 'click': "function() { window.open('https://apps.fz-juelich.de/jsc/llview/docu/jobreport/metrics_list/', '_blank').focus();}" ,
}
datafile=f"{config['appearance']['system']}-{config['appearance']['jobid']}-{id.lower()}.json"
- download_data_button = {'name': 'Download data',
- 'icon': { 'width': 514,
- 'height': 514,
- 'path': 'M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z',
- },
- 'attr': 'download',
- 'click': "function(gd) { download('"+datafile+"', [(({ name, x, y, z }) => ({ name, x, y, z }))(gd.data[2])] );}" ,
+ download_data_button = {'name': 'Download data',
+ 'icon': { 'width': 514,
+ 'height': 514,
+ 'path': 'M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z',
+ },
+ 'attr': 'download',
+ 'click': "function(gd) { download('"+datafile+"', [(({ name, x, y, z }) => ({ name, x, y, z }))(gd.data[2])] );}" ,
}
- html += graph['graph'].to_html( include_plotlyjs=False,
- full_html=False,
- config={'displaylogo': False,
+ html += graph['graph'].to_html( include_plotlyjs=False,
+ full_html=False,
+ config={'displaylogo': False,
# 'displayModeBar': True,
- 'modeBarButtons': [ [copy_link, help_button, "zoom2d", "pan2d", "zoomIn2d", "zoomOut2d", "resetScale2d",download_data_button] ],
- },
+ 'modeBarButtons': [ [copy_link, help_button, "zoom2d", "pan2d", "zoomIn2d", "zoomOut2d", "resetScale2d",download_data_button] ],
+ },
div_id=id+('_time_plot' if graph['x']=='ts' else '_plot')).replace('"function','function').replace(';}"}','; }}')
html += f"""
@@ -944,38 +958,38 @@ def CreateHTML( config,
"""
- copy_link = { 'name': 'Copy link to this graph',
- 'icon': { 'width': 1634,
- 'height': 1634,
- 'path': 'M 1441 434 q 0 40 -28 68 l -208 208 q -28 28 -68 28 q -42 0 -72 -32 q 3 -3 19 -18.5 t 21.5 -21.5 t 15 -19 t 13 -25.5 t 3.5 -27.5 q 0 -40 -28 -68 t -68 -28 q -15 0 -27.5 3.5 t -25.5 13 t -19 15 t -21.5 21.5 t -18.5 19 q -33 -31 -33 -73 q 0 -40 28 -68 l 206 -207 q 27 -27 68 -27 q 40 0 68 26 l 147 146 q 28 28 28 67 z M 738 1139 q 0 40 -28 68 l -206 207 q -28 28 -68 28 q -39 0 -68 -27 l -147 -146 q -28 -28 -28 -67 q 0 -40 28 -68 l 208 -208 q 27 -27 68 -27 q 42 0 72 31 q -3 3 -19 18.5 t -21.5 21.5 t -15 19 t -13 25.5 t -3.5 27.5 q 0 40 28 68 t 68 28 q 15 0 27.5 -3.5 t 25.5 -13 t 19 -15 t 21.5 -21.5 t 18.5 -19 q 33 31 33 73 z M 1633 434 q 0 -120 -85 -203 l -147 -146 q -83 -83 -203 -83 q -121 0 -204 85 l -206 207 q -83 83 -83 203 q 0 123 88 209 l -88 88 q -86 -88 -208 -88 q -120 0 -204 84 l -208 208 q -84 84 -84 204 t 85 203 l 147 146 q 83 83 203 83 q 121 0 204 -85 l 206 -207 q 83 -83 83 -203 q 0 -123 -88 -209 l 88 -88 q 86 88 208 88 q 120 0 204 -84 l 208 -208 q 84 -84 84 -204 z',
- },
- 'attr': 'help',
- 'click': "function() { navigator.clipboard.writeText(`${window.location.href.split('#')[0]}#timeline`);}" ,
+ copy_link = { 'name': 'Copy link to this graph',
+ 'icon': { 'width': 1634,
+ 'height': 1634,
+ 'path': 'M 1441 434 q 0 40 -28 68 l -208 208 q -28 28 -68 28 q -42 0 -72 -32 q 3 -3 19 -18.5 t 21.5 -21.5 t 15 -19 t 13 -25.5 t 3.5 -27.5 q 0 -40 -28 -68 t -68 -28 q -15 0 -27.5 3.5 t -25.5 13 t -19 15 t -21.5 21.5 t -18.5 19 q -33 -31 -33 -73 q 0 -40 28 -68 l 206 -207 q 27 -27 68 -27 q 40 0 68 26 l 147 146 q 28 28 28 67 z M 738 1139 q 0 40 -28 68 l -206 207 q -28 28 -68 28 q -39 0 -68 -27 l -147 -146 q -28 -28 -28 -67 q 0 -40 28 -68 l 208 -208 q 27 -27 68 -27 q 42 0 72 31 q -3 3 -19 18.5 t -21.5 21.5 t -15 19 t -13 25.5 t -3.5 27.5 q 0 40 28 68 t 68 28 q 15 0 27.5 -3.5 t 25.5 -13 t 19 -15 t 21.5 -21.5 t 18.5 -19 q 33 31 33 73 z M 1633 434 q 0 -120 -85 -203 l -147 -146 q -83 -83 -203 -83 q -121 0 -204 85 l -206 207 q -83 83 -83 203 q 0 123 88 209 l -88 88 q -86 -88 -208 -88 q -120 0 -204 84 l -208 208 q -84 84 -84 204 t 85 203 l 147 146 q 83 83 203 83 q 121 0 204 -85 l 206 -207 q 83 -83 83 -203 q 0 -123 -88 -209 l 88 -88 q 86 88 208 88 q 120 0 204 -84 l 208 -208 q 84 -84 84 -204 z',
+ },
+ 'attr': 'help',
+ 'click': "function() { navigator.clipboard.writeText(`${window.location.href.split('#')[0]}#timeline`);}" ,
}
- help_button = { 'name': 'Timeline containing all the steps in a job. A step can be clicked to focus. When zoom-lock is selected, syncs zoom between all graphs.',
- 'icon': { 'width': 512,
- 'height': 512,
- 'path': 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 336c-18 0-32 14-32 32s13.1 32 32 32c17.1 0 32-14 32-32S273.1 336 256 336zM289.1 128h-51.1C199 128 168 159 168 198c0 13 11 24 24 24s24-11 24-24C216 186 225.1 176 237.1 176h51.1C301.1 176 312 186 312 198c0 8-4 14.1-11 18.1L244 251C236 256 232 264 232 272V288c0 13 11 24 24 24S280 301 280 288V286l45.1-28c21-13 34-36 34-60C360 159 329 128 289.1 128z',
- },
- 'attr': 'help',
- 'click': "function() { window.open('https://apps.fz-juelich.de/jsc/llview/docu/jobreport/metrics_list/', '_blank').focus();}" ,
+ help_button = { 'name': 'Timeline containing all the steps in a job. A step can be clicked to focus. When zoom-lock is selected, syncs zoom between all graphs.',
+ 'icon': { 'width': 512,
+ 'height': 512,
+ 'path': 'M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 336c-18 0-32 14-32 32s13.1 32 32 32c17.1 0 32-14 32-32S273.1 336 256 336zM289.1 128h-51.1C199 128 168 159 168 198c0 13 11 24 24 24s24-11 24-24C216 186 225.1 176 237.1 176h51.1C301.1 176 312 186 312 198c0 8-4 14.1-11 18.1L244 251C236 256 232 264 232 272V288c0 13 11 24 24 24S280 301 280 288V286l45.1-28c21-13 34-36 34-60C360 159 329 128 289.1 128z',
+ },
+ 'attr': 'help',
+ 'click': "function() { window.open('https://apps.fz-juelich.de/jsc/llview/docu/jobreport/metrics_list/', '_blank').focus();}" ,
}
datafile=f"{config['appearance']['system']}-{config['appearance']['jobid']}-timeline.json"
- download_data_button = {'name': 'Download data',
- 'icon': { 'width': 514,
- 'height': 514,
- 'path': 'M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z',
- },
- 'attr': 'download',
- 'click': "function(gd) { download('"+datafile+"', gd.data[0].x.map((_, i) => ({ start_time: gd.data[0].base[i], duration: gd.data[0].x[i], step: gd.data[0].y[i], info: gd.data[0].hovertext[i] })) );}",
+ download_data_button = {'name': 'Download data',
+ 'icon': { 'width': 514,
+ 'height': 514,
+ 'path': 'M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z',
+ },
+ 'attr': 'download',
+ 'click': "function(gd) { download('"+datafile+"', gd.data[0].x.map((_, i) => ({ start_time: gd.data[0].base[i], duration: gd.data[0].x[i], step: gd.data[0].y[i], info: gd.data[0].hovertext[i] })) );}",
}
- html += timeline.to_html( include_plotlyjs=False,
- full_html=False,
- config={'displaylogo': False,
+ html += timeline.to_html( include_plotlyjs=False,
+ full_html=False,
+ config={'displaylogo': False,
# 'displayModeBar': True,
- 'modeBarButtons': [ [copy_link, help_button, "zoom2d", "pan2d", "zoomIn2d", "zoomOut2d", "resetScale2d", download_data_button] ],
- },
+ 'modeBarButtons': [ [copy_link, help_button, "zoom2d", "pan2d", "zoomIn2d", "zoomOut2d", "resetScale2d", download_data_button] ],
+ },
div_id='timeline_plot').replace('"function','function').replace(';}"}','; }}') #.replace('"function(gd)','function(gd)').replace('(gd.data[3])] );}"','(gd.data[3])] );}')
html += f"""
@@ -1014,7 +1028,7 @@ def CreateNodelist(config,gpus,nl_config,nodedict,error_nodes):
nodelist = ""
numgpu = 0
for idx,(node, specs) in enumerate(nodedict.items()):
- try:
+ try:
ic = list(specs['IC'].keys())[0]
color = list(specs['IC'].values())[0]
color = list(255*x for x in color)
@@ -1163,7 +1177,7 @@ def CreateFirstTables(data,config,num_cpus,num_gpus,gpus,ierr):
pck/s
-"""
+"""
if gpus:
tables += f"""
Job Size, #GPUs:
@@ -1215,7 +1229,7 @@ def CreateFirstTables(data,config,num_cpus,num_gpus,gpus,ierr):
"""
tables += f"""
-"""
+"""
if gpus:
tables += f"""
@@ -1250,8 +1264,8 @@ def CreateFirstTables(data,config,num_cpus,num_gpus,gpus,ierr):
elif ('FAIL' in data['rc']['rc_state']):
color = 'red'
else:
- color = 'goldenrod'
-
+ color = 'goldenrod'
+
tables += f"""
@@ -1275,7 +1289,7 @@ def CreateFirstTables(data,config,num_cpus,num_gpus,gpus,ierr):
This job has used approximately: {num_cpus} nodes × {config['system'][data['job']['system'].upper()][data["job"]["queue"]]['cores']} cores × {float(data['job']['runtime']):.3f} hours = {num_cpus*config['system'][data['job']['system'].upper()][data["job"]["queue"]]['cores']*float(data['job']['runtime']):.2f} core-h
"""
- if config['energy']:
+ if config['energy']:
tables += f"""
Estimated energy used by this job, integrated from the node power snapshots: {data['energy']['en_nd_all_sum']:.2f} M-Joules = {data['energy']['en_nd_all_sum']*0.2778:.2f} kWh
@@ -1296,7 +1310,7 @@ def CreateFirstTables(data,config,num_cpus,num_gpus,gpus,ierr):
This job has used approximately {num_cpus} nodes × {config['system'][data['job']['system'].upper()][data["job"]["queue"]]['cores']} cores × {float(data['job']['runtime']):.3f} hours = {num_cpus*config['system'][data['job']['system'].upper()][data["job"]["queue"]]['cores']*float(data['job']['runtime']):.2f} core-h up to now
"""
- if config['energy']:
+ if config['energy']:
tables += f"""
Estimated energy used by this job up to now, integrated from the node power snapshots: {data['energy']['en_nd_all_sum']:.2f} M-Joules = {data['energy']['en_nd_all_sum']*0.2778:.2f} kWh