[petsc-users] Petsc configuration and multiple branch working

Satish Balay balay at mcs.anl.gov
Sat Sep 6 18:14:06 CDT 2014


On Sat, 6 Sep 2014, Barry Smith wrote:

> 
>    How do you use ccache?  Do you do this “weird” thing
> 
> To install for the second method, do something like this:
> 
> cp ccache /usr/local/bin/
> ln -s ccache /usr/local/bin/gcc
> ln -s ccache /usr/local/bin/g++
> ln -s ccache /usr/local/bin/cc
> ln -s ccache /usr/local/bin/c++

My linux box is configured this way [by the distribution]

balay at asterix /home/balay
$ which gcc
/usr/lib64/ccache/gcc
balay at asterix /home/balay
$ cd /usr/lib64/ccache/
balay at asterix /usr/lib64/ccache
$ ls -l
total 0
lrwxrwxrwx. 1 root root 16 Sep  2 16:41 c++ -> ../../bin/ccache*
lrwxrwxrwx. 1 root root 16 Sep  2 16:39 cc -> ../../bin/ccache*
lrwxrwxrwx. 1 root root 16 Sep  2 16:41 g++ -> ../../bin/ccache*
lrwxrwxrwx. 1 root root 16 Sep  2 16:39 gcc -> ../../bin/ccache*
lrwxrwxrwx. 1 root root 16 Sep  2 16:41 x86_64-redhat-linux-c++ -> ../../bin/ccache*
lrwxrwxrwx. 1 root root 16 Sep  2 16:41 x86_64-redhat-linux-g++ -> ../../bin/ccache*
lrwxrwxrwx. 1 root root 16 Sep  2 16:39 x86_64-redhat-linux-gcc -> ../../bin/ccache*
balay at asterix /usr/lib64/ccache
$

Satish
> 
>    Thanks
> 
>    Barry
> 
> 
> 
> On Sep 6, 2014, at 5:50 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> > Barry Smith <bsmith at mcs.anl.gov> writes:
> > 
> >>   The problem with using different PETSC_ARCH for each branch is that
> >>   when you switch the branches it will sometimes/often change an
> >>   include file that many of the C files are dependent on so make
> >>   gmake will require recompiling much of the library, with different
> >>   working directories this will not happen.
> > 
> > I use ccache so that those "recompiles" take less than 10 seconds on
> > average.  I don't think having a separate clone per branch is useful, so
> > I just have one clone and about 50 PETSC_ARCHes within it.  Reconfigure
> > is usually not necessary unless you have to go way back in history.
> 
> 


More information about the petsc-users mailing list