[gmx-developers] Fortran acceleration + OpenMP strangeness

Christoph Junghans junghans at votca.org
Fri Jun 1 03:45:17 CEST 2012


2012/5/31 Szilárd Páll <szilard.pall at cbr.su.se>:
> On Thu, May 31, 2012 at 5:29 PM, Alexey Shvetsov
> <alexxy at omrb.pnpi.spb.ru> wrote:
>> Szilárd Páll писал 2012-05-31 19:09:
>>
>>> Hi,
>>>
>>> I bumped into a strange issue when verifying the nbnxn code with
>>> Jenkins. Using the Fortran kernels, while the appropriate OpenMP flag
>>> is used and mdrun compiles fine, some tools fail to compile with a
>>> weird message complaining about missing symbols:
>>>
>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_get_thread_num'
>>> ../gmxlib/libgmx.so.6: undefined reference to `GOMP_parallel_end'
>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_get_num_threads'
>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_set_num_threads'
>>> ../gmxlib/libgmx.so.6: undefined reference to `GOMP_parallel_start'
>>> ../gmxlib/libgmx.so.6: undefined reference to `omp_get_max_threads'
>>>
>>> i) Does anybody have an idea what could be wrong?
>>>
>>> ii) For what platforms are the fortran kernels still useful? If there
>>> is any platform where they provide a faster alternative to the plain C
>>> kernels, we should definitely keep them. Otherwise, deprecating them
>>> is an option.
>>>
>>> Cheers,
>>> --
>>> Szilárd
>>
>>
>> Looks like something doesn link with -lgomp
>> Does build system forces "-fopenmp" for tools in case fortran kernel build?
>
> Yes, -fopnemp is simply added to the CFLAGS. I thought that was
> harmless, moreover, some tools do use OpenMP. Could this be the issue?
That is strange. Usually -lgomp is added internally by gcc automatically.
$ echo "int main() { return 0; }" > test.c
$ gcc -fopenmp test.c -o test
$ ldd test | grep omp
libgomp.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.6.3/libgomp.so.1

Did we add -fopenmp to the Fortran Flags as well?

> --
> Szilárd
>
>> --
>> Best Regards,
>> Alexey 'Alexxy' Shvetsov
>> Petersburg Nuclear Physics Institute, NRC Kurchatov Institute, Gatchina,
>> Russia
>> Department of Molecular and Radiation Biophysics
>> Gentoo Team Ru
>> Gentoo Linux Dev
>> mailto:alexxyum at gmail.com
>> mailto:alexxy at gentoo.org
>> mailto:alexxy at omrb.pnpi.spb.ru
>> --
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the www interface
>> or send it to gmx-developers-request at gromacs.org.
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.



-- 
Christoph Junghans
Web: http://www.compphys.de



More information about the gromacs.org_gmx-developers mailing list