[gmx-developers] Compiling Gromacs with Score-P support

Roland Schulz roland at utk.edu
Tue Jun 11 17:52:17 CEST 2013

On Tue, Jun 11, 2013 at 11:30 AM, Matthieu.Dreher at imag.fr
<Matthieu.Dreher at imag.fr> wrote:
> Hi everyone
> I'm trying to compile Gromacs-4.6.2 with score-p instrumentation. To
> do so, I need to compile with score-p so doing something like this :
>   scorep gcc myfile.c ... etc
> To compile Gromacs with scorpe, I do :
>   CC="scorep gcc" CXX="scorep c++" ccmake ../
> -DCMAKE_INSTALL_PREFIX:PATH=/home/okidor/fvnano-dev/gromacs-4.6.2/install
> The cmake procedure seems to end properly but the compilation crash with :
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:
> In function ?gmx_check_thread_affinity_set?:
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:357:5: attention : implicit declaration of function ?CPU_ZERO?
> [-Wimplicit-function-declaration]
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:358:5: attention : implicit declaration of function ?sched_getaffinity?
> [-Wimplicit-function-declaration]
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:384:35: erreur: ?CPU_SETSIZE? undeclared (first use in this
> function)
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:384:35: note: each undeclared identifier is reported only once for each function it appears
> in
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:386:9: attention : implicit declaration of function ?CPU_ISSET?
> [-Wimplicit-function-declaration]
> I tried again with this :
>    CC="scorep gcc -D_GNU_SOURCE" CXX="scorep c++" ccmake ../SOURCE
> -DCMAKE_INSTALL_PREFIX:PATH=/home/okidor/fvnano-dev/INSTALL/

I think this should be fixed in scorep that the _GNU_SOURCE is passed
correctly. This workaround seems fine.

> which avoid the previous error but errors still happend later :
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_thread_affinity.c:39:0: attention : « _GNU_SOURCE » redéfini [enabled by
> default]
> <command-line>:0:0: note: ceci est la localisation d'une précédente définition
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/gmx_cpuid.c:40:0:
> attention : « _GNU_SOURCE » redéfini [enabled by default]
> <command-line>:0:0: note: ceci est la localisation d'une précédente définition
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/trxio.c: In
> function ?flowvr_next_data?:
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/trxio.c:857:15:
> attention : assignment from incompatible pointer type [enabled by
> default]
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/copyrite.c:672:19:
> erreur: static declaration of ?_gmx_ver_string? follows non-static
> declaration
> /home/okidor/fvnano-dev/SOURCE/gromacs-4.6/src/gmxlib/version.h:41:19:
> note: previous declaration of ?_gmx_ver_string? was here

No idea why it complains about static. It shouldn't be static. Can you
post the instrumented code? I forgot, does scrope does source level
instrumentation? If so, is it possible to get the source after

> In the end I'm not sure it is the appropriate way to instrument the
> code. So I was wondering if someone has already try to instrument
> Gromacs code with score-p (or another tracing program) and if yes some
> problems has happend?
If done it before. And it was difficult. And it has been a while so I
don't remember the details from the top of my head. If you keep having
problems, let me know and I'll look at it some more when I have some
more time.


> Thank you for your attention
> Dreher Matthieu
> --
> 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.

ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309

More information about the gromacs.org_gmx-developers mailing list