Re: [AMBER-Developers] 3rd attempt to merge energy drift fix

From: Jamie Smith <jsmith.crackofdawn.onmicrosoft.com>
Date: Fri, 8 Apr 2022 20:57:33 +0000

Removing the CMakeCache.txt file forces a complete reconfigure and rebuild of the project, and only needs to be done in a few situations:
- If the build scripts have been modified in a way that they're incompatible with an older cache file and causing errors (rare but it can happen)
- If a library on your system that Amber links to has been deleted or moved (CMake will likely cache the original location and then the build will error out)
- If the build or source dirs themselves have been moved to a different absolute path
- As a last resort if you're dealing with a weird build error and you suspect it's due to stale modules / libraries in the build dir.

In all other situations, you should be be able to just rerun cmake with the existing cache, and it should be able to do an incremental reconfigure and go a lot faster.

Hope that makes sense,
    Jamie

P.S. If you want to do a clean build, it's actually better to just rm -rf * in the build directory than to delete the cache. That way you also clear out any old fortran modules that may be hanging around.

________________________________
From: David A Case <david.case.rutgers.edu>
Sent: Friday, April 8, 2022 8:18 AM
To: AMBER Developers Mailing List
Subject: Re: [AMBER-Developers] 3rd attempt to merge energy drift fix

On Fri, Apr 08, 2022, Dave Cerutti wrote:

>I didn't know that the -j
>flag works with our cmake installation--my experience was that trying to
>make with -j8 got me into trouble

FWIW, I use -j4 or -j6 all the time (depening on how many cores I have on
the machine I am using.) That said, it is certainly possible that there is
some problem with dependencies that leads to intermittent problems. These
dependencies are built by cmake (which should be an advantage compared to the
hand-built perl scripts we used to use to generate dependencies), but it
depends both the on the accuracy of the information we give to cmake, and on
its internal ability to create the correct connections.

I *do* find it hard to know when one needs to rm the CMakeCache.txt file when
re-running cmake itself. My inclination is to always do this, even if it
takes a few extra seconds at the build stage.

....dac


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Apr 08 2022 - 14:00:03 PDT
Custom Search