openmopac / mopac

Molecular Orbital PACkage
http://openmopac.net
GNU Lesser General Public License v3.0
122 stars 32 forks source link

THREADS keyword is deactivated #37

Closed godotalgorithm closed 2 years ago

godotalgorithm commented 2 years ago

MOPAC previously enabled the number of OpenMP threads to be adjusted using the THREADS keyword rather than OMP_NUM_THREADS or MKL_NUM_THREADS environment variables. This feature was disabled in the process of decoupling MOPAC from MKL, as its existing implementation depended on MKL-specific functions. We may reinstate this feature in the future with more generic OpenMP-based functions (e.g. omp_set_num_threads()) or deprecate it. User feedback is welcome in making this decision.

flatstik commented 2 years ago

Discard the THREADS-keyword and reinstate with OpenMP-based functions.

godotalgorithm commented 2 years ago

The suggestion I was making was to reinstate the THREADS keyword itself with OpenMP-based functions, allowing it to be used with all popular threaded BLAS/LAPACK implementations. Otherwise, the only threading in MOPAC right now is in its dense linear algebra, which is solely handled by external libraries (typically either MKL or OpenBLAS). Without the THREADS keyword, there would be no explicitly OpenMP-aware code in MOPAC itself.

godotalgorithm commented 2 years ago

Fixed by #55.