On Fri, 4 Nov 2022, Mike Michell wrote: > Thank you very much. It seems that --download-package={downloaded_dir} is > the right way to let PETSc know the source files and let it configures & > installs everything as it wants. > If I try --with-packages-download-dir, PETSc again tries to connect and get > the external packages from online, which I cannot do.
No - it tells you what to download - and where to place it locally. In my example below - I used 'git clone' but you can use rsync or any other mechanism that you are currently using to copy stuff over. And sure --download-package=/local/location/[tarball,git,dir] also works . Satish > > Thanks, > > > > Can you try the --with-packages-download-dir option? > > > > It tells you the URL to download - and then PETSc configure does the > > install. > > > > Satish > > > > -------- > > > > balay@p1 /home/balay/petsc (release =) > > $ ./configure --with-packages-download-dir=$HOME/tmp --download-triangle > > Download the following packages to /home/balay/tmp > > > > triangle ['git://https://bitbucket.org/petsc/pkg-triangle', ' > > https://bitbucket.org/petsc/pkg-triangle/get/v1.3-p2.tar.gz'] > > > > Then run the script again > > > > balay@p1 /home/balay/petsc (release =) > > $ pushd $HOME/tmp > > ~/tmp ~/petsc > > balay@p1 /home/balay/tmp > > $ git clone -q https://bitbucket.org/petsc/pkg-triangle > > balay@p1 /home/balay/tmp > > $ popd > > ~/petsc > > balay@p1 /home/balay/petsc (release =) > > $ ./configure --with-packages-download-dir=$HOME/tmp --download-triangle > > > > ============================================================================================= > > Configuring PETSc to compile on your system > > > > ============================================================================================= > > > > ============================================================================================= > > Running /home/balay/soft/sowing-1.1.26-p1/bin/bfort to generate > > Fortran stubs > > > > ============================================================================================= > > > > ============================================================================================= > > Trying to download /home/balay/tmp/pkg-triangle for > > TRIANGLE > > > > ============================================================================================= > > > > ============================================================================================= > > Compiling Triangle; this may take several minutes > > > > ============================================================================================= > > > > ============================================================================================= > > Installing Triangle; this may take several minutes > > > > ============================================================================================= > > TESTING: checklsame from > > config.packages.BlasLapack(config/BuildSystem/config/packages/BlasLapack.py:691) > > > > ... > > .. > > > > > > On Fri, 4 Nov 2022, Mike Michell wrote: > > > > > Hi, > > > > > > I need to install PETSc and its dependencies to a linux system, which > > does > > > not allow git clone from online. Thus I need to install all the > > > dependencies by having their source files. First I downloaded and > > installed > > > all the dependencies by relying on PETSc on my local linux (which means I > > > used --download=triangle), then tar all of them, and brought them to the > > > cluster. > > > > > > There is an issue with Triangle. I can do make (or cmake using the > > > CMakeList file that Triangle 1.6 provides, although PETSc --download > > > provides Triangle 1.3) and can get "libtriangle.a". But during the PETSc > > > configure step, it fails with the error message below: > > > > > > {$Triangle_Home}/build/libtriangle.a(triangle.c.o): In function > > `poolinit': > > > triangle.c:(.text+0x15aa): undefined reference to `PetscTrMalloc' > > > {$Triangle_Home}/build/libtriangle.a(triangle.c.o): In function > > > `pooldeinit': > > > triangle.c:(.text+0x1708): undefined reference to `PetscTrFree' > > > ... > > > > > > It seems that I need to let Triangle know that it will be used by PETSc > > to > > > enable those functions when I install Triangle. Is this correct > > > understanding? If so, how can I configure, install, and link Triangle > > with > > > PETSc? > > > > > > I have seen some PETSc related commands in configure.py in the root > > > directory of Triangle downloaded by PETSc, but it is not clear how this > > > python script is related or can be used by user like me. > > > > > > Thanks, > > > Mike > > > > > > > >