diff --git a/README.md b/README.md index ac4af28..55a5a2b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # Paralelización de simulación de permeabilidad +## Paso inicial en entorno NIX + +Ejecutar en la carpeta del proyecto + +``` +nix-shell +``` + +y seguir todos los pasos subsiguientes en ese entorno. +*No hace instalar python3, pip, gfortran, gcc y build-essentials pues están provistos por el nix-shell.* +Para más info ver el archivo `shell.nix`. + ## Instalación de las librerías (Python 3) Como requisitos previos a la instalación hace falta tener: diff --git a/requirements.txt b/requirements.txt index 087add0..be65f92 100644 --- a/requirements.txt +++ b/requirements.txt @@ -59,8 +59,8 @@ packaging==23.1 pandas==2.0.1 pandocfilters==1.5.0 parso==0.8.3 -petsc==3.19.0 -petsc4py==3.19.0 +petsc==3.19.4 +petsc4py==3.19.4 pexpect==4.8.0 pickleshare==0.7.5 Pillow==9.5.0 diff --git a/run_simulation.sh b/run_simulation.sh index 143c8c0..d56707e 100755 --- a/run_simulation.sh +++ b/run_simulation.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source venv/bin/activate mpirun python3 mpirunner.py diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..7ffa905 --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +# nix-shell -p [ (python3Full.withPackages(ps: with ps; [ pip ])) gfortran zlib] + +with import {}; + +stdenv.mkDerivation { + name = "python-env-petsc"; + + nativeBuildInputs = [ m4 removeReferencesTo ]; + buildInputs = [ (python3Full.withPackages(ps: with ps; [ pip ])) + gfortran + zlib + gcc + ]; + dontAddPrefix=true; + + env.LD_LIBRARY_PATH = zlib + "/lib:" + stdenv.cc.cc.lib + "/lib"; +}