[gmx-developers] The build process, and profiling
jan
rtm443x at googlemail.com
Sun Apr 12 14:56:29 CEST 2020
Hi all,
I've been trying to get profiling working, although I understand
that's not what gromacs needs. I'm using bit as a way of getting used
to everything. I'm also aware the manual says gprof probably won't be
that useful - Pall says there'll be too much overhead to get useful
timings. That's ok.
Nonetheless, I can't get it working. If I enable gprof using
-DCMAKE_BUILD_TYPE=Profile
then gmon.out is about 20K and
gprof gmx
gets me only a longish output describing labels (such as self, % time
etc) but no actual profiling data.
Looking at the GCC docs it needs to be compiled with -pg, and linked
with the same flags. Digging through the makefile stuff it *seems*,
AFAICT, that both flags are being passed for compilation and linking.
But no gprof output. Could well be I broke the build somehow, but I
don't know.
About the build process, I don't understand even how to make sense of
it. For example Cmake makes makefiles, ok, but many such generated
makefiles seem to themselves call back to Cmake, eg. copied from a
makefile produced by Cmake:
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan
"Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
So cmake calls on make which calls on cmake?
I really need to get a feeling of how the build is structured, so
could anyone drop some useful hints or pointers please.
Pall has given me pointers to other profiling tools (again with the
caveat that it's not what gmx needs, but this is part of my learning
curve).
cheers
jan
More information about the gromacs.org_gmx-developers
mailing list