Commit ef9dbe44 authored by Markus Rampp's avatar Markus Rampp
Browse files

Merge branch 'master' into BioEM-1.0

* master:
  Corrections David: remove deprecated FFT_COMPATIBILITY_NATIVE, and use FFTW padding, fix non-zero error code & compiler warnings
parents 23c9c01d 0a5984d9
......@@ -509,7 +509,7 @@ int bioem_cuda::deviceStartRun()
cout << "Error planning CUFFT\n";
exit(1);
}
if (cufftSetCompatibilityMode(plan[i][j], CUFFT_COMPATIBILITY_NATIVE) != CUFFT_SUCCESS)
if (cufftSetCompatibilityMode(plan[i][j], CUFFT_COMPATIBILITY_FFTW_PADDING) != CUFFT_SUCCESS)
{
cout << "Error planning CUFFT compatibility\n";
exit(1);
......
......@@ -52,9 +52,21 @@ int bioem_RefMap::readRefMaps(bioem_param& param, const char* filemap)
cout << "Error opening dump file\n";
exit(1);
}
fread(&ntotRefMap, sizeof(ntotRefMap), 1, fp);
size_t elements_read;
elements_read = fread(&ntotRefMap, sizeof(ntotRefMap), 1, fp);
if (elements_read != 1)
{
cout << "Error reading file\n";
exit(1);
}
maps = (myfloat_t*) mallocchk(ntotRefMap * refMapSize * sizeof(myfloat_t));
fread(maps, sizeof(myfloat_t) * refMapSize, ntotRefMap, fp);
elements_read = fread(maps, sizeof(myfloat_t) * refMapSize, ntotRefMap, fp);
if (elements_read != (size_t) ntotRefMap)
{
cout << "Error reading file\n";
exit(1);
}
fclose(fp);
cout << "Particle Maps read from Map Dump\n";
......@@ -74,7 +86,7 @@ int bioem_RefMap::readRefMaps(bioem_param& param, const char* filemap)
if (!input.good())
{
cout << "Failed to open file contaning MRC names: " << filemap << "\n";
exit(0);
exit(1);
}
char line[512] = {0};
......
......@@ -54,7 +54,7 @@ int bioem_model::readModel(bioem_param& param, const char* filemodel)
if (!input.good())
{
cout << "PDB Failed to open file" << endl ; // pdbfilename << " ("<<filename<<")\n";
exit(0);
exit(1);
}
char line[512] = {0};
......@@ -275,7 +275,7 @@ myfloat_t bioem_model::getAminoAcidRad(char *name)
if(iaa == 0)
{
cout << "PROBLEM WITH AMINO ACID " << name << endl;
exit(0);
exit(1);
}
return iaa;
......@@ -310,7 +310,7 @@ myfloat_t bioem_model::getAminoAcidDensity(char *name)
if(iaa == 0.0)
{
cout << "PROBLEM WITH AMINO ACID " << name << endl;
exit(0);
exit(1);
}
return iaa;
}
......
......@@ -70,7 +70,6 @@ int bioem_param::readParameters(const char* fileinput)
bool yesGPal = false;
bool yesGPbe = false;
bool yesMDC = false ;
bool notsquare =false;
bool yesBFact=false;
bool yesDefocus=false;
bool yesAMP=false;
......@@ -111,7 +110,7 @@ int bioem_param::readParameters(const char* fileinput)
if (!input.good())
{
cout << "Failed to open file: " << fileinput << "\n";
exit(0);
exit(1);
}
char line[512] = {0};
......@@ -520,7 +519,7 @@ int bioem_param::forprintBest(const char* fileinput)
if (!input.good())
{
cout << "Failed to open Best Parameter file: " << fileinput << "\n";
exit(0);
exit(1);
}
delete[] angles;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment