Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spatialpy/Mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spatialpy/Solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down