<div dir="ltr"><div>Satish,</div><div>Great, thanks.</div><div>Santiago</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 19, 2020 at 12:23 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">PETSc supports both inplace multiple builds - and prefix builds. Most packages don't support inplace multiple builds. For inplace multiple builds - you need the PETSC_ARCH concept. But not for prefix builds.<br>
<br>
<br>
i.e: 2 inplace builds.<br>
<br>
./configure PETSC_ARCH=arch-build1 --with-cc=gcc etc..<br>
make<br>
./configure PETSC_ARCH=arch-build2 --with-cc=icc etc..<br>
make<br>
<br>
2 prefix builds<br>
<br>
./configure --prefix=$HOME/soft/petsc-install-1 PETSC_ARCH=arch-build1 --with-cc=gcc<br>
make<br>
make install<br>
<br>
./configure --prefix=$HOME/soft/petsc-install-1 PETSC_ARCH=arch-build2 --with-cc=icc<br>
make<br>
make install<br>
<br>
Note: using a different PETSC_ARCH above so that the intermediate build files from the first build don't conflict with those from the second build.<br>
<br>
Note: due to same files used in both cases - i.e prefix and inplace [i.e petsc sources from build location] for make check - a wrong value of 'PETSC_ARCH' can break 'make check'<br>
<br>
The files installed in prefix location don't care about PETSC_ARCH value.<br>
<br>
Satish<br>
<br>
On Sun, 19 Apr 2020, <a href="mailto:san.temporal@gmail.com" target="_blank">san.temporal@gmail.com</a> wrote:<br>
<br>
> Ok, the, the second option applies... I had forgotten about this<br>
> observation from the multiple times I installed PETSc in the past.<br>
> <br>
> Then, two questions come to mind:<br>
> <br>
> 1. Why is it set up like that?<br>
> 2. What is the difference in behaviour? I see the same output from both<br>
> options.<br>
> <br>
> Thanks again!<br>
> <br>
> On Sat, Apr 18, 2020 at 5:43 PM Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br>
> <br>
> > It's intentional and been like this for ages. Prefix installs have only<br>
> > PETSC_DIR (just a path, like other packages), and *must not* set<br>
> > PETSC_ARCH.<br>
> ><br>
> > <a href="mailto:san.temporal@gmail.com" target="_blank">san.temporal@gmail.com</a> writes:<br>
> ><br>
> > > Hi all,<br>
> > ><br>
> > > I have just successfully compiled 3.13.0. But with install this is what I<br>
> > > get<br>
> > ><br>
> > > $ make<br>
> > PETSC_DIR=/home/santiago/Documents/installers/petsc/petsc-3.13.0<br>
> > > PETSC_ARCH=arch-linux2-c-opt install<br>
> > > *** Using<br>
> > > PETSC_DIR=/home/santiago/Documents/installers/petsc/petsc-3.13.0<br>
> > > PETSC_ARCH=arch-linux2-c-opt ***<br>
> > > *** Installing PETSc at prefix location: /home/santiago/usr/local<br>
> > ***<br>
> > > ====================================<br>
> > > Install complete.<br>
> > > Now to check if the libraries are working do (in current directory):<br>
> > > make PETSC_DIR=/home/santiago/usr/local PETSC_ARCH="" check<br>
> > > ====================================<br>
> > > /usr/bin/make --no-print-directory -f makefile<br>
> > > PETSC_ARCH=arch-linux2-c-opt<br>
> > > PETSC_DIR=/home/santiago/Documents/installers/petsc/petsc-3.13.0<br>
> > > mpi4py-install petsc4py-install libmesh-install mfem-install<br>
> > slepc-install<br>
> > > hpddm-install amrex-install<br>
> > > make[2]: Nothing to be done for 'mpi4py-install'.<br>
> > > make[2]: Nothing to be done for 'petsc4py-install'.<br>
> > > make[2]: Nothing to be done for 'libmesh-install'.<br>
> > > make[2]: Nothing to be done for 'mfem-install'.<br>
> > > make[2]: Nothing to be done for 'slepc-install'.<br>
> > > make[2]: Nothing to be done for 'hpddm-install'.<br>
> > > make[2]: Nothing to be done for 'amrex-install'.<br>
> > ><br>
> > > What is strange to me is that I am instructed to execute a line with<br>
> > > PETSC_ARCH=", while my environment has PETSC_ARCH=arch-linux2-c-opt<br>
> > > Why is that?<br>
> > ><br>
> > > PS: The same happened to me with various other compilations I have just<br>
> > > tested, with 3.9, 3.10, 3.11, 3.12<br>
> > ><br>
> > > PS2: I do not recall seeing this ever before, although I may have missed<br>
> > > it/forgotten.<br>
> > ><br>
> > > Thanks in advance,<br>
> > > Santiago<br>
> ><br>
> <br>
<br>
</blockquote></div>