Compare commits
20 Commits
milestone_
...
main
Author | SHA1 | Date |
---|---|---|
|
4397259bf1 | 1 year ago |
|
74aae9f91d | 2 years ago |
|
cbb0768707 | 2 years ago |
|
7f0f57b58f | 2 years ago |
|
949b7853ab | 2 years ago |
|
fc50b6b600 | 2 years ago |
|
debbcaca50 | 2 years ago |
|
f775ea5faf | 2 years ago |
|
0aac969f23 | 2 years ago |
|
f2e15adaba | 2 years ago |
|
0dcc4054bb | 2 years ago |
|
bd43d201f9 | 2 years ago |
|
ca1a550bd3 | 2 years ago |
|
e6a68668f5 | 2 years ago |
|
f323721159 | 2 years ago |
|
c641704839 | 2 years ago |
|
d1af191f70 | 3 years ago |
|
a541475bc0 | 3 years ago |
|
84c6356613 | 3 years ago |
|
621f1509b9 | 3 years ago |
@ -1,19 +1,23 @@
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
source ./script_install.sh
|
bash ./script_install.sh
|
||||||
|
|
||||||
run:
|
run:
|
||||||
./run_simulation.sh
|
bash ./run_simulation.sh
|
||||||
|
|
||||||
fftma:
|
|
||||||
cd fftma_module/gen && python3 setup.py install --user
|
|
||||||
|
|
||||||
binaries:
|
test:
|
||||||
./script_fortran.sh
|
|
||||||
|
|
||||||
test: binaries
|
|
||||||
cd tests/integration && python3 -m unittest test.py
|
cd tests/integration && python3 -m unittest test.py
|
||||||
|
|
||||||
perf: binaries
|
perf:
|
||||||
cd tests/performance && python3 generation.py
|
cd tests/performance && python3 generation.py
|
||||||
cd tests/performance && python3 connectivity.py
|
cd tests/performance && python3 connectivity.py
|
||||||
|
|
||||||
|
run-slurm:
|
||||||
|
sbatch run-simulation-slurm
|
||||||
|
|
||||||
|
test-slurm:
|
||||||
|
sbatch run-test-slurm
|
||||||
|
|
||||||
|
perf-slurm:
|
||||||
|
sbatch run-perf-slurm
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
# Paralelización de simulación de permeabilidad
|
||||||
|
|
||||||
|
## Clonar este repositorio
|
||||||
|
|
||||||
|
```
|
||||||
|
# Por HTTPS
|
||||||
|
git clone https://git.csc.gob.ar/ssantisi/simulacion-permeabilidad.git
|
||||||
|
# Por SSH
|
||||||
|
git clone git@git.csc.gob.ar:ssantisi/simulacion-permeabilidad.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Entrar a la carpeta del proyecto
|
||||||
|
|
||||||
|
```
|
||||||
|
cd simulacion-permeabilidad
|
||||||
|
```
|
||||||
|
|
||||||
|
## Instalación de las librerías (Python 3)
|
||||||
|
|
||||||
|
Como requisitos previos a la instalación hace falta tener:
|
||||||
|
|
||||||
|
* `python3`
|
||||||
|
* `python3-pip`
|
||||||
|
* `gfortran`
|
||||||
|
* `gcc`
|
||||||
|
* `build-essentials`
|
||||||
|
|
||||||
|
```
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
El instalador genera un entorno virtual en `venv`.
|
||||||
|
|
||||||
|
Para activar el entorno virtual:
|
||||||
|
|
||||||
|
```
|
||||||
|
source venv/bin/activate
|
||||||
|
```
|
||||||
|
|
||||||
|
Para desactivarlo `deactivate`.
|
||||||
|
|
||||||
|
|
||||||
|
## Correr la simulación
|
||||||
|
|
||||||
|
```
|
||||||
|
make run
|
||||||
|
```
|
||||||
|
|
||||||
|
## Correr los casos de prueba
|
||||||
|
|
||||||
|
```
|
||||||
|
make test
|
||||||
|
```
|
||||||
|
|
||||||
|
## Correr las pruebas de performance
|
||||||
|
|
||||||
|
```
|
||||||
|
make perf
|
||||||
|
```
|
||||||
|
|
||||||
|
## Branches de github
|
||||||
|
|
||||||
|
Explicacion sobre las branches que quedaron en github para entender cuales usar:
|
||||||
|
|
||||||
|
- `main` -> solo la migracion a python3 sin ninguna cambio sobre el modulo de FFTMA (sin mejoras)
|
||||||
|
|
||||||
|
- `improvement_NOMBRE` -> branch con el `NOMBRE` de la mejora que esta explicado que hace cada una en el analisis
|
||||||
|
|
||||||
|
donde la primera es `remove_generate_array` y la ultima es `multiple_buffers`
|
||||||
|
|
||||||
|
- `improvement_NOMBRE-logs` -> misma branch de mejora pero agregando informacion de logs que se utilizo para realizar los analisis y no deberian utilizarse porque degradan la performance considerablemente.
|
||||||
|
|
||||||
|
- `migrate_fortran` -> una branch donde se trato de migrar de fortran a C pero quedo inconcluso el trabajo y no se continuo.
|
@ -0,0 +1,126 @@
|
|||||||
|
# Paralelización de simulación de permeabilidad en Cluster HPC (SLURM)
|
||||||
|
|
||||||
|
## ANTES DEL PRIMER USO
|
||||||
|
|
||||||
|
Seguir los siguientes pasos del tutorial:
|
||||||
|
|
||||||
|
1. Clonar este repositorio
|
||||||
|
2. Entrar al entorno NIX
|
||||||
|
3. Generar entorno Python para la simulación
|
||||||
|
|
||||||
|
## USO HABITUAL:
|
||||||
|
|
||||||
|
Habiendo completado las instrucciones previas al primer uso:
|
||||||
|
|
||||||
|
1. Entrar al entorno NIX
|
||||||
|
2. Activar el entorno python
|
||||||
|
3. Ejecutar las siimulaciones de interés
|
||||||
|
|
||||||
|
## Clonar este repositorio
|
||||||
|
|
||||||
|
```
|
||||||
|
# Por HTTPS
|
||||||
|
git clone https://git.csc.gob.ar/ssantisi/simulacion-permeabilidad.git
|
||||||
|
# Por SSH
|
||||||
|
git clone git@git.csc.gob.ar:ssantisi/simulacion-permeabilidad.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Entrar a la carpeta del proyecto
|
||||||
|
|
||||||
|
```
|
||||||
|
cd simulacion-permeabilidad
|
||||||
|
```
|
||||||
|
|
||||||
|
## Entrar al entorno NIX
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
nix-shell
|
||||||
|
```
|
||||||
|
|
||||||
|
Para más info ver el archivo `shell.nix`.
|
||||||
|
|
||||||
|
## Generar entorno Python para la simulación
|
||||||
|
|
||||||
|
Los siguentes requisitos ya vienen provistos por `nix-shell`:
|
||||||
|
|
||||||
|
* `python3`
|
||||||
|
* `python3-pip`
|
||||||
|
* `gfortran`
|
||||||
|
* `gcc`
|
||||||
|
* `build-essentials`
|
||||||
|
|
||||||
|
```
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
El instalador genera un entorno virtual en `venv`.
|
||||||
|
|
||||||
|
## Activar el entorno python
|
||||||
|
|
||||||
|
Para activar el entorno virtual (LUEGO DE HABER ACTIVADO EL ENTORNO NIX):
|
||||||
|
|
||||||
|
```
|
||||||
|
source venv/bin/activate
|
||||||
|
```
|
||||||
|
|
||||||
|
Para desactivarlo `deactivate`.
|
||||||
|
|
||||||
|
## Correr simulaciones de interés
|
||||||
|
|
||||||
|
Los siguientes comandos encolan trabajos en el cluster, que correrán tan pronto como les toque su lugar en la cola de trabajos.
|
||||||
|
Se puede monitorear el estado de el/los trabajos encolados con `squeue`.
|
||||||
|
Se puede cancelar un trabajo encolado con `scancel numero_de_trabajo`
|
||||||
|
|
||||||
|
### Correr la simulación (en SLURM)
|
||||||
|
|
||||||
|
Por defecto: 2 nodos, 32 tasks por nodo.
|
||||||
|
Para cambiarlo editar archivo `run-simulation-slurm`.
|
||||||
|
|
||||||
|
```
|
||||||
|
make run-slurm
|
||||||
|
```
|
||||||
|
|
||||||
|
Una vez en ejecución, la salida se escribe a los siguientes archivos:
|
||||||
|
* `simulation-nro-de-trabajo.out` la salida del trabajo.
|
||||||
|
* `simulation-nro-de-trabajo.err` los errores del proceso
|
||||||
|
|
||||||
|
### Correr los casos de prueba (en SLURM)
|
||||||
|
|
||||||
|
Por defecto: 1 nodo, 64 cpus por nodo.
|
||||||
|
Para cambiarlo editar archivo `run-tests-slurm`.
|
||||||
|
|
||||||
|
```
|
||||||
|
make test-slurm
|
||||||
|
```
|
||||||
|
|
||||||
|
Una vez en ejecución, la salida se escribe a los siguientes archivos:
|
||||||
|
* `test-nro-de-trabajo.out` la salida del trabajo.
|
||||||
|
* `test-nro-de-trabajo.err` los errores del proceso
|
||||||
|
|
||||||
|
### Correr las pruebas de performance (en SLURM)
|
||||||
|
|
||||||
|
Por defecto: 1 nodo, 64 cpus por nodo.
|
||||||
|
Para cambiarlo editar archivo `run-perf-slurm`.
|
||||||
|
|
||||||
|
```
|
||||||
|
make perf-slurm
|
||||||
|
```
|
||||||
|
|
||||||
|
Una vez en ejecución, la salida se escribe a los siguientes archivos:
|
||||||
|
* `perf-nro-de-trabajo.out` la salida del trabajo.
|
||||||
|
* `perf-nro-de-trabajo.err` los errores del proceso
|
||||||
|
|
||||||
|
## Branches de github
|
||||||
|
|
||||||
|
Explicacion sobre las branches que quedaron en github para entender cuales usar:
|
||||||
|
|
||||||
|
- `main` -> solo la migracion a python3 sin ninguna cambio sobre el modulo de FFTMA (sin mejoras)
|
||||||
|
|
||||||
|
- `improvement_NOMBRE` -> branch con el `NOMBRE` de la mejora que esta explicado que hace cada una en el analisis
|
||||||
|
|
||||||
|
donde la primera es `remove_generate_array` y la ultima es `multiple_buffers`
|
||||||
|
|
||||||
|
- `improvement_NOMBRE-logs` -> misma branch de mejora pero agregando informacion de logs que se utilizo para realizar los analisis y no deberian utilizarse porque degradan la performance considerablemente.
|
||||||
|
|
||||||
|
- `migrate_fortran` -> una branch donde se trato de migrar de fortran a C pero quedo inconcluso el trabajo y no se continuo.
|
@ -1,47 +1,9 @@
|
|||||||
# Paralelización de simulación de permeabilidad
|
# Paralelización de simulación de permeabilidad
|
||||||
|
|
||||||
## Instalación de las librerías (Python 3)
|
## Corrida en PC de escritorio/laptop
|
||||||
|
|
||||||
```
|
Ver archivo **README-LOCAL.md**.
|
||||||
make install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Generación de los binarios de conectividad
|
|
||||||
|
|
||||||
```
|
|
||||||
make binaries
|
|
||||||
```
|
|
||||||
|
|
||||||
## Correr la simulación
|
|
||||||
|
|
||||||
```
|
|
||||||
make run
|
|
||||||
```
|
|
||||||
|
|
||||||
## Correr los casos de prueba
|
|
||||||
|
|
||||||
```
|
|
||||||
make test
|
|
||||||
```
|
|
||||||
|
|
||||||
## Correr las pruebas de performance
|
|
||||||
|
|
||||||
```
|
|
||||||
make perf
|
|
||||||
```
|
|
||||||
|
|
||||||
## Instalar el binario FFTMA
|
|
||||||
|
|
||||||
```
|
|
||||||
make fftma
|
|
||||||
```
|
|
||||||
|
|
||||||
## Instalación de las librerías (Python 2)
|
|
||||||
|
|
||||||
El sistema actualmente se encuentra migrado a Python3 por lo que no se recomienda correr este script.
|
|
||||||
|
|
||||||
```
|
|
||||||
./script_install_py2.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
|
## Corrida en cluster TUPAC
|
||||||
|
|
||||||
|
Ver archivo **README-TUPAC.md**.
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source ~/miniconda3/etc/profile.d/conda.sh
|
|
||||||
conda activate py2_7
|
|
||||||
python --version
|
|
@ -1,10 +1,7 @@
|
|||||||
from distutils.core import setup, Extension
|
from distutils.core import setup, Extension
|
||||||
|
import numpy
|
||||||
|
|
||||||
|
module_FFTMA = Extension('FFTMA', include_dirs=["./include", numpy.get_include()], sources=["moduleFFTMA.c","./lib_src/Py_getvalues.c","./lib_src/Py_kgeneration.c","./lib_src/genlib.c","./lib_src/random.c","./lib_src/simpio.c","./lib_src/strlib.c","./lib_src/symtab.c","./lib_src/scanadt.c","./lib_src/stack.c","./lib_src/gammf.c","./lib_src/fftma.c","./lib_src/addstat.c","./lib_src/axes.c","./lib_src/cgrid.c","./lib_src/covariance.c","./lib_src/fourt.c","./lib_src/length.c","./lib_src/maxfactor.c","./lib_src/test_fact.c","./lib_src/cov_value.c","./lib_src/generate.c","./lib_src/gasdev.c","./lib_src/ran2.c","./lib_src/stable.c","./lib_src/gaussian.c","./lib_src/power.c","./lib_src/cubic.c","./lib_src/spherical.c","./lib_src/nugget.c","./lib_src/exponential.c","./lib_src/cardsin.c","./lib_src/nor2log.c","./lib_src/kgeneration.c","./lib_src/kgeneration2.c","./lib_src/fftma2.c","./lib_src/prebuild_gwn.c","./lib_src/build_real.c","./lib_src/addstat2.c","./lib_src/clean_real.c","./lib_src/pgeneration.c","./lib_src/pgeneration2.c","./lib_src/FFTPressure.c","./lib_src/FFTtest.c","./lib_src/build_pressure.c","./lib_src/build_velocity.c","./lib_src/total_pressure.c","./lib_src/total_velocity.c","./lib_src/clean_real2.c","./lib_src/waveVectorCompute3D.c","./lib_src/mat_vec.c","./lib_src/derivReal.c","./lib_src/inputdata.c","./lib_src/inputfiledata.c","./lib_src/debuginput.c","./lib_src/readdata.c","./lib_src/readfile_bin.c","./lib_src/writefile.c","./lib_src/writefile_bin.c","./lib_src/testmemory.c","./lib_src/testopenfile.c","./lib_src/readdata3.c"])
|
||||||
module_FFTMA = Extension('FFTMA', include_dirs = ['./include'],sources=["moduleFFTMA.c","./lib_src/Py_getvalues.c","./lib_src/Py_kgeneration.c","./lib_src/genlib.c","./lib_src/random.c","./lib_src/simpio.c","./lib_src/strlib.c","./lib_src/symtab.c","./lib_src/scanadt.c","./lib_src/stack.c","./lib_src/gammf.c","./lib_src/fftma.c","./lib_src/addstat.c","./lib_src/axes.c","./lib_src/cgrid.c","./lib_src/covariance.c","./lib_src/fourt.c","./lib_src/length.c","./lib_src/maxfactor.c","./lib_src/test_fact.c","./lib_src/cov_value.c","./lib_src/generate.c","./lib_src/gasdev.c","./lib_src/ran2.c","./lib_src/stable.c","./lib_src/gaussian.c","./lib_src/power.c","./lib_src/cubic.c","./lib_src/spherical.c","./lib_src/nugget.c","./lib_src/exponential.c","./lib_src/cardsin.c","./lib_src/nor2log.c","./lib_src/kgeneration.c","./lib_src/kgeneration2.c","./lib_src/fftma2.c","./lib_src/prebuild_gwn.c","./lib_src/build_real.c","./lib_src/addstat2.c","./lib_src/clean_real.c","./lib_src/pgeneration.c","./lib_src/pgeneration2.c","./lib_src/FFTPressure.c","./lib_src/FFTtest.c","./lib_src/build_pressure.c","./lib_src/build_velocity.c","./lib_src/total_pressure.c","./lib_src/total_velocity.c","./lib_src/clean_real2.c","./lib_src/waveVectorCompute3D.c","./lib_src/mat_vec.c","./lib_src/derivReal.c","./lib_src/inputdata.c","./lib_src/inputfiledata.c","./lib_src/debuginput.c","./lib_src/readdata.c","./lib_src/readfile_bin.c","./lib_src/writefile.c","./lib_src/writefile_bin.c","./lib_src/testmemory.c","./lib_src/testopenfile.c","./lib_src/readdata3.c"])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setup(ext_modules=[module_FFTMA])
|
setup(ext_modules=[module_FFTMA])
|
||||||
|
@ -1,11 +1,103 @@
|
|||||||
numpy
|
anyio==3.6.2
|
||||||
scipy
|
argon2-cffi==21.3.0
|
||||||
matplotlib
|
argon2-cffi-bindings==21.2.0
|
||||||
ipython
|
arrow==1.2.3
|
||||||
jupyter
|
asttokens==2.2.1
|
||||||
pandas
|
attrs==23.1.0
|
||||||
sympy
|
backcall==0.2.0
|
||||||
nose
|
beautifulsoup4==4.12.2
|
||||||
mpi4py
|
|
||||||
Benchmarker==4.0.1
|
Benchmarker==4.0.1
|
||||||
memory_profiler
|
bleach==6.0.0
|
||||||
|
cffi==1.15.1
|
||||||
|
comm==0.1.3
|
||||||
|
contourpy==1.0.7
|
||||||
|
cycler==0.11.0
|
||||||
|
debugpy==1.6.7
|
||||||
|
decorator==5.1.1
|
||||||
|
defusedxml==0.7.1
|
||||||
|
executing==1.2.0
|
||||||
|
fastjsonschema==2.16.3
|
||||||
|
fonttools==4.39.3
|
||||||
|
fqdn==1.5.1
|
||||||
|
idna==3.4
|
||||||
|
ipykernel==6.22.0
|
||||||
|
ipython==8.13.1
|
||||||
|
ipython-genutils==0.2.0
|
||||||
|
ipywidgets==8.0.6
|
||||||
|
isoduration==20.11.0
|
||||||
|
jedi==0.18.2
|
||||||
|
Jinja2==3.1.2
|
||||||
|
jsonpointer==2.3
|
||||||
|
jsonschema==4.17.3
|
||||||
|
jupyter==1.0.0
|
||||||
|
jupyter-console==6.6.3
|
||||||
|
jupyter-events==0.6.3
|
||||||
|
jupyter_client==8.2.0
|
||||||
|
jupyter_core==5.3.0
|
||||||
|
jupyter_server==2.5.0
|
||||||
|
jupyter_server_terminals==0.4.4
|
||||||
|
jupyterlab-pygments==0.2.2
|
||||||
|
jupyterlab-widgets==3.0.7
|
||||||
|
kiwisolver==1.4.4
|
||||||
|
MarkupSafe==2.1.2
|
||||||
|
matplotlib==3.7.1
|
||||||
|
matplotlib-inline==0.1.6
|
||||||
|
memory-profiler==0.61.0
|
||||||
|
mistune==2.0.5
|
||||||
|
mpi4py==3.1.4
|
||||||
|
mpmath==1.3.0
|
||||||
|
nbclassic==0.5.6
|
||||||
|
nbclient==0.7.4
|
||||||
|
nbconvert==7.3.1
|
||||||
|
nbformat==5.8.0
|
||||||
|
nest-asyncio==1.5.6
|
||||||
|
nose==1.3.7
|
||||||
|
notebook==6.5.4
|
||||||
|
notebook_shim==0.2.3
|
||||||
|
numpy==1.24.3
|
||||||
|
packaging==23.1
|
||||||
|
pandas==2.0.1
|
||||||
|
pandocfilters==1.5.0
|
||||||
|
parso==0.8.3
|
||||||
|
petsc==3.19.4
|
||||||
|
petsc4py==3.19.4
|
||||||
|
pexpect==4.8.0
|
||||||
|
pickleshare==0.7.5
|
||||||
|
Pillow==9.5.0
|
||||||
|
platformdirs==3.5.0
|
||||||
|
prometheus-client==0.16.0
|
||||||
|
prompt-toolkit==3.0.38
|
||||||
|
psutil==5.9.5
|
||||||
|
ptyprocess==0.7.0
|
||||||
|
pure-eval==0.2.2
|
||||||
|
pycparser==2.21
|
||||||
|
Pygments==2.15.1
|
||||||
|
pyparsing==3.0.9
|
||||||
|
pyrsistent==0.19.3
|
||||||
|
python-dateutil==2.8.2
|
||||||
|
python-json-logger==2.0.7
|
||||||
|
pytz==2023.3
|
||||||
|
PyYAML==6.0
|
||||||
|
pyzmq==25.0.2
|
||||||
|
qtconsole==5.4.2
|
||||||
|
QtPy==2.3.1
|
||||||
|
rfc3339-validator==0.1.4
|
||||||
|
rfc3986-validator==0.1.1
|
||||||
|
scipy==1.10.1
|
||||||
|
Send2Trash==1.8.2
|
||||||
|
six==1.16.0
|
||||||
|
sniffio==1.3.0
|
||||||
|
soupsieve==2.4.1
|
||||||
|
stack-data==0.6.2
|
||||||
|
sympy==1.11.1
|
||||||
|
terminado==0.17.1
|
||||||
|
tinycss2==1.2.1
|
||||||
|
tornado==6.3.1
|
||||||
|
traitlets==5.9.0
|
||||||
|
tzdata==2023.3
|
||||||
|
uri-template==1.2.0
|
||||||
|
wcwidth==0.2.6
|
||||||
|
webcolors==1.13
|
||||||
|
webencodings==0.5.1
|
||||||
|
websocket-client==1.5.1
|
||||||
|
widgetsnbextension==4.0.7
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#SBATCH -o perf-$j.out
|
||||||
|
#SBATCH -e perf-%j.err
|
||||||
|
#SBATCH -N 1
|
||||||
|
#SBATCH --ntasks-per-node 32
|
||||||
|
#SBATCH --partition=free-rider
|
||||||
|
|
||||||
|
hostname
|
||||||
|
date
|
||||||
|
|
||||||
|
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
|
||||||
|
# vuelca lista de nodos asignados a un archivo "nodefile"
|
||||||
|
nodelist=$(scontrol show hostname $SLURM_NODELIST)
|
||||||
|
printf "%s\n" "${nodelist[@]}" > nodefile
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
# ejecuta mpirun con el nodefile creado
|
||||||
|
make perf
|
||||||
|
|
||||||
|
rm nodefile
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#SBATCH -o simulation-%j.out
|
||||||
|
#SBATCH -e simulation-%j.err
|
||||||
|
#SBATCH -N 2
|
||||||
|
#SBATCH --ntasks-per-node 32
|
||||||
|
#SBATCH --partition=free-rider
|
||||||
|
|
||||||
|
hostname
|
||||||
|
date
|
||||||
|
|
||||||
|
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
|
||||||
|
# vuelca lista de nodos asignados a un archivo "nodefile"
|
||||||
|
nodelist=$(scontrol show hostname $SLURM_NODELIST)
|
||||||
|
printf "%s\n" "${nodelist[@]}" > nodefile
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
# ejecuta mpirun con el nodefile creado
|
||||||
|
mpirun --hostfile nodefile python3 ./mpirunner.py
|
||||||
|
|
||||||
|
rm nodefile
|
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#SBATCH -o test-%j.out
|
||||||
|
#SBATCH -e test-%j.err
|
||||||
|
#SBATCH -N 1
|
||||||
|
#SBATCH --ntasks-per-node 32
|
||||||
|
#SBATCH --partition=free-rider
|
||||||
|
|
||||||
|
hostname
|
||||||
|
date
|
||||||
|
|
||||||
|
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
|
||||||
|
# vuelca lista de nodos asignados a un archivo "nodefile"
|
||||||
|
nodelist=$(scontrol show hostname $SLURM_NODELIST)
|
||||||
|
printf "%s\n" "${nodelist[@]}" > nodefile
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
# ejecuta mpirun con el nodefile creado
|
||||||
|
#mpirun --hostfile nodefile python3 ./mpirunner.py
|
||||||
|
make test
|
||||||
|
|
||||||
|
rm nodefile
|
@ -1,3 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
mpirun python3 mpirunner.py
|
mpirun python3 mpirunner.py
|
||||||
|
@ -1,21 +1,9 @@
|
|||||||
#!/bin/bash
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
export WORKSPACE=$(pwd)
|
export PETSC_CONFIGURE_OPTIONS="--download-fblaslapack --download-chaco --download-hdf5"
|
||||||
rm -r ~/.cache/pip
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
# gfortran
|
|
||||||
|
|
||||||
sudo apt install build-essential
|
|
||||||
sudo apt install gfortran
|
|
||||||
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
|
|
||||||
|
|
||||||
pip3 install --user numpy scipy matplotlib ipython jupyter pandas sympy nose mpi4py
|
|
||||||
|
|
||||||
# install open mpi latest version
|
|
||||||
|
|
||||||
sudo apt install openmpi-bin
|
|
||||||
|
|
||||||
# setup petsc4py
|
./script_fortran.sh
|
||||||
|
|
||||||
export PETSC_CONFIGURE_OPTIONS="--download-fblaslapack --download-chaco --download-hdf5"
|
cd fftma_module/gen && python3 setup.py install
|
||||||
pip3 install petsc petsc4py
|
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
export WORKSPACE=$(pwd)
|
|
||||||
|
|
||||||
# gfortran
|
|
||||||
|
|
||||||
sudo apt install build-essential
|
|
||||||
sudo apt install gfortran
|
|
||||||
gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
|
|
||||||
|
|
||||||
# install open mpi 2.1.1
|
|
||||||
|
|
||||||
curl https://download.open-mpi.org/release/open-mpi/v2.1/openmpi-2.1.1.tar.bz2 --output openmpi-2.1.1.tar.bz2
|
|
||||||
tar -jxf openmpi-2.1.1.tar.bz2
|
|
||||||
cd openmpi-2.1.1
|
|
||||||
|
|
||||||
./configure --prefix=$HOME/opt/openmpi
|
|
||||||
make all
|
|
||||||
make install
|
|
||||||
|
|
||||||
echo "export PATH=\$PATH:\$HOME/opt/openmpi/bin" >> $HOME/.bashrc
|
|
||||||
|
|
||||||
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/opt/openmpi/lib" >> $HOME/.bashrc
|
|
||||||
|
|
||||||
source ~/.$1rc
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# install miniconda
|
|
||||||
|
|
||||||
curl https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh --output Miniconda3-py39_4.10.3-Linux-x86_64.sh
|
|
||||||
|
|
||||||
bash Miniconda3-py39_4.10.3-Linux-x86_64.sh -b
|
|
||||||
|
|
||||||
source ~/.$1rc
|
|
||||||
|
|
||||||
# create python 2.7 environment
|
|
||||||
|
|
||||||
conda init $1
|
|
||||||
|
|
||||||
source ~/.$1rc
|
|
||||||
|
|
||||||
conda create -n py2_7 python=2.7
|
|
||||||
conda activate py2_7
|
|
||||||
|
|
||||||
pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
|
|
||||||
|
|
||||||
# setup petsc
|
|
||||||
|
|
||||||
git clone https://gitlab.com/petsc/petsc
|
|
||||||
|
|
||||||
cd petsc
|
|
||||||
|
|
||||||
git checkout maint-3.8
|
|
||||||
./configure --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack --with-debugging=0 COPTFLAGS='-O3 -march=native -mtune=native' CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3 -march=native -mtune=native'
|
|
||||||
|
|
||||||
make PETSC_DIR=$WORKSPACE/petsc PETSC_ARCH=arch-linux2-c-opt all
|
|
||||||
|
|
||||||
make PETSC_DIR=$WORKSPACE/petsc PETSC_ARCH=arch-linux-c-opt check
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# setup petsc4py
|
|
||||||
|
|
||||||
git clone https://Icolecchio@bitbucket.org/petsc/petsc4py.git
|
|
||||||
cd petsc4py
|
|
||||||
git checkout maint-3.8
|
|
||||||
export PETSC_DIR=$WORKSPACE/petsc
|
|
||||||
python setup.py build
|
|
||||||
python setup.py install --user
|
|
||||||
python setup.py test
|
|
@ -0,0 +1,17 @@
|
|||||||
|
# nix-shell -p [ (python3Full.withPackages(ps: with ps; [ pip ])) gfortran zlib]
|
||||||
|
|
||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
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";
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#SBATCH -o slurm.out
|
||||||
|
#SBATCH -e slurm.err
|
||||||
|
#SBATCH -N 2
|
||||||
|
#SBATCH --ntasks-per-node 32
|
||||||
|
#SBATCH --partition=free-rider
|
||||||
|
|
||||||
|
hostname
|
||||||
|
date
|
||||||
|
|
||||||
|
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
|
||||||
|
# vuelca lista de nodos asignados a un archivo "nodefile"
|
||||||
|
nodelist=$(scontrol show hostname $SLURM_NODELIST)
|
||||||
|
printf "%s\n" "${nodelist[@]}" > nodefile
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
# ejecuta mpirun con el nodefile creado
|
||||||
|
mpirun --hostfile nodefile python3 ./mpirunner.py
|
Loading…
Reference in New Issue