Fix bug in memory management
the call to the run function in libspec cannot be done with unzip the OrderedDict values. It creates memory address confusion and the program is killed by the os with a message: "Operating system error: Cannot allocate memory Allocation would exceed memory limit" To fix, we shall call the run function with each argument well specified between the parentheses.
This commit is contained in:
parent
a28570974e
commit
13a43b0b70
|
@ -363,7 +363,30 @@ class _MSCALCULATOR(Calculator):
|
||||||
for key, value in requirements.items():
|
for key, value in requirements.items():
|
||||||
setattr(self.spec_malloc_parameters, key, value)
|
setattr(self.spec_malloc_parameters, key, value)
|
||||||
|
|
||||||
do_spec(*requirements.values())
|
# cannot use this, unfortunately
|
||||||
|
#do_spec(*requirements.values())
|
||||||
|
do_spec(
|
||||||
|
requirements['NATP_M'],
|
||||||
|
requirements['NATCLU_M'],
|
||||||
|
requirements['NAT_EQ_M'],
|
||||||
|
requirements['N_CL_L_M'],
|
||||||
|
requirements['NE_M'],
|
||||||
|
requirements['NL_M'],
|
||||||
|
requirements['LI_M'],
|
||||||
|
requirements['NEMET_M'],
|
||||||
|
requirements['NO_ST_M'],
|
||||||
|
requirements['NDIF_M'],
|
||||||
|
requirements['NSO_M'],
|
||||||
|
requirements['NTEMP_M'],
|
||||||
|
requirements['NODES_EX_M'],
|
||||||
|
requirements['NSPIN_M'],
|
||||||
|
requirements['NTH_M'],
|
||||||
|
requirements['NPH_M'],
|
||||||
|
requirements['NDIM_M'],
|
||||||
|
requirements['N_TILT_M'],
|
||||||
|
requirements['N_ORD_M'],
|
||||||
|
requirements['NPATH_M'],
|
||||||
|
requirements['NGR_M'])
|
||||||
|
|
||||||
t1 = time.time()
|
t1 = time.time()
|
||||||
self.resources['spec_time'] = t1 - t0
|
self.resources['spec_time'] = t1 - t0
|
||||||
|
|
Loading…
Reference in New Issue