Home
last modified time | relevance | path

Searched +full:petsc4py +full:- +full:install (Results 1 – 25 of 32) sorted by relevance

12

/petsc/src/binding/petsc4py/docs/source/
H A Dinstall.rst6 Install from PyPI using **pip**
7 -------------------------------
9 You can use :program:`pip` to install :mod:`petsc4py` and its dependencies::
11 $ python -m pip install petsc petsc4py
13 Install from the PETSc source tree
14 ----------------------------------
20 $ python -m pip install src/binding/petsc4py
22 The installation of :mod:`petsc4py` supports multiple `PETSC_ARCH
25 $ PETSC_ARCH='arch-0:...:arch-N' python -m pip install src/binding/petsc4py
27 If you are cross-compiling, and the :mod:`numpy` module cannot be loaded on
[all …]
H A Dcontributing.rst8 New contributions to petsc4py **must** adhere with the coding standards.
9 We use cython-lint_ for Cython and ruff_ for Python source codes.
12 $ python -m pip install -r src/binding/petsc4py/conf/requirements-lint.txt
16 $ make cython-lint -C src/binding/petsc4py
20 $ make ruff-lint -C src/binding/petsc4py
22 Python code can be auto-formatted using::
24 $ make ruff-lint RUFF_OPTS='format' -C src/binding/petsc4py
26 New contributions to petsc4py must be tested.
27 Tests are located in the :file:`src/binding/petsc4py/test` folder.
29 pre-existing file according to the
[all …]
H A Dindex.rst14 This document describes :mod:`petsc4py`, a Python_ wrapper to the PETSc_
21 all message-passing communication.
26 A *good friend* of petsc4py is:
31 Other projects depend on petsc4py:
44 install
/petsc/src/binding/petsc4py/
H A Dmakefile1 -include ../../../petscdir.mk
4 default: opt=--inplace
6 package = petsc4py
12 # ----
21 test-%:
22 ${MPIEXEC} -n $* ${VALGRIND} ${PYTHON} ${PWD}/test/runtests.py ${opt}
28 -${RM} src/${package}/${MODULE}.c
29 -${RM} src/${package}/${MODULE}.h
30 -${RM} src/${package}/${MODULE}_api.h
34 ${PYTHON} setup.py clean --all
[all …]
H A DDESCRIPTION.rst6 Install chapter
7 -------
10 wrapper is on your search path, it is highly recommended to install
13 $ pip install mpi4py
17 $ pip install numpy
21 $ pip install petsc petsc4py
25 ---------
33 Advances in Water Resources, 34(9):1124-1139, 2011.
43 *PETSc/TAO Users Manual*, ANL-21/39 - Revision 3.24, 2025.
H A DCHANGES.rst12 - Update to PETSc 3.24 release.
14 - Support (opt-in via setting the environment variable
21 - Update to PETSc 3.23 release.
26 - Update to PETSc 3.22 release.
31 - Update to PETSc 3.21 release.
36 - Update to PETSc 3.20 release.
37 - Update Cython build, require ``Cython >= 3.0.0``.
42 - Update to PETSc 3.19 release.
43 - Expose ``PetscDevice`` and ``PetscDeviceContext`` API as
49 - Update to PETSc 3.18 release.
[all …]
/petsc/lib/petsc/bin/maint/
H A Dcreatepatch6 # example usage: createpatch /sandbox/petsc/petsc-dist
16 if [ ! -d $petscrepo ]; then
22 if [ ! -f include/petscversion.h ]; then
27 if [ ! -f doc/install/download.md ]; then
28 echo "Error: dir $petscrepo/doc/install/download.md does not exist"
33 a=`git status --untracked-files=no --short | wc -l`
36 git status --untracked-files=no --short
40 #git_branch=`git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3`
46 …elease=`grep '^#define PETSC_VERSION_RELEASE ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`
47 …on_major=`grep '^#define PETSC_VERSION_MAJOR ' include/petscversion.h |tr -s ' ' | cut -d ' ' -f 3`
[all …]
H A Dbuilddist1 #!/bin/bash -ex
5 # Usage: builddist petscrepo [branch/commit] [version-suffix]
9 # when version-suffix="SETVERSION", obtain it from include/petscversion.h
12 # builddist /sandbox/petsc/petsc.clone balay/foo [creates petsc-HASH.tar.gz]
13 # builddist /sandbox/petsc/petsc.clone main ver-suffix [creates petsc-ver-suffix.tar.gz]
14 # builddist /sandbox/petsc/petsc.clone release SETVERSION [creates petsc-3.24.5.tar.gz]
18 # ignore command line options in CI mode - and build tarball from current state setup by CI
19 if [ ! -z "${CI_PIPELINE_ID+x}" ]; then
20 petscrepo=`pwd -P`
24 version=-$3
[all …]
/petsc/config/BuildSystem/config/packages/
H A Dpetsc4py.py17 …help.addArgument('PETSc', '-with-petsc4py=<bool>', nargs.ArgBool(None, False, 'Build PETSc Python …
18 ….addArgument('PETSc', '-with-petsc4py-test-np=<np>',nargs.ArgInt(None, None, min=1, help='Number o…
19 …help.addArgument('PETSc', '-with-numpy-include=<dir>', nargs.Arg(None, None, 'Path to numpy header…
24 s = 'petsc4py:\n'
44 return os.path.join('src','binding','petsc4py')
46 def Install(self): member in Configure
58 archflags = "ARCHFLAGS=\'-arch arm64\' "
59 elif self.types.sizes['void-p'] == 4:
60 archflags = "ARCHFLAGS=\'-arch i386\' "
62 archflags = "ARCHFLAGS=\'-arch x86_64\' "
[all …]
H A DPFLARE.py25 self.kokkoskernels = framework.require('config.packages.kokkos-kernels',self)
27 self.petsc4py = framework.require('config.packages.petsc4py',self)
30 self.odeps = [self.kokkos,self.kokkoskernels,self.petsc4py,self.cython]
33 def Install(self): member in Configure
41 if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB:
46 barg = barg + ' CFLAGS="-I${PETSC_DIR}/include ${CFLAGS}"'
47 barg = barg + ' CPPFLAGS="-I${PETSC_DIR}/include ${CPPFLAGS}"'
48 barg = barg + ' CXXFLAGS="-I${PETSC_DIR}/include ${CXXFLAGS}"'
59 # Call make, make python (if petsc4py is enabled), then
60 # make install. After that create a symlink called libpetscpflare
[all …]
H A Dslepc4py.py17 …help.addArgument('slepc4py', '-with-slepc4py=<bool>', nargs.ArgBool(None, False, 'Build SLEPc Pyth…
36 self.petsc4py = framework.require('config.packages.petsc4py',self)
38 self.deps = [self.petsc4py,self.slepc]
47 if 'with-slepc4py' in self.argDB and self.argDB['with-slepc4py']:
48 if not 'download-slepc' in self.argDB or not self.argDB['download-slepc']:
49 raise RuntimeError('The option --with-slepc4py requires --download-slepc')
51 def Install(self): member in Configure
63 archflags = "ARCHFLAGS=\'-arch arm64\' "
64 elif self.types.sizes['void-p'] == 4:
65 archflags = "ARCHFLAGS=\'-arch i386\' "
[all …]
H A DFEniCS-DOLFINx.py24 self.petsc4py = framework.require('config.packages.petsc4py',self)
26 self.basix = framework.require('config.packages.fenics-basix',self)
38 …self.deps = [self.mpi4py,self.petsc4py,self.boost,self.basix,self.ffcx,self.hdf5,self…
44 args.append('-DDOLFINX_ENABLE_PETSC=ON')
45 args.append('-DDOLFINX_ENABLE_SLEPC=ON')
46 args.append('-DHDF5_DIR=' + self.hdf5.include[0])
48 args.append('-DDOLFINX_ENABLE_PARMETIS=ON')
50 args.append('-DDOLFINX_ENABLE_SCOTCH=ON')
52 …ror('PETSc must provide either ParMETIS or PTSCOTCH, suggest --download-parmetis --download-metis')
60 …raise RuntimeError("FEniCS-DOLFINx requires HDF5 with C++ bindings, ensure you use --with-hdf5-cxx
[all …]
H A DSLEPc.py6 self.gitcommit = '2435073368006cab65837fb206144f409508c908' # main feb-20-2026
8 …itlab.com/slepc/slepc.git','https://gitlab.com/slepc/slepc/-/archive/'+self.gitcommit+'/slepc-'+se…
20 …help.addArgument('SLEPC', '-download-slepc-configure-arguments=string', nargs.Arg(None, None, 'Add…
40 if 'download-slepc' in self.argDB and self.argDB['download-slepc']:
41 …if 'download-slepc-configure-arguments' in self.argDB and '--with-slepc4py' in self.argDB['downloa…
42 …RuntimeError('You should set --with-slepc4py as a separate option of PETSc configure, not within -…
43 if self.argDB['with-petsc4py'] and not self.argDB['with-slepc4py']:
44 …raise RuntimeError('You should also set --with-slepc4py when using both --with-petsc4py and --down…
47 def Install(self): member in Configure
50 if self.argDB['prefix'] and not 'package-prefix-hash' in self.argDB:
[all …]
/petsc/doc/install/
H A Dindex.md3 # Install chapter
8 you to install PETSc.
12 - Archlinux <https://aur.archlinux.org/packages/petsc>
13 - Conda: <https://anaconda.org/conda-forge/petsc>
14 : `conda install -c conda-forge petsc`
15 - Debian: <https://packages.debian.org/petsc-dev>
16 : `sudo apt install petsc-dev`
17 - E4S: <https://e4s.io/download.html>
18 - Fedora: <https://packages.fedoraproject.org/pkgs/petsc/petsc>
19 : `sudo yum install petsc-mpich-devel`
[all …]
/petsc/
H A D.gitlab-ci.yml2 # stage-1 take only a few minutes; they do not run the full test suite or external packages.
4 # stage-2 runs on MCS systems and may take 10 to 15 minutes. They run the full test suite but with …
6 # stage-3 runs on MCS systems and may take an hour or more. They run the full test suite and heavil…
8 # The stage-(n) tests are only started if all of the stage-(n-1) tests run without error
13 - stage-1
14 - stage-2
15 - stage-3
16 - stage-4
19 GIT_CLEAN_FLAGS: -ffdxq
21 BASE_EXTRA_OPTIONS: -nox -nox_warning -malloc_dump
[all …]
H A Dsetup.py11 all message-passing communication.
15 To install the ``PETSc`` and ``petsc4py`` packages use::
17 $ python -m pip install numpy
18 $ python -m pip install petsc petsc4py
22 You can also install the in-development versions with::
24 $ python -m pip install cython numpy
25 … $ python -m pip install --no-deps https://gitlab.com/petsc/petsc/-/archive/main/petsc-main.tar.gz
29 …t use the ``PETSc`` ``./configure`` options ``--with-cc``, ``--with-cxx``, ``--with-fc``, or ``--w…
41 from setuptools.command.install import install as _install
50 # Contact: petsc-maint@mcs.anl.gov
[all …]
H A D.gitignore9 */.auctex-auto/*
19 unix-opt/*
20 unix-gcov/*
21 package-*/*
25 arch-*/*
26 *-arch-*/*
27 petsc-install/*
28 batch-test
36 reconfigure-*.py
39 ftn-auto
[all …]
H A Dmakefile2 # See https://petsc.org/release/install/ for instructions on installing PETSc
5 # * make help - useful messages on functionality
6 # * make all - compile the PETSc libraries and utilities, run after ./configure
7 # * make check - runs a quick test that the libraries are built correctly and PETSc applications …
9 # * make install - for use with ./configure is run with the --prefix=directory option
10 # * make test - runs a comprehensive test suite (requires gnumake)
11 # * make docs - build the entire PETSc website of documentation (locally)
15 # gmakefile - manages the compiling PETSc in parallel
16 # gmakefile.test - manages running the comprehensive test suite
32 OMAKE_SELF = $(OMAKE) -f makefile
[all …]
/petsc/src/sys/python/
H A Dpythonsys.c14 PetscCall(PetscOptionsGetString(NULL, NULL, "-python", pythonexe, len, &flag)); in PetscPythonFindExecutable()
49 // clang-format off in PetscPythonFindLibrary()
50 …const char *const cmdlines[] = {"-c 'import os, sysconfig; print(os.path.join(sysconfig.get_config… in PetscPythonFindLibrary()
51 …"-c 'import os, sysconfig; print(os.path.join(sysconfig.get_path(\"stdlib\"),os.path.pardir,\"libp… in PetscPythonFindLibrary()
52 …"-c 'import os, sysconfig; print(os.path.join(sysconfig.get_path(\"stdlib\"),os.path.pardir,\"libp… in PetscPythonFindLibrary()
53 …"-c 'import os, sysconfig; print(os.path.join(sysconfig.get_config_var(\"LIBPL\"),sysconfig.get_co… in PetscPythonFindLibrary()
54 … "-c 'import sysconfig; print(sysconfig.get_config_var(\"LIBPYTHON\"))'", in PetscPythonFindLibrary()
55 …"-c 'import os, sysconfig; print(os.path.join(sysconfig.get_config_var(\"LIBDIR\"),\"libpython\"+s… in PetscPythonFindLibrary()
56 …"-c 'import os, sysconfig; print(os.path.join(sysconfig.get_config_var(\"LIBDIR\"),\"libpython\"+s… in PetscPythonFindLibrary()
57 // clang-format on in PetscPythonFindLibrary()
[all …]
/petsc/doc/
H A Dindex.md4 pronounced PET-see ([/ˈpɛt-siː/](https://en.wikipedia.org/wiki/Help:IPA/English#Key)), is
6 …y partial differential equations (PDEs). It has bindings for C, Fortran, and Python (via petsc4py).
9 CUDA, HIP, Kokkos, or OpenCL, as well as hybrid MPI-GPU parallelism; they also support the NEC-SX T…
14 …](https://www.firedrakeproject.org/firedrake_26.html) will take place June 1-3, 2026 in Oxford, UK…
17-of-a-Feather (BoF) session on February 11, 2026, as part of the [CASS BoF Days](https://cass.comm…
20 …imous vote of the PETSc council. {any}`Current list of NumFOCUS signatories<numfocus-signatories>`.
22 …://www.siam.org/publications/siam-news/articles/opencarp-personalized-computational-model-of-the-h…
23 on the PETSc-powered [OpenCarp](https://opencarp.org/) cardiac electrophysiology simulator.
29 > - [Book from SIAM Press](https://my.siam.org/Store/Product/viewproduct/?ProductId=32850137)
30 > - [Google Play E-book](https://play.google.com/store/books/details/Ed_Bueler_PETSc_for_Partial_Di…
[all …]
/petsc/doc/changes/
H A D314.md6 - Deprecate PetscIgnoreErrorHandler(), use PetscReturnErrorHandler()
7 - Replace -debugger_nodes with -debugger_ranks
8 - Change PETSCABORT() to abort instead of MPI_Abort if run under
9 -start_in_debugger
10 - Add PETSC_MPI_THREAD_REQUIRED to control the requested threading
12 - Add CUDA-11 support, but with CUDA-11,
13 -mat_cusparse_storage_format {ELL, HYB} are not supported anymore.
15 - Add CUDA-11 option -mat_cusparse_spmv_alg {MV_ALG_DEFAULT,
18 - Add CUDA-11 option -mat_cusparse_spmm_alg {ALG_DEFAULT, CSR_ALG1
20 - Add CUDA-11 option -mat_cusparse_csr2csc_alg {ALG1 (default),
[all …]
H A D324.md12 - Add `PETSCPYTHONPATH` to the generated `$PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/petscvariables` fil…
13 - Add `PETSCPYTHONPATH` to the generated `$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig/PETSc.pc` file so it…
14 …`PKG_CONFIG_PATH=$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig pkg-config --variable=PETSCPYTHONPATH PETSc.…
15 - Add `EXTRA_OPTIONS_INITIAL` to the test system, which prepends options
20 - Change `make sphinxhtml` in the `doc` directory to be `make docs`
21 - Change `make docs` to put all its artifacts in `${PETSC_ARCH}-doc` instead of `doc`
22 - Add support for `--download-xxx`, `--with-xxx`, and `-with-xxx-dir` for Python packages that inst…
23 - Change `make alletags` to `make etags`
24 - Deactivate Fortran bindings of SuperLU_DIST and ExodusII by default, but they can still be built …
25 - Add `--with-python-exec-from-env=python` to allow providing the Python to be used by mpi4py and p…
[all …]
/petsc/config/
H A Dconfigure.py30 …raise ValueError('The option "'+name+'" has a space character in the name - this is likely incorre…
37 raise ValueError('The option '+name+' should probably be '+name.replace('_', '-'));
43 if name.find(exc.replace('_','-')) > -1:
44 raise ValueError('The option '+opt+' should be '+opt.replace(exc.replace('_','-'),exc));
48 …if '--with-precision=single' in opts and '--with-clanguage=cxx' in opts and '--with-scalar-type=co…
49 …('PETSc does not support single precision complex with C++ clanguage, run with --with-clanguage=c')
52 # Document changes in command line options here. (matlab-engine is deprecated, no longer needed but…
53 optMap = [('with-64bit-indices','with-64-bit-indices'),
54 ('with-mpi-exec','with-mpiexec'),
55 ('c-blas-lapack','f2cblaslapack'),
[all …]
/petsc/src/snes/tutorials/
H A Dex34.c11 To visualize the solution, configure with petsc4py, pip install pyvista, and use
13 -potential_view pyvista -view_pyvista_warp 1.
17 -snes_convergence_estimate -convest_num_refine 2 -convest_monitor -convest_error_view pyvista
21 -snes_vi_monitor_residual pyvista -snes_vi_monitor_active pyvista
25 -snes_vi_monitor -snes_converged_reason -convest_monitor
57 const PetscReal r_0 = par->r_0; in obstacle_ball()
59 const PetscReal psi_0 = PetscSqrtReal(1. - PetscSqr(r_0)); in obstacle_ball()
60 const PetscReal dpsi_0 = -r_0 / psi_0; in obstacle_ball()
64 if (r < r_0) u[0] = PetscSqrtReal(1.0 - PetscSqr(r)); in obstacle_ball()
65 else u[0] = psi_0 + dpsi_0 * (r - r_0); in obstacle_ball()
[all …]
/petsc/lib/petsc/conf/
H A Drules_util.mk1 # -*- mode: makefile-gmake -*-
10 -@${PETSC_DIR}/lib/petsc/bin/petscversion
13 -@echo ${MPI_LIB}
16 -@echo ${MPI_INCLUDE}
19 -@echo ${MPIEXEC}
22 -@echo ${CC}
25 -@echo ${FC}
28 -@echo ${CXX}
31 -@echo ${C_SH_LIB_PATH} ${PETSC_TS_LIB}
34 -@echo ${PETSC_CC_INCLUDES}
[all …]

12