]> git.donarmstrong.com Git - mothur.git/blobdiff - weighted.cpp
pre.cluster unable to spawn necessary processes adjustment.
[mothur.git] / weighted.cpp
index 49bf6bf1fd2a2053ed7f3f7e0ea30fb5595400a0..35c2c6c868982048f3daed2a4acd5d47d7727a8a 100644 (file)
@@ -68,7 +68,7 @@ EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGro
                
                //loop through and create all the processes you want
                while (process != processors) {
-                       int pid = fork();
+                       pid_t pid = fork();
                        
                        if (pid > 0) {
                                processIDS.push_back(pid);  //create map from line number to pid so you can append files in correct order later
@@ -79,7 +79,7 @@ EstOutput Weighted::createProcesses(Tree* t, vector< vector<string> > namesOfGro
                        
                                //pass numSeqs to parent
                                ofstream out;
-                               string tempFile = outputDir + toString(getpid()) + ".weighted.results.temp";
+                               string tempFile = outputDir + m->mothurGetpid(process) + ".weighted.results.temp";
                                m->openOutputFile(tempFile, out);
        
                                out << Myresults.size() << endl;