Trisurf Monte Carlo simulator
Samo Penic
2016-05-24 f066597dcbb2980d503725defe18e62770bfa9cb
Moved stop(kill) command to runner
3 files modified
11 ■■■■■ changed files
python/trisurf/trisurf.py 7 ●●●● patch | view | raw | blame | history
python/trisurf/tsmgr.py 3 ●●●● patch | view | raw | blame | history
src/restore.c 1 ●●●● patch | view | raw | blame | history
python/trisurf/trisurf.py
@@ -397,8 +397,6 @@
            print("Process in "+self.Dir.fullpath()+" already running. Not starting.")
        return
    def stop(self):
        pass
    def setMaindir(self,prefix,variables):
        maindir=""
@@ -443,6 +441,11 @@
            report=["N/A","N/A",statustxt, pid, str(self.Dir.fullpath()), self.Comment.getText()]
        return report
    def stop(self):
        p=psutil.Process(self.getPID())
        p.kill()
    def writeComment(self, data, mode='w'):
        self.Dir=Directory(maindir=self.maindir,simdir=self.subdir)
        self.Comment=FileContent(os.path.join(self.Dir.fullpath(),".comment"))
python/trisurf/tsmgr.py
@@ -80,8 +80,7 @@
        elif opt == '-k':
            if processno:
                p=psutil.Process(Runs[processno-1].getPID())
                p.kill()
                Runs[processno-1].stop()
        else:
            printHelp()
            sys.exit(2)
src/restore.c
@@ -57,6 +57,7 @@
                        if ((!xmlStrcmp(cur2->name, (const xmlChar *)"Points"))){
                            //fprintf(stderr,"Found point data\n");
                            if(vesicle!=NULL)
                                fprintf(stderr,"Fils: %ld, Nfono: %ld\n", vesicle->tape->nfil, vesicle->tape->nfono);
                                parseXMLVertexPosition(vesicle, doc, cur2);
                        }
                        if ((!xmlStrcmp(cur2->name, (const xmlChar *)"Cells"))){