Re: [AMBER-Developers] [david.case.rutgers.edu: Re: Amber 'configure' now forcing miniconda?]

From: Tyler Luchko (Lists) <"Tyler>
Date: Sat, 24 Dec 2016 11:30:22 -0800

> On Dec 23, 2016, at 6:27 AM, David Case <david.case.rutgers.edu> wrote:
>
> On Thu, Dec 22, 2016, Tyler Luchko (Lists) wrote:
>>
>>>> Has anyone tried to just make a shadow directory (using "cp -as" or lndir),
>>>> with links to a clean amber tree, then build in the shadow directory?
>>>
>> FWIW, I’ve been using this approach for years. I use it to build and
>> test with different compilers using the same git repo. It also makes
>> git status much cleaner. And, if you are careful, you can switching
>> between branches with little or no recompiling.
>
> If you have time, can you say a little more?
>
> - What commands did you use to create the shadow directory?
> - What happens when files get added/deleted from the real source
> directory, or when you change branches there. What do you actually
> do to "be careful"?

The procedure is straightforward. For this example I’m keeping my Amber git repo in ‘../../code/‘.

mkdir amber-gcc48
lndir -silent ../../code/amber.git/
export AMBERHOME=`pwd`
./configure -noX11 gnu && make -j 5
cd ..
sudo port select gcc mp-gcc6
mkdir amber-gcc6
cd amber-gcc6
lndir -silent ../../code/amber.git/
export AMBERHOME=`pwd`
./configure -noX11 gnu && make -j 5

If you are using macports like me, you may need to switch compilers to make sure the right libraries are being used for different versions of the GNU compiler. If you are compiling with GNU and Intel side-by-side, as I do on my cluster, this is not an issue.

When I use the same repo to compile different branches, I’ll use roughly the same procedure as above but I’ll switch branches instead of compilers. The important thing to remember is that when you switch branches, the shadow directory for the inactive branches should not be used. While the compiled executables will be fine, other files that aren’t compiled may be different. Plus, if you recompile, the shadow directory will use the active branch.

If you add files to the repo, then you just need to rerun the lndir command. There isn’t an automatic solution I know of if files are deleted.

Even if you don’t want to mess around with different compilers or branches from a single source, shadow directories keep the git repo and ‘git status’ clean. For me, that is the greatest benefit.

Finally, Emacs automatically recognizes that the files are linked and part of a Git repo. It doesn’t matter if you open the link or the original, Emacs will update the original.

Tyler


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Sat Dec 24 2016 - 12:00:02 PST
Custom Search