]> git.donarmstrong.com Git - mothur.git/blobdiff - ccode.cpp
a few modifications for 1.9
[mothur.git] / ccode.cpp
index 5fdf5d140fc731bdd714ed56923901a720fcdac9..c27644866c1f1d52c14a6f86b9f2002e9342d720 100644 (file)
--- a/ccode.cpp
+++ b/ccode.cpp
@@ -29,14 +29,17 @@ Ccode::Ccode(string filename, string temp, bool f, string mask, int win, int num
        
        #ifdef USE_MPI
                
-               char* inFileName = new char[mapInfo.length()];\r
-               memcpy(inFileName, mapInfo.c_str(), mapInfo.length());
+               //char* inFileName = new char[mapInfo.length()];
+               //memcpy(inFileName, mapInfo.c_str(), mapInfo.length());
+               
+               char inFileName[1024];
+               strcpy(inFileName, mapInfo.c_str());
                
                int outMode=MPI_MODE_CREATE|MPI_MODE_WRONLY;
 
                MPI_File_open(MPI_COMM_WORLD, inFileName, outMode, MPI_INFO_NULL, &outMap);  //comm, filename, mode, info, filepointer
                
-               delete inFileName;
+               //delete inFileName;
 
                int pid;
                MPI_Comm_rank(MPI_COMM_WORLD, &pid); //find out who we are
@@ -46,7 +49,7 @@ Ccode::Ccode(string filename, string temp, bool f, string mask, int win, int num
                        
                        MPI_Status status;
                        int length = outString.length();
-                       char* buf2 = new char[length];\r
+                       char* buf2 = new char[length];
                        memcpy(buf2, outString.c_str(), length);
                                
                        MPI_File_write_shared(outMap, buf2, length, MPI_CHAR, &status);
@@ -238,7 +241,7 @@ int Ccode::print(MPI_File& out, MPI_File& outAcc) {
                
                MPI_Status status;
                int length = outString.length();
-               char* buf2 = new char[length];\r
+               char* buf2 = new char[length];
                memcpy(buf2, outString.c_str(), length);
                                
                MPI_File_write_shared(out, buf2, length, MPI_CHAR, &status);
@@ -250,7 +253,7 @@ int Ccode::print(MPI_File& out, MPI_File& outAcc) {
                        
                        MPI_Status statusAcc;
                        length = outAccString.length();
-                       char* buf = new char[length];\r
+                       char* buf = new char[length];
                        memcpy(buf, outAccString.c_str(), length);
                                
                        MPI_File_write_shared(outAcc, buf, length, MPI_CHAR, &statusAcc);
@@ -272,7 +275,7 @@ int Ccode::printMapping(string& output) {
        try {
                        MPI_Status status;
                        int length = output.length();
-                       char* buf = new char[length];\r
+                       char* buf = new char[length];
                        memcpy(buf, output.c_str(), length);
                                
                        MPI_File_write_shared(outMap, buf, length, MPI_CHAR, &status);