Skip to content
Snippets Groups Projects
Commit e9add275 authored by Koen Hillewaert's avatar Koen Hillewaert
Browse files

Modification to avoid seg fault while stopping Gmsh (on linux)

parent 68a81283
Branches
Tags
No related merge requests found
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <myadt.hpp> #include <myadt.hpp>
#include <cstdlib>
namespace netgen namespace netgen
{ {
...@@ -28,6 +29,7 @@ namespace netgen ...@@ -28,6 +29,7 @@ namespace netgen
total_timer = CreateTimer ("total CPU time"); total_timer = CreateTimer ("total CPU time");
StartTimer (total_timer); StartTimer (total_timer);
envNGPROFILE = getenv ("NGPROFILE");
} }
NgProfiler :: ~NgProfiler() NgProfiler :: ~NgProfiler()
...@@ -43,7 +45,7 @@ namespace netgen ...@@ -43,7 +45,7 @@ namespace netgen
// which leads to an "order of destruction"-problem, // which leads to an "order of destruction"-problem,
// thus we use the C-variant: // thus we use the C-variant:
if (getenv ("NGPROFILE")) if (envNGPROFILE)
{ {
char filename[100]; char filename[100];
#ifdef PARALLEL #ifdef PARALLEL
......
...@@ -30,7 +30,9 @@ class NgProfiler ...@@ -30,7 +30,9 @@ class NgProfiler
static string names[SIZE]; static string names[SIZE];
static int usedcounter[SIZE]; static int usedcounter[SIZE];
bool envNGPROFILE;
int total_timer; int total_timer;
public: public:
NgProfiler(); NgProfiler();
~NgProfiler(); ~NgProfiler();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment