petsc | http : //www.mcs.anl.gov/petsc/
kandi X-RAY | petsc Summary
kandi X-RAY | petsc Summary
http://www.mcs.anl.gov/petsc/
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of petsc
petsc Key Features
petsc Examples and Code Snippets
Community Discussions
Trending Discussions on petsc
QUESTION
I am interested in using the open source code discussed here. The framework and some instruction on how to run the code is discussed here. To be able to use the code one should first install PETSc. I have done this and it seems to be correctly installed. The problem rises when I try to run make topopt
following the instructions given in the paper (section 2.2). On the GitHub there exists a makefile_ref
where following the instructions given in the paper I make the following changes: PETSC_DIR=\home\myusername\petsc
and PETSC_ARCH=arch-linux-c-debug
. After running make -d topopt
I get the following error:
ANSWER
Answered 2021-Apr-20 at 20:16there exists a
makefile_ref
where following the instructions given in the paper I make the following changes [...]
Absent an explicit option specifying a makefile to read, the make
utility looks for input files by several alternative names. makefile_ref
is not one of them. I take the "_ref" part of the filename as mnemonic for "reference", and from that perspective the intention appears to be that you copy makefile_ref
to, say, makefile
(one of the file names that make
does look for by default), and modify the copy to be appropriate for your environment.
QUESTION
I have both mpich and openmpi in my Ubuntu 20.04.
...ANSWER
Answered 2021-Mar-09 at 10:34It seems all alternatives, except for one (link group mpi
), were already set for openmpi
QUESTION
I'm trying to use PETSc's DMDA Vectors with 2 degrees of freedom and access them using struct, like in the manual.
However, when I try to use DMDAVecGetArray
even with one degree of freedom (like in example below) I get memory double free or corruption
error. When I replace DMDAVecGetArray
with VecGetArray
everything works just fine.
What causes this error?
Compile MWE with
...ANSWER
Answered 2021-Mar-05 at 09:00Ok, found the problem. The key difference here is that when using VecGetArray
underlying array is indexed using local indexes, and when using DMDAVecGetArray
global indexes are used.
So, in order to fix the code I have to get not only the size of the array, but also the first index of the local vector portion.
Using function
QUESTION
I'm implementing finite difference algorithm from uFDTD book. Many FDM equations involve operations on adjoined vector elements. For example, an update equation for electric field
...ANSWER
Answered 2021-Mar-02 at 22:33If my goal was efficiency, I would call a stencil engine. There are many many many papers, and sometimes even open source code, for example, Devito. The idea is that PETSc manages the data structure and parallelism. Then you can feed the local data brick to your favorite stencil computer.
QUESTION
I am trying to use some open source program, and I typed 'make data' to create 'data' file, but it created following response with error
...ANSWER
Answered 2021-Feb-02 at 04:56The -gdb
is not a valid GCC argument, and that is exactly what the error tells you.
Use -ggdb
instead.
Update:
/usr/bin/ld: cannot find -l/home/songyi719/Desktop/Research/petsc-3.1-p6/installation_folder/include
Did you write the Makefile
yourself?
This is wrong: ... -l$(PETSCINC) -l$(TECINC) -l$(HYPREINC) ...
All of these -l
s should be -I
s instead: ... -I$(PETSCINC) -I$(TECINC) -I$(HYPREINC) ...
Update2:
Actually, since this is a link command and there are no sources being complied here, all of these: -I$(PETSCINC) -I$(TECINC) -I$(HYPREINC)
should be deleted instead (just from the link command).
QUESTION
The make
instruction is not finding the libraries required for compilation. They are in other folder than the usual /usr/include
folder.
I'm complying a simulation software called magnum.fe I already installed all the required dependencies (FEniCS = 1.5
CMake >= 2.8
SWIG >= 2.0
G++ >= 4.0) and started to run make
as the instructions suggest.
ANSWER
Answered 2020-Dec-09 at 20:20I've made it!
There are two options available:
Specify the libraries to use with the make command editing the MAKEfile, use the variable LDLIBS
to set it up. Detailed usage in here: https://web.archive.org/web/20070723140628/http://arco.inf-cr.uclm.es/~david.villa/doc/repo/make/make.html#AEN36
or
Create symbolic links pointing to /usr/include
. In my case I used:
QUESTION
I'm leaning petsc (3.13.1) on a Linux virtual machine. The compiler is mpich-3.2.1 compiled with gfortran.
While going through the tutorials I found the extensinos are .F90
,
the files did not work after I changed the ext to .f90
.
I added some rules for .f90
in the makefile, still, it did not work.
I'm wondering how to revise makefile for the .f90
extensions.
Test codes:
...ANSWER
Answered 2020-Aug-17 at 06:50Thanks for Mark and evets.
I fix it by adding the -cpp
flag to FFLAGS
after checking the preprocessing part of
the manual https://linux.die.net/man/1/gfortran
The makefile revised part:
QUESTION
I am trying to pass an array of Vec's in PETSc to a function, modify it internally and retrieve the results. A pseudocode is as follows:
...ANSWER
Answered 2020-Jul-23 at 07:48There were two problems: 1) The address of the pointer *y
was not passed to foo [@Chase] . 2) a double pointer call would solve the issue in VecNorm
within foo()
QUESTION
Computer configuration: my computer is maosx system, in the virtual machine installed ubuntu, the original system install ladder (VPN), Linux did not install a successful ladder (VPN).
Environment configuration: install petsc in the virtual machine, download and unpack petsc software package, install GCC, gfortran, and download MPI and BLAS/LAPACK separately before, but there was an error when installing MPI. .
...ANSWER
Answered 2020-Apr-15 at 18:33As Satish said in email, your machine likely ran out of memory. gfortran can take more the 2GB of RAM when compiling. An alternative, if you do not need Fortran, is to configure using --with-fc=0.
QUESTION
I cannot install petsc4py
in my Anaconda environment using pip
.
Installing with conda
doesn't work because it won't check my predefined PETSC_DIR and PETSC_ARCH environment variables during installation. numpy
and cython
are installed.
The error output by pip install
is shown in section IV, below.
I have Ananconda 2020.02, installed with Python 3.7. My OS is Ubuntu 18.04.
III) Reproducing the issue 1) Make a user installation of OpenMPI 4.0.3Configured using
...ANSWER
Answered 2020-Apr-04 at 15:49I was trying to install petsc4py
with the then latest released version 3.12.0 while having installed and configured PETSc version 3.13.0. This now seems quite obvious that it wouldn't work, but there wasn't a clear mention of this in the documentation.
You can either install the none-released version using pip install https://bitbucket.org/petsc/petsc4py/issues/137/error-installing-in-anaconda-environment
OR wait for it to be released officially!
Make sure that your version of PETSc is the same as petsc4py
!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install petsc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page