diff --git a/spatialpy/Mesh.py b/spatialpy/Mesh.py index e1852689..ea175bf6 100644 --- a/spatialpy/Mesh.py +++ b/spatialpy/Mesh.py @@ -210,10 +210,10 @@ def read_msh_file(cls, filename): import pygmsh except ImportError as e: raise MeshError("The python package 'pygmsh' is not installed.") - try: - _ = pygmsh.get_gmsh_major_version() - except FileNotFoundError as e: - raise MeshError("The command line program 'gmsh' is not installed or is not found in the current PATH") + # try: + # _ = pygmsh.get_gmsh_major_version() + # except FileNotFoundError as e: + # raise MeshError("The command line program 'gmsh' is not installed or is not found in the current PATH") try: import meshio diff --git a/spatialpy/Solver.py b/spatialpy/Solver.py index 22808eab..1dda1b02 100644 --- a/spatialpy/Solver.py +++ b/spatialpy/Solver.py @@ -53,7 +53,7 @@ def compile(self): """ Compile the model.""" # Create a unique directory each time call to compile. - self.build_dir = tempfile.mkdtemp(dir=os.environ.get('SPATIALPY_TMPDIR')) + self.build_dir = tempfile.mkdtemp(prefix='spatialpy_build_',dir=os.environ.get('SPATIALPY_TMPDIR')) if self.report_level >= 1: print("Compiling Solver. Build dir: {0}".format(self.build_dir)) @@ -114,7 +114,7 @@ def run(self, number_of_trajectories=1, seed=None, timeout=None): # Execute the solver for run_ndx in range(number_of_trajectories): - outfile = tempfile.mkdtemp(dir=os.environ.get('SPATIALPY_TMPDIR')) + outfile = tempfile.mkdtemp(prefix='spatialpy_result_',dir=os.environ.get('SPATIALPY_TMPDIR')) result = Result(self.model, outfile) solver_cmd = 'cd {0}'.format(outfile) + ";" + os.path.join(self.build_dir, self.executable_name) diff --git a/spatialpy/ssa_sdpd-c-simulation-engine/propensity_file_template.c b/spatialpy/ssa_sdpd-c-simulation-engine/propensity_file_template.c index 97c6d896..0a50bd29 100644 --- a/spatialpy/ssa_sdpd-c-simulation-engine/propensity_file_template.c +++ b/spatialpy/ssa_sdpd-c-simulation-engine/propensity_file_template.c @@ -103,6 +103,7 @@ int main(int argc, char**argv){ srand48((long int)time(NULL)+(long int)(1e9*clock())); } int num_threads = get_num_processors(); + if(num_threads>8){ num_threads=8; } run_simulation(num_threads, system); exit(0); }