fix internal/external OpenMP thread affinity clash
[alexxy/gromacs.git] / include / gmx_omp.h
index de55a43bf57315d75c8b386af00074c034702a5d..01e520836073db0c6564646fd1a5a88552d289ba 100644 (file)
@@ -25,6 +25,9 @@
 #ifndef GMX_OMP_H
 #define GMX_OMP_H
 
+#include "types/commrec.h"
+#include "mdrun.h"
+
 /* This module defines wrappers for OpenMP API functions and enables compiling
  * code even when OpenMP is turned off in the build system.
  * Therefore, OpenMP API functions should always be used through these wrappers
@@ -49,4 +52,8 @@ int  gmx_omp_get_thread_num(void);
  *  by a num_threads clause. Acts as a wrapper for omp_get_max_threads(void). */
 void gmx_omp_set_num_threads(int num_threads);
 
+/*! Check for externally set thread affinity to avoid conflicts with GROMACS internal setting. */
+void gmx_omp_check_thread_affinity(FILE *fplog, const t_commrec *cr,
+                                   gmx_hw_opt_t *hw_opt);
+
 #endif /* GMX_OMP_H */