[petsc-users] Ignoring PETSC_ARCH for make check?
Satish Balay
balay at mcs.anl.gov
Sun Apr 19 10:22:50 CDT 2020
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.
i.e: 2 inplace builds.
./configure PETSC_ARCH=arch-build1 --with-cc=gcc etc..
make
./configure PETSC_ARCH=arch-build2 --with-cc=icc etc..
make
2 prefix builds
./configure --prefix=$HOME/soft/petsc-install-1 PETSC_ARCH=arch-build1 --with-cc=gcc
make
make install
./configure --prefix=$HOME/soft/petsc-install-1 PETSC_ARCH=arch-build2 --with-cc=icc
make
make install
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.
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'
The files installed in prefix location don't care about PETSC_ARCH value.
Satish
On Sun, 19 Apr 2020, san.temporal at gmail.com wrote:
> Ok, the, the second option applies... I had forgotten about this
> observation from the multiple times I installed PETSc in the past.
>
> Then, two questions come to mind:
>
> 1. Why is it set up like that?
> 2. What is the difference in behaviour? I see the same output from both
> options.
>
> Thanks again!
>
> On Sat, Apr 18, 2020 at 5:43 PM Jed Brown <jed at jedbrown.org> wrote:
>
> > It's intentional and been like this for ages. Prefix installs have only
> > PETSC_DIR (just a path, like other packages), and *must not* set
> > PETSC_ARCH.
> >
> > san.temporal at gmail.com writes:
> >
> > > Hi all,
> > >
> > > I have just successfully compiled 3.13.0. But with install this is what I
> > > get
> > >
> > > $ make
> > PETSC_DIR=/home/santiago/Documents/installers/petsc/petsc-3.13.0
> > > PETSC_ARCH=arch-linux2-c-opt install
> > > *** Using
> > > PETSC_DIR=/home/santiago/Documents/installers/petsc/petsc-3.13.0
> > > PETSC_ARCH=arch-linux2-c-opt ***
> > > *** Installing PETSc at prefix location: /home/santiago/usr/local
> > ***
> > > ====================================
> > > Install complete.
> > > Now to check if the libraries are working do (in current directory):
> > > make PETSC_DIR=/home/santiago/usr/local PETSC_ARCH="" check
> > > ====================================
> > > /usr/bin/make --no-print-directory -f makefile
> > > PETSC_ARCH=arch-linux2-c-opt
> > > PETSC_DIR=/home/santiago/Documents/installers/petsc/petsc-3.13.0
> > > mpi4py-install petsc4py-install libmesh-install mfem-install
> > slepc-install
> > > hpddm-install amrex-install
> > > make[2]: Nothing to be done for 'mpi4py-install'.
> > > make[2]: Nothing to be done for 'petsc4py-install'.
> > > make[2]: Nothing to be done for 'libmesh-install'.
> > > make[2]: Nothing to be done for 'mfem-install'.
> > > make[2]: Nothing to be done for 'slepc-install'.
> > > make[2]: Nothing to be done for 'hpddm-install'.
> > > make[2]: Nothing to be done for 'amrex-install'.
> > >
> > > What is strange to me is that I am instructed to execute a line with
> > > PETSC_ARCH=", while my environment has PETSC_ARCH=arch-linux2-c-opt
> > > Why is that?
> > >
> > > PS: The same happened to me with various other compilations I have just
> > > tested, with 3.9, 3.10, 3.11, 3.12
> > >
> > > PS2: I do not recall seeing this ever before, although I may have missed
> > > it/forgotten.
> > >
> > > Thanks in advance,
> > > Santiago
> >
>
More information about the petsc-users
mailing list