Compare commits

...

11 Commits

Author SHA1 Message Date
Oli 01fa00e2b6 typo 3 years ago
Oli 96acdf7a91 arranging makefile 3 years ago
Oli 87ef6badf8 fix 3 years ago
Oli f99bc338d9 makefile 3 years ago
Oli fcf0432e89 rm prints 3 years ago
Oli 9360208cb5 clean test 3 years ago
Oli bc7af92054 rm folder after test 3 years ago
Oli ecf897ece7 gfortran script 3 years ago
Oli 8d687a5e62 testing all binaries 3 years ago
Oli e2ff8d395c simple test failing :( 3 years ago
Oli 30c4715f14 code base changed 3 years ago

6
.gitignore vendored

@ -0,0 +1,6 @@
petsc/
petsc4py/
openmpi-2.1.1/
openmpi-2.1.1.tar.bz2
tests/integration/tmp_output/
output/

@ -0,0 +1,15 @@
SHELL:= zsh
env:
source ./env.sh
install:
source ./script_install.sh $(SHELL)
run: env
./run_simulation.sh
binaries: ./script_fortran.sh
test: env binaries
cd tests/integration && python test.py

@ -0,0 +1,28 @@
#!/usr/bin/env bash
#SBATCH -J test_fftma
#SBATCH -N 4
#SBATCH --ntasks-per-node 32
#SBATCH --output %j_output.out
#SBATCH -p free-rider
#SBATCH -t 2-23:00:00
#source activate_env.sh
ulimit -v 115343360
k=0
for i in {1..4} # num de jobs totales divido num de cores (redondear para arriba)
do
for j in {1..1} #Numero de "carpetas" en donde resuelve simultanemente
do
mpirun -np 4 python ./tools/solver/Ndar.py $k 1 & # job, refinamiento
k=$(($k+1))
done
wait
done
wait

@ -0,0 +1,8 @@
#!/usr/bin/env bash
for i in {0..49}
do
mpirun python ./tools/solver/Ndar.py $i 2
done

@ -0,0 +1,25 @@
#!/usr/bin/env bash
#SBATCH -J test_fftma
#SBATCH -N 1
#SBATCH --ntasks-per-node 32
#SBATCH --output %j_output.out
#SBATCH -p free-rider
#SBATCH -t 2-23:00:00
source activate_env.sh
ulimit -v 115343360
for i in {1..4}
do
mpirun -np 32 python ./tools/solver/Ndar.py ./paper2_SinRef/$i/ 1 # job, refinamiento
k=$(($k+1))
done
for i in {1..4}
do
mpirun -np 32 python ./tools/solver/Ndar.py ./paper2_ref4/$i/ 4 # job, refinamiento
k=$(($k+1))
done

@ -0,0 +1,12 @@
#!/usr/bin/env bash
#SBATCH -J test_fftma
#SBATCH -N 4
#SBATCH --ntasks-per-node 32
#SBATCH --output %j_output.out
#SBATCH -p free-rider
#SBATCH -t 2-23:00:00
source activate_env.sh
ulimit -v 115343360
mpirun python -np 32 mpirunner.py

@ -0,0 +1,4 @@
export PATH=$HOME/python/Python-2.7.13/:$PATH
export PYTHONPATH=$HOME/python/Python-2.7.13
export PATH=$HOME/.local/bin:$PATH
export PETSC_DIR=$HOME/soft/petsc

@ -0,0 +1,12 @@
#!/usr/bin/env bash
#SBATCH -J connec3d_parte2
#SBATCH -N 2
#SBATCH --ntasks-per-node 32
#SBATCH --output %j_output.out
#SBATCH -p free-rider
#SBATCH -t 2-23:00:00
source activate_env.sh
ulimit -v 115343360
mpirun python -np 64 mpirunner.py

@ -0,0 +1,13 @@
#!/usr/bin/env bash
#SBATCH -J connec3d_parte2
#SBATCH -N 2
#SBATCH --ntasks-per-node 32
#SBATCH --output %j_output.out
#SBATCH -p free-rider
#SBATCH -t 2-23:00:00
for i in {0..4}
do
mpirun -np 32 python ./tools/solver/Ndar.py ./data/$i/ 1 # job, refinamiento
done

@ -0,0 +1,44 @@
[General]
simDir=output
startJob=0
[Iterables]
p=[10,39,15]
seeds=[5462,2]
lc=[4]
connectivity=[1,2,3]
variances=[1]
[Generation]
Nx = 16
Ny = 16
Nz = 16
variogram_type=1
binary = yes
kh = 100
kl = 0.01
compute_lc = yes
lcBin=yes
genera=yes
[Connectivity]
keep_aspect= yes
block_size = 4
indicators_MinBlockSize =4
Max_sample_size = 12
compGconec= 1
conec=yes
[Solver]
num_of_cores = 1
ref = 2
solve = yes
rtol = 1e-4
[K-Postprocess]
MinBlockSize =1
Max_sample_size = 4
kperm=yes
postprocess=yes
SaveVfield=yes

@ -0,0 +1,5 @@
#!/bin/bash
source ~/miniconda3/etc/profile.d/conda.sh
conda activate py2_7
python --version

@ -0,0 +1,63 @@
import numpy as np
from mpi4py import MPI
#from tools.realization import realization
from tools.generation.config import DotheLoop, get_config
import os
import sys
from tools.Prealization import realization
CONFIG_FILE_PATH = 'config.ini' if 'CONFIG_FILE_PATH' not in os.environ else os.environ['CONFIG_FILE_PATH']
def main():
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
pn = comm.Get_size()
if pn==1:
sequential()
return
if rank==0:
manager()
else:
worker()
return
def sequential():
comm = MPI.COMM_WORLD
conffile = CONFIG_FILE_PATH
parser,iterables = get_config(conffile)
njobs = DotheLoop(-1,parser,iterables)
start_job=0
for job in range(start_job,njobs):
realization(job)
return
def manager():
comm = MPI.COMM_WORLD
conffile = CONFIG_FILE_PATH
parser,iterables = get_config(conffile)
njobs = DotheLoop(-1,parser,iterables)
start_job=0
for job in range(start_job,njobs):
dest=comm.recv(source=MPI.ANY_SOURCE)
comm.send(job,dest=dest)
for i in range(comm.Get_size()-1):
dest=comm.recv(source=MPI.ANY_SOURCE)
comm.send(-1,dest=dest)
return
def worker():
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
job=1
while job!=-1:
comm.send(rank,dest=0)
job = comm.recv(source=0)
realization(job)
return
main()

@ -0,0 +1,3 @@
#!/bin/bash
mpirun python mpirunner.py

@ -0,0 +1,8 @@
#!/bin/bash
rm ./tools/connec/connec2d
rm ./tools/connec/connec2d
cd ./tools/connec/connec-src && make clean && make all
mv ./conec2d ..
mv ./conec3d ..

@ -18,19 +18,21 @@ cd openmpi-2.1.1
make all
make install
echo "export PATH=\$PATH:\$HOME/opt/openmpi/bin" >> $HOME/.bashrc
echo "export PATH=\$PATH:\$HOME/opt/openmpi/bin" >> $HOME/.$1rc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/opt/openmpi/lib" >> $HOME/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$HOME/opt/openmpi/lib" >> $HOME/.$1rc
source ~/.$1rc
cd ..
rm openmpi-2.1.1.tar.bz2
# 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
$1 Miniconda3-py39_4.10.3-Linux-x86_64.sh -b
source ~/.$1rc
@ -40,10 +42,17 @@ conda init $1
source ~/.$1rc
rm Miniconda3-py39_4.10.3-Linux-x86_64.sh
conda create -n py2_7 python=2.7
source ~/miniconda3/etc/profile.d/conda.sh
conda activate py2_7
pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
python --version
pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose mpi4py
# setup petsc
@ -68,4 +77,5 @@ git checkout maint-3.8
export PETSC_DIR=$WORKSPACE/petsc
python setup.py build
python setup.py install --user
python setup.py test
python setup.py test
cd ..

Binary file not shown.

@ -0,0 +1,5 @@
# nbl,ttotal,tcmaps/ttotal,PostConTime/ttotal
4.000000000000000000e+00
4.437680244445800781e-01
8.036789380314167675e-01
4.117019413334135902e-02

Binary file not shown.

@ -0,0 +1,13 @@
# Runtime,Nx,Ny,Nz,con,lc,p,kh,kl,seed,variance,vario
4.421949386596679688e-03
1.600000000000000000e+01
1.600000000000000000e+01
1.600000000000000000e+01
1.000000000000000000e+00
4.000000000000000000e+00
1.000000000000000056e-01
1.000000000000000000e+02
1.000000000000000021e-02
5.462000000000000000e+03
0.000000000000000000e+00
1.000000000000000000e+00

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,5 @@
# K_diss, K_average,ttotal,tDiss/ttotal
2.044456438450047153e-02
2.093990598307741979e-02
1.699991226196289062e-01
8.312436538256562021e-03

@ -0,0 +1,5 @@
ref: 2
Matrix creation: 0.322577953339
Solver: 0.312026023865
Keff: 0.02097657095221267
N_cores: 1

@ -0,0 +1,5 @@
# Keff, ref, Runtime, N_cores
2.097657095221266976e-02
2.000000000000000000e+00
6.346039772033691406e-01
1.000000000000000000e+00

Binary file not shown.

@ -0,0 +1,4 @@
6-CONNECTIVITY ANALYSIS
PROPORTION OF PHASE 1 IS: 0.00000000

Binary file not shown.

@ -0,0 +1,4 @@
# lcG, lcNst, lcBin
4.617108983572631331e+00
4.617108983572631331e+00
5.221092552049793944e+00

@ -0,0 +1,3 @@
4.433069229125976562e-01
1.709461212158203125e-04
1.268386840820312500e-04

Binary file not shown.

@ -0,0 +1,5 @@
# nbl,ttotal,tcmaps/ttotal,PostConTime/ttotal
4.000000000000000000e+00
4.130840301513671875e-01
8.103774673900496772e-01
3.892242871984301356e-02

Binary file not shown.

@ -0,0 +1,13 @@
# Runtime,Nx,Ny,Nz,con,lc,p,kh,kl,seed,variance,vario
6.468057632446289062e-03
1.600000000000000000e+01
1.600000000000000000e+01
1.600000000000000000e+01
1.000000000000000000e+00
4.000000000000000000e+00
1.000000000000000056e-01
1.000000000000000000e+02
1.000000000000000021e-02
5.463000000000000000e+03
0.000000000000000000e+00
1.000000000000000000e+00

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,5 @@
# K_diss, K_average,ttotal,tDiss/ttotal
2.226209553813355765e-02
2.286500870826872062e-02
4.626035690307617188e-03
3.054682265629026228e-01

@ -0,0 +1,5 @@
ref: 2
Matrix creation: 0.324597120285
Solver: 0.276505947113
Keff: 0.022595141113124082
N_cores: 1

@ -0,0 +1,5 @@
# Keff, ref, Runtime, N_cores
2.259514111312408216e-02
2.000000000000000000e+00
6.011030673980712891e-01
1.000000000000000000e+00

Binary file not shown.

@ -0,0 +1,7 @@
6-CONNECTIVITY ANALYSIS
PROPORTION OF PHASE 1 IS: 0.125000000
NCC : 1
NCC : 2
NCC : 3

Binary file not shown.

@ -0,0 +1,4 @@
# lcG, lcNst, lcBin
8.214006169837110960e+00
8.214006169837110960e+00
2.860537317826781223e+00

@ -0,0 +1,2 @@
3.183081150054931641e-01
1.590251922607421875e-04

Binary file not shown.

@ -0,0 +1,5 @@
# nbl,ttotal,tcmaps/ttotal,PostConTime/ttotal
4.000000000000000000e+00
5.578839778900146484e-01
8.596443918313970700e-01
2.408955804327898159e-02

Binary file not shown.

@ -0,0 +1,13 @@
# Runtime,Nx,Ny,Nz,con,lc,p,kh,kl,seed,variance,vario
1.008915901184082031e-02
1.600000000000000000e+01
1.600000000000000000e+01
1.600000000000000000e+01
1.000000000000000000e+00
4.000000000000000000e+00
2.035714285714285698e-01
1.000000000000000000e+02
1.000000000000000021e-02
5.462000000000000000e+03
0.000000000000000000e+00
1.000000000000000000e+00

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,5 @@
# K_diss, K_average,ttotal,tDiss/ttotal
4.053728556426364898e-02
4.123944443032588614e-02
1.776230335235595703e-01
6.186535660834491246e-03

@ -0,0 +1,5 @@
ref: 2
Matrix creation: 0.356295824051
Solver: 0.41558098793
Keff: 0.041274959938125966
N_cores: 1

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save