[gmx-developers] Fortran acceleration + OpenMP strangeness
Szilárd Páll
szilard.pall at cbr.su.se
Fri Jun 1 14:03:15 CEST 2012
Bizarrely enough I can build on my machine with the exact same
configuration as the jenkins auto-build uses (http://goo.gl/e3Ku1).
The only difference is the OS version, but not the compiler used (in both
cases gcc/gfortran 4.6 was used).
Any idea what could cause this discrepancy?
--
Szilárd
On Fri, Jun 1, 2012 at 11:05 AM, Szilárd Páll <szilard.pall at cbr.su.se>wrote:
> On Fri, Jun 1, 2012 at 3:45 AM, Christoph Junghans <junghans at votca.org>
> wrote:
> > 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?
>
> No, only to the CFLAGS. However, AFAIK only the kernels are compiled
> with a fortran, the rest by the C compiler.
>
> >> --
> >> 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
> > --
> > 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20120601/d91fe010/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list