Skip to content

Commit

Permalink
Fix this in a different way
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Feb 7, 2024
1 parent f4a1a52 commit 3bf3cdf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/strucclustutils/structcreatedb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ int structcreatedb(int argc, const char **argv, const Command& command) {
bool needsReorderingAtTheEnd = false;
size_t needToWriteModel = 0;

const int inputFormat = par.inputFormat;
// cannot be const for compatibility with older compilers/openmp and omp shared
int inputFormat = par.inputFormat;

// Process tar files!
for(size_t i = 0; i < tarFiles.size(); i++) {
Expand Down Expand Up @@ -367,7 +368,7 @@ int structcreatedb(int argc, const char **argv, const Command& command) {
}
#endif

#pragma omp parallel default(none) shared(tar, par, torsiondbw, hdbw, cadbw, aadbw, mat, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, mappingWriter, std::cerr, std::cout) num_threads(localThreads) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
#pragma omp parallel default(none) shared(tar, par, torsiondbw, hdbw, cadbw, aadbw, mat, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, mappingWriter, std::cerr, std::cout, inputFormat) num_threads(localThreads) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
{
unsigned int thread_idx = 0;
#ifdef OPENMP
Expand Down Expand Up @@ -517,7 +518,7 @@ int structcreatedb(int argc, const char **argv, const Command& command) {


//===================== single_process ===================//__110710__//
#pragma omp parallel default(none) shared(par, torsiondbw, hdbw, cadbw, aadbw, mat, looseFiles, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, mappingWriter) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
#pragma omp parallel default(none) shared(par, torsiondbw, hdbw, cadbw, aadbw, mat, looseFiles, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, mappingWriter, inputFormat) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
{
unsigned int thread_idx = 0;
#ifdef OPENMP
Expand Down Expand Up @@ -572,7 +573,7 @@ int structcreatedb(int argc, const char **argv, const Command& command) {
filter = parts[2][0];
}
progress.reset(SIZE_MAX);
#pragma omp parallel default(none) shared(par, torsiondbw, hdbw, cadbw, aadbw, mat, gcsPaths, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, client, bucket_name, filter, mappingWriter) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
#pragma omp parallel default(none) shared(par, torsiondbw, hdbw, cadbw, aadbw, mat, gcsPaths, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, client, bucket_name, filter, mappingWriter) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel, inputFormat)
{
StructureTo3Di structureTo3Di;
PulchraWrapper pulchra;
Expand Down Expand Up @@ -626,7 +627,7 @@ int structcreatedb(int argc, const char **argv, const Command& command) {
DBReader<unsigned int> reader(dbs[i].c_str(), (dbs[i]+".index").c_str(), par.threads, DBReader<unsigned int>::USE_INDEX|DBReader<unsigned int>::USE_DATA|DBReader<unsigned int>::USE_LOOKUP);
reader.open(DBReader<unsigned int>::LINEAR_ACCCESS);
progress.reset(reader.getSize());
#pragma omp parallel default(none) shared(par, torsiondbw, hdbw, cadbw, aadbw, mat, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, reader, mappingWriter) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
#pragma omp parallel default(none) shared(par, torsiondbw, hdbw, cadbw, aadbw, mat, progress, globalCnt, globalFileidCnt, entrynameToFileId, filenameToFileId, fileIdToName, reader, mappingWriter, inputFormat) reduction(+:incorrectFiles, tooShort, notProtein, needToWriteModel)
{
StructureTo3Di structureTo3Di;
PulchraWrapper pulchra;
Expand Down

0 comments on commit 3bf3cdf

Please sign in to comment.