Developers: fast build, without recompiling dependencies?
61 views
Skip to first unread message
Rustam
unread,
Aug 25, 2016, 9:44:35 AM8/25/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cp2k
CP2K developers,
Is the any way to build exe without recompiling ALL dependencies?
A couple of years ago the standard make target did not recompile all dependencies. As a result minor code modifications recompiled fast. Now, make carefully creates a list of all dependencies and recompiles all of them. Nice safety feature but recompiling minor local changes seems to take forever, debugging becomes a major pain.
Is there any make TARGET that can build exe by recompiling only the modified files and their corresponding libraries?
Thanks,
Rustam
Jörg Saßmannshausen
unread,
Aug 25, 2016, 9:49:49 AM8/25/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cp...@googlegroups.com
Hi Rustam,
can you not go into the sub-directory and do a make there and then just re-
link? I would have thought that is possible.
If you have modified only a few files it might be even quicker to manually
execute the building command and then re-link.
Not sure whether that works with cp2k as well as I have not tried it but other
code certainly has that feature.
All the best from London
Jörg
--
*************************************************************
Dr. Jörg Saßmannshausen, MRSC
University College London
Department of Chemistry
20 Gordon Street
London
WC1H 0AJ
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cp2k
Hi Jörg,
Yes, it is possible to manually recompile individual files and re-link. But I would like to do as little manual work as possible. Ideally, I would just call make and specify a make target (e.g. nodepend) to ignore dependencies.
I know that most makefiles are written with this option in mind (e.g. fast or fastbuild). Is there any way to do this in CP2K?
Cheers,
Rustam
hut...@chem.uzh.ch
unread,
Aug 26, 2016, 3:55:49 AM8/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cp...@googlegroups.com
Hi Rustam
this works for me rather reliably. Most of the time I have only
minimal rebuilds.
I am using the standard makefile and gfortran 5.3
regards
Juerg
--------------------------------------------------------------
Juerg Hutter Phone : ++41 44 635 4491 Institut für Chemie C FAX : ++41 44 635 6838 Universität Zürich E-mail: hut...@chem.uzh.ch Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cp2k
Hi Rustam,
this problem may be caused by your Fortran compiler.
The current rebuild strategy is to recompile all source files that depend on a modified module (.mod) file. Each Fortran module file contains public API that the corresponding source file exports and ideally should be updated only when you change such API (e.g. prototype of public functions, structure of public derived types, public generic interfaces, etc.). If the only thing you do is to tweak the body of a public function without changing its prototype, the compiler should only update the relevant object (.o) file, so no dependent files will be recompiled. At least the latest gfortran acts this way.