petsc_install
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
petsc_install [2019/07/29 17:57] – freitash | petsc_install [2023/03/22 18:05] (current) – [Configuração usada atualmente Release (sem debug)] admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Para instalar PETSc, bem como os demais principais aplicativos empregados em conjunto, segundo a configuração utilizada atualmente pelo grupo de pesquisa, vá mais adiante nesta página clicando aqui. | ||
+ | |||
===== Pré-Requisitos: | ===== Pré-Requisitos: | ||
Line 4: | Line 6: | ||
< | < | ||
- | sudo apt install mpich valgrind python make bison flex -y | + | sudo apt install mpich valgrind python make cmake bison flex -y |
</ | </ | ||
+ | |||
+ | Obs: o //build //do PETSc foi criado em ///opt// para facilitar o compartilhamento com demais usuários. | ||
===== Passos de Instalação: | ===== Passos de Instalação: | ||
Line 14: | Line 18: | ||
< | < | ||
- | sudo ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-debugging=0 COPTFLAGS=' | + | sudo ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-debugging=0 |
</ | </ | ||
Tais opções são utilizadas de maneira padrão. Para demais opções [[https:// | Tais opções são utilizadas de maneira padrão. Para demais opções [[https:// | ||
- | * As instruções para os próximos passos aparecerão no próprio terminal à medida em que o pacote | + | * O comando de //build //é fornecido ao final do // |
* Por fim, adicione os comandos: | * Por fim, adicione os comandos: | ||
Line 29: | Line 33: | ||
substituindo caminho_diretorio pelo endereço do diretório de instalação do PETSc no arquivo .bashrc, localizado na pasta raiz. | substituindo caminho_diretorio pelo endereço do diretório de instalação do PETSc no arquivo .bashrc, localizado na pasta raiz. | ||
+ | |||
+ | ===== Configuração usada atualmente Release (sem debug)===== | ||
+ | == incluído no PETSc: | ||
+ | == instalar antes do PETSc: | ||
+ | |||
+ | ###1. Install Valgrind ### | ||
+ | |||
+ | ###2. Install MPICH ### | ||
+ | |||
+ | PETSc uses MPICH to deal with parallelism, | ||
+ | |||
+ | You can download the file [mpich-3.4.2.tar.gz](https:// | ||
+ | - Unpack the tar file and go to the top level directory: | ||
+ | ```bash | ||
+ | tar xzf mpich-3.4.2.tar.gz | ||
+ | cd mpich-3.4.2 | ||
+ | ``` | ||
+ | - Configure MPICH specifying the installation directory (could be either an empty directory or an non existent directory) and device: | ||
+ | ```bash | ||
+ | ./configure --prefix=/ | ||
+ | ``` | ||
+ | - Build MPICH: | ||
+ | ```bash | ||
+ | make 2>&1 | tee m.txt | ||
+ | ``` | ||
+ | - Install the MPICH commands: | ||
+ | ```bash | ||
+ | make install 2>&1 | tee mi.txt | ||
+ | ``` | ||
+ | - Add the bin subdirectory of the installation directory to your PATH by adding the following line to the file ~/.bashrc: | ||
+ | ```bash | ||
+ | export PATH="/ | ||
+ | ``` | ||
+ | Check that everything is in order at this point by doing: | ||
+ | ```bash | ||
+ | which mpicc | ||
+ | which mpicxx | ||
+ | which mpiexec | ||
+ | ``` | ||
+ | These commands should print the path to the bin subdirectory of the MPICH installation directory. | ||
+ | |||
+ | |||
+ | |||
+ | |||
petsc_install.1564423048.txt.gz · Last modified: by freitash