Skip to content
Snippets Groups Projects
Commit 4811328d authored by Guillaume Demesy's avatar Guillaume Demesy
Browse files

add openblas scaling test

parent e9ee5efa
No related branches found
No related tags found
No related merge requests found
Pipeline #10107 passed
import numpy as np
import matplotlib.pyplot as plt
plt.figure()
temp = np.genfromtxt('temp_scaling_runtime_MUMPS.out',delimiter=' ',dtype=None,encoding=None)[:,7]
runtime_MUMPS = np.array([np.float(temp[i][:-2]) for i in range(len(temp))])
tab_procs = np.loadtxt('temp_scaling_nbproc.out')
tab_paramaille = np.loadtxt('temp_scaling_paramaille.out')
runtime_MUMPS = runtime_MUMPS.reshape((len(tab_paramaille),len(tab_procs)))
temp = np.genfromtxt('temp_scaling_NDOFs.out',delimiter=' ',dtype=None,encoding=None)
NDofs = [temp[k][6] for k in range(0,len(tab_procs)*len(tab_paramaille),len(tab_procs))]
plt.figure()
for k in range(len(tab_paramaille)):
plt.plot(tab_procs,runtime_MUMPS[k,:],label='%g'%NDofs[k])
plt.legend()
plt.xlabel("nprocs")
plt.xlabel("MUMPS wall time (s)")
plt.savefig('runtime.jpg')
plt.figure()
for k in range(len(tab_paramaille)):
plt.plot(tab_procs,runtime_MUMPS[k,0]/runtime_MUMPS[k,:],label='%g'%NDofs[k])
plt.legend(title="Matrix size")
plt.xlabel("number of procs")
plt.ylabel("speedup")
plt.savefig('speedup.jpg')
# plt.show()
\ No newline at end of file
#!/bin/bash
export OPENBLAS_NUM_THREADS=1
export OMP_NUM_THREADS=1
export GRATING_CASE="halfellipsoid"
rm -rf res3D temp_scaling_nbproc.out temp_scaling_paramaille.out temp_scaling_runtime_MUMPS.out rm temp.out
for p in 5 10 15 20 25 30 35 40
do
echo $p >> temp_scaling_paramaille.out
gmsh grating3D.geo -3 -o grating3D.msh -setstring test_case $GRATING_CASE -setnumber paramaille $p
for i in 1 2 4 6 8 10 12 14 16 20 24 28 32 40 44
do
if [ "$p" -eq "1" ]; then echo $i >> temp_scaling_nbproc.out ; fi
export OPENBLAS_NUM_THREADS=$i
getdp grating3D.pro -pre helmholtz_vector -msh grating3D.msh -cal -pos postop_helmholtz_vector -petsc_prealloc 200 -setstring test_case $GRATING_CASE
done
done
grep 'N:' nohup.out > temp_scaling_NDOFs.out
grep -A1 'N:' nohup.out > temp.out && grep 'Wall' temp.out > temp_scaling_runtime_MUMPS.out
rm temp.out
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment