[gmx-developers] OpenMP call in a c++ analysis source file

Jochen Hub jhub at gwdg.de
Fri Sep 6 11:23:30 CEST 2013


Hi,

I have added OpenMP support to g_wham and pushed the change to gerrit. I
get errors such as:

undefined reference to `gmx_omp_set_num_threads(int)'

or

unresolved external symbol "int __cdecl gmx_omp_get_max_threads(void)"
(?gmx_omp_get_max_threads@@YAHXZ) referenced in function gmx_wham

The code compiles fine under Mac and linux (without and with OpenMP
support).

However, what is also strange is that I have to protect the
mx_omp_set_num_threads() and gmx_omp_get_max_threads() with an #ifdef
GMX_OPENMP - while this is not required in, for instance in gmx_sans.c.
The only reason I could think of is a C vs. C++ issue.

Can someone give a hint how to proceed?

Many thanks,
Jochen


-- 
---------------------------------------------------
Dr. Jochen Hub
Computational Molecular Biophysics Group
Institute for Microbiology and Genetics
Georg-August-University of Göttingen
Justus-von-Liebig-Weg 11, 37077 Göttingen, Germany.
Phone: +49-551-39-14189
http://cmb.bio.uni-goettingen.de/
---------------------------------------------------



More information about the gromacs.org_gmx-developers mailing list