dftd3 / simple-dftd3

reimplementation of the DFT-D3 program
https://dftd3.readthedocs.io
GNU Lesser General Public License v3.0
51 stars 26 forks source link

Make OpenMP a feature dependent on compiler support #102

Open awvwgk opened 3 weeks ago

awvwgk commented 3 weeks ago

Apple clang as C compiler does not support OpenMP, therefore when building on MacOS with the default C compiler rather than failing the build for not finding OpenMP, the OpenMP feature could be disabled due to missing compiler support automatically.

Note: This might silently remove features like parallelization for users on MacOS when not carefully building the library.

AlexBuccheri commented 5 days ago

Another option might be to tell the user Apple clang is detected, and that they should either specify their fortran compiler at cmake configure time, or disable OMP with something like -DENABLE_OpenMP=Off. Then the user is explicitly makes the the choice