]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeracheckrdp.cpp
a few modifications for 1.9
[mothur.git] / chimeracheckrdp.cpp
index cb101b6af9dd8d0c412a69067597d9a022f2e623..4c93c1b97c5c7edd2a583cb449cf34440be2a324 100644 (file)
@@ -97,7 +97,7 @@ int ChimeraCheckRDP::print(MPI_File& out, MPI_File& outAcc) {
                
                MPI_Status status;
                int length = outString.length();
-               char* buf = new char[length];\r
+               char* buf = new char[length];
                memcpy(buf, outString.c_str(), length);
                                
                MPI_File_write_shared(out, buf, length, MPI_CHAR, &status);
@@ -263,13 +263,16 @@ void ChimeraCheckRDP::readName(string namefile) {
                MPI_Offset size;
                MPI_Status status;
 
-               char* inFileName = new char[namefile.length()];\r
-               memcpy(inFileName, namefile.c_str(), namefile.length());
+               //char* inFileName = new char[namefile.length()];
+               //memcpy(inFileName, namefile.c_str(), namefile.length());
+               
+               char inFileName[1024];
+               strcpy(inFileName, namefile.c_str());
 
                MPI_File_open(MPI_COMM_WORLD, inFileName, MPI_MODE_RDONLY, MPI_INFO_NULL, &inMPI);  
                MPI_File_get_size(inMPI, &size);
 
-               delete inFileName;
+               //delete inFileName;
 
                char* buffer = new char[size];
                MPI_File_read(inMPI, buffer, size, MPI_CHAR, &status);
@@ -352,12 +355,15 @@ void ChimeraCheckRDP::makeSVGpic(vector<sim> info) {
                MPI_File outSVG;
                int outMode=MPI_MODE_CREATE|MPI_MODE_WRONLY;
 
-               char* FileName = new char[file.length()];\r
-               memcpy(FileName, file.c_str(), file.length());
+               //char* FileName = new char[file.length()];
+               //memcpy(FileName, file.c_str(), file.length());
                
+               char FileName[1024];
+               strcpy(FileName, file.c_str());
+
                MPI_File_open(MPI_COMM_SELF, FileName, outMode, MPI_INFO_NULL, &outSVG);  //comm, filename, mode, info, filepointer
                
-               delete FileName;
+               //delete FileName;
 
                int width = (info.size()*5) + 150;
                
@@ -404,7 +410,7 @@ void ChimeraCheckRDP::makeSVGpic(vector<sim> info) {
                
                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(outSVG, buf2, length, MPI_CHAR, &status);