Commit c421c4fc authored by Emre Ahmetcik's avatar Emre Ahmetcik
Browse files

included time estimate ...

parent f4c28ab8
...@@ -927,8 +927,8 @@ ...@@ -927,8 +927,8 @@
"state": {}, "state": {},
"selectedType": "BeakerDisplay", "selectedType": "BeakerDisplay",
"pluginName": "IPython", "pluginName": "IPython",
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D", "shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"elapsedTime": 4175 "elapsedTime": 4316
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 361, "lineCount": 361,
...@@ -974,9 +974,9 @@ ...@@ -974,9 +974,9 @@
"state": {}, "state": {},
"selectedType": "Hidden", "selectedType": "Hidden",
"pluginName": "IPython", "pluginName": "IPython",
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D", "shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"height": 117, "height": 117,
"elapsedTime": 533 "elapsedTime": 535
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 27, "lineCount": 27,
...@@ -988,33 +988,46 @@ ...@@ -988,33 +988,46 @@
"evaluator": "IPython", "evaluator": "IPython",
"input": { "input": {
"body": [ "body": [
"def calculation_time_warning(feature_space_size, l0_steps):", "import math",
"",
"def calculation_time_warning(feature_space_size, l0_steps, rung):",
" # This estimates correctly only for this tutorial, e.g. 24 cpus, 2D descritpor, classification", " # This estimates correctly only for this tutorial, e.g. 24 cpus, 2D descritpor, classification",
" # reference calculation time", " ",
" # SIS time",
" if feature_space_size is not None:",
" c0, c1 = 3.76501433e-08, 4.30872059e-01",
" time_sis = c0 * feature_space_size + c1",
" else:",
" time_sis = 0.",
" ",
" # l0 time",
" l0_steps_3700 = 27380000", " l0_steps_3700 = 27380000",
" minutes_3700 = 35.", " if rung == 2:",
" minutes_3700 = 62.",
" else:",
" minutes_3700 = 38.",
" steps_per_minute = l0_steps_3700 / minutes_3700 # on 24 cores", " steps_per_minute = l0_steps_3700 / minutes_3700 # on 24 cores",
"",
" time_l0 = l0_steps / steps_per_minute", " time_l0 = l0_steps / steps_per_minute",
" time_sis = 0.",
"",
" calc_time = time_l0 + time_sis",
" ", " ",
" if calc_time < 1.:", " # total time",
" print \"INFO: Estimated calculation time: below 1 min\" ", " calc_time = math.ceil( time_l0 + time_sis + 1. )",
" # warning message",
" if calc_time < 5.:",
" print \"INFO: Estimated calculation time: below 5 min\" ",
" else:", " else:",
" print \"WARNING: Estimated calculation time: %s min\" % int(round(calc_time))" " print \"WARNING: Estimated calculation time: %s min\" % calc_time"
], ],
"hidden": true "hidden": true
}, },
"output": { "output": {
"state": {}, "state": {},
"pluginName": "IPython", "pluginName": "IPython",
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D", "shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"elapsedTime": 313 "elapsedTime": 332,
"selectedType": "Hidden"
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 16, "lineCount": 28,
"initialization": true "initialization": true
}, },
{ {
...@@ -1068,23 +1081,43 @@ ...@@ -1068,23 +1081,43 @@
"#init", "#init",
"sis = SIS(P, D, selected_feature_list, feature_unit_classes=feature_unit_classes, target_unit='eV', control=sis_control, rm_existing_files=True)", "sis = SIS(P, D, selected_feature_list, feature_unit_classes=feature_unit_classes, target_unit='eV', control=sis_control, rm_existing_files=True)",
"# calculation time warning with function defined in the notebook", "# calculation time warning with function defined in the notebook",
"calculation_time_warning(sis.predicted_feature_space_size, sis.l0_steps)", "calculation_time_warning(sis.predicted_feature_space_size, sis.l0_steps, int(beaker.n_comb))"
],
"hidden": true
},
"output": {
"state": {},
"selectedType": "Results",
"pluginName": "IPython",
"shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"height": 84,
"elapsedTime": 27994
},
"evaluatorReader": true,
"lineCount": 46,
"tags": "calc_cell"
},
{
"id": "code3TeLgG",
"type": "code",
"evaluator": "IPython",
"input": {
"body": [
"#start calc", "#start calc",
"sis.start()", "sis.start()",
"",
"#print \"Time\",time()-t1" "#print \"Time\",time()-t1"
] ],
"hidden": true
}, },
"output": { "output": {
"state": {},
"selectedType": "BeakerDisplay", "selectedType": "BeakerDisplay",
"pluginName": "IPython", "pluginName": "IPython",
"shellId": "59C8CB8F684A4ECE864B4DD816EB9C0D", "shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"height": 62, "elapsedTime": 14238,
"elapsedTime": 357 "state": {}
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 50, "lineCount": 3,
"tags": "calc_cell" "tags": "calc_cell"
}, },
{ {
...@@ -1093,10 +1126,9 @@ ...@@ -1093,10 +1126,9 @@
"evaluator": "IPython", "evaluator": "IPython",
"input": { "input": {
"body": [ "body": [
"print \"INFO: CALCULATION FINISHED\"",
"results = sis.get_results()", "results = sis.get_results()",
"Des, D_selected, overlap = results[-1]", "Des, D_selected, overlap = results[-1]",
"print \"INFO: Identified descriptor: %s, %s\" %(Des[0], Des[0])", "print \"INFO: Identified descriptor: %s, %s\" %(Des[0], Des[1])",
"print \"INFO: Number of samples in overlap region: %s\" %overlap" "print \"INFO: Number of samples in overlap region: %s\" %overlap"
], ],
"hidden": true "hidden": true
...@@ -1105,12 +1137,12 @@ ...@@ -1105,12 +1137,12 @@
"state": {}, "state": {},
"selectedType": "BeakerDisplay", "selectedType": "BeakerDisplay",
"pluginName": "IPython", "pluginName": "IPython",
"shellId": "CE552833FBAD408FB7F3D612A07C5623", "shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"height": 155, "height": 154,
"elapsedTime": 7419 "elapsedTime": 7540
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 5, "lineCount": 4,
"tags": "calc_cell" "tags": "calc_cell"
}, },
{ {
...@@ -1165,9 +1197,9 @@ ...@@ -1165,9 +1197,9 @@
"state": {}, "state": {},
"selectedType": "BeakerDisplay", "selectedType": "BeakerDisplay",
"pluginName": "IPython", "pluginName": "IPython",
"shellId": "CE552833FBAD408FB7F3D612A07C5623", "shellId": "FFAEAF5250B743C6A75B61128AE3B92F",
"height": 108, "height": 84,
"elapsedTime": 2240 "elapsedTime": 2230
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 39, "lineCount": 39,
...@@ -1189,7 +1221,7 @@ ...@@ -1189,7 +1221,7 @@
"selectedType": "BeakerDisplay", "selectedType": "BeakerDisplay",
"pluginName": "JavaScript", "pluginName": "JavaScript",
"height": 90, "height": 90,
"elapsedTime": 31 "elapsedTime": 33
}, },
"evaluatorReader": true, "evaluatorReader": true,
"lineCount": 2, "lineCount": 2,
...@@ -1218,8 +1250,8 @@ ...@@ -1218,8 +1250,8 @@
], ],
"max_dim": null, "max_dim": null,
"ncomb": "1", "ncomb": "1",
"n_sis": "10", "n_sis": "201",
"n_comb": "2", "n_comb": "3",
"viewer_result": "6edb65b9776deeb2", "viewer_result": "6edb65b9776deeb2",
"structures_diff": null, "structures_diff": null,
"units": "eV_angstrom", "units": "eV_angstrom",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment