Skip to content

Commit 51d5148

Browse files
committed
rss/vms_gb -> rss/vms_GiB
1 parent 5c56bfe commit 51d5148

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

nipype/interfaces/base/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,21 +518,21 @@ def run(self, **inputs):
518518
import numpy as np
519519
mon_sp.stop()
520520

521-
runtime.mem_peak_gb = None
521+
runtime.mem_peak_GiB = None
522522
runtime.cpu_percent = None
523523

524524
# Read .prof file in and set runtime values
525525
vals = np.loadtxt(mon_sp.fname, delimiter=',')
526526
if vals.size:
527527
vals = np.atleast_2d(vals)
528-
runtime.mem_peak_gb = vals[:, 1].max() / 1024
528+
runtime.mem_peak_GiB = vals[:, 1].max() / 1024
529529
runtime.cpu_percent = vals[:, 2].max()
530530

531531
runtime.prof_dict = {
532532
'time': vals[:, 0].tolist(),
533-
'rss_gb': (vals[:, 1] / 1024).tolist(),
533+
'rss_GiB': (vals[:, 1] / 1024).tolist(),
534534
'cpus': vals[:, 2].tolist(),
535-
'vms_gb': (vals[:, 3] / 1024).tolist(),
535+
'vms_GiB': (vals[:, 3] / 1024).tolist(),
536536
}
537537

538538
return results

nipype/pipeline/engine/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,8 +1320,8 @@ def write_workflow_resources(graph, filename=None, append=None):
13201320
'time': [],
13211321
'name': [],
13221322
'interface': [],
1323-
'rss_gb': [],
1324-
'vms_gb': [],
1323+
'rss_GiB': [],
1324+
'vms_GiB': [],
13251325
'cpus': [],
13261326
'mapnode': [],
13271327
'params': [],
@@ -1362,7 +1362,7 @@ def write_workflow_resources(graph, filename=None, append=None):
13621362
'(mapflow %d/%d).', nodename, subidx + 1, len(rt_list))
13631363
continue
13641364

1365-
for key in ['time', 'rss_gb', 'cpus', 'vms_gb']:
1365+
for key in ['time', 'rss_GiB', 'cpus', 'vms_GiB']:
13661366
big_dict[key] += runtime.prof_dict[key]
13671367

13681368
big_dict['interface'] += [classname] * nsamples

nipype/utils/profiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ def log_nodes_cb(node, status):
140140
'duration': getattr(node.result.runtime, 'duration'),
141141
'runtime_threads': getattr(
142142
node.result.runtime, 'cpu_percent', 'N/A'),
143-
'runtime_memory_gb': getattr(
144-
node.result.runtime, 'mem_peak_gb', 'N/A'),
145-
'estimated_memory_gb': node.mem_gb,
143+
'runtime_memory_GiB': getattr(
144+
node.result.runtime, 'mem_peak_GiB', 'N/A'),
145+
'estimated_memory_GiB': node.mem_gb,
146146
'num_threads': node.n_procs,
147147
}
148148

0 commit comments

Comments
 (0)