From 13a43b0b7033713e56d2e81dee6549f9fa1ce0b8 Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Fri, 22 Nov 2019 13:38:28 +0100 Subject: [PATCH] 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. --- src/msspec/calculator.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/msspec/calculator.py b/src/msspec/calculator.py index b4e6f70..2e32fc3 100644 --- a/src/msspec/calculator.py +++ b/src/msspec/calculator.py @@ -363,7 +363,30 @@ class _MSCALCULATOR(Calculator): for key, value in requirements.items(): 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() self.resources['spec_time'] = t1 - t0