AKEngels / CAST

Conformational Analysis and Search Tool
GNU Lesser General Public License v3.0
1 stars 5 forks source link

Is it still necessary that CAST supports compilation without openMP? #30

Open S0S-90 opened 5 years ago

S0S-90 commented 5 years ago

As all modern compilers should support openMP (visual studio for example since 2010, gcc since version 4.2) is it necessary that CAST still has support for compilation without openMP? It's a lot of code that is just twice there (once with omp directives and once without) and every time when you change something in there you have to think of changing it in the other version, too. What do you think?

mrnicegyu11 commented 5 years ago

The way it is now, you are absolutely right. One reason why I'd prefer having CAST also compile without openMP, is that single-threaded code is much easier to debug. Ideally, there shouldn't be any duplicated code as the openMP-parallelized code should also work for 1 core only. Therefore, only the "#pragma omp" macros and maybe some headers of for-loops should be different for the openMP- and single-threaded version. I'd suggest deleting the single-threaded code whereever it is duplicated and putting some preprocesser-macros into the openMP-code to be able to disable openMP entirely (let's not trick around by setting NUM_CORES=1 ;) )