Skip to content

Commit

Permalink
tmpCP job
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasgeis committed Jan 23, 2023
1 parent bfdc0e5 commit da47da2
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jobs/bprPoisson.sh → jobs/bprNetwork.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#SBATCH --job-name=bprPoisson
#SBATCH --job-name=bprNetwork
#SBATCH --partition=general1
#SBATCH --nodes=1
#SBATCH --ntasks=60
Expand All @@ -9,7 +9,7 @@
#SBATCH --no-requeue
#SBATCH --mail-type=FAIL

OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/poisson"
OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/network"

for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
Expand Down
4 changes: 2 additions & 2 deletions jobs/bprGeneral.sh → jobs/bprUniform.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#SBATCH --job-name=bprGeneral
#SBATCH --job-name=bprUniform
#SBATCH --partition=general1
#SBATCH --nodes=1
#SBATCH --ntasks=60
Expand All @@ -9,7 +9,7 @@
#SBATCH --no-requeue
#SBATCH --mail-type=FAIL

OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/general"
OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/uniform"

for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
Expand Down
17 changes: 17 additions & 0 deletions jobs/tmpCP.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#SBATCH --job-name=tmpCP
#SBATCH --partition=general1
#SBATCH --nodes=1
#SBATCH --ntasks=20
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2000
#SBATCH --time=100:00:00
#SBATCH --no-requeue
#SBATCH --mail-type=FAIL

OUTPUTDIR="/scratch/memhierarchy/geis/bpr/experiments/network"

for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
target/release/bpr --log "${OUTPUTDIR}/cov/OUT_${NUM}" --na $((16 * $NUM)) --nb $((400 * $NUM)) --vs 10 --iterations 500 --instances 10 --goal COV --algorithm ALL --parameters 4 --poisson &
done
34 changes: 34 additions & 0 deletions scripts/fitTime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import pickle
from math import log
import matplotlib.pyplot as plt

PATH = "logs/time/T_COV_G"

def fun(na: int, nb: int) -> int:
return na * na * na * na * nb

with open(PATH, "rb") as f:
data = pickle.load(f)

keys = data["x"]

values = [
data["y"][key][0] for key in range(len(keys))
]

factors = [
values[key] / fun(keys[key] * 16, keys[key] * 16) for key in range(len(keys))
]

factor = sum(factors) / len(keys)

fitting = [
factor * fun(keys[key] * 16, keys[key] * 16) for key in range(len(keys))
]

plt.plot(keys, values, label = "Values")
plt.plot(keys, fitting, label = "Fitting")
plt.yscale("log")
plt.legend()

plt.show()
2 changes: 1 addition & 1 deletion scripts/timePlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

values = np.array(inverted_array)

data = pd.DataFrame(values, keys, columns = ["OPT - General", "OPT - Poisson", "AMP - General", "AMP - Poisson", "NAMP - General", "NAMP - Poisson"])
data = pd.DataFrame(values, keys, columns = ["OPT - Uniform", "OPT - Network", "AMP - Uniform", "AMP - Network", "NAMP - Uniform", "NAMP - Network"])

plot = sns.lineplot(data = data, palette = "Paired", dashes = False, linewidth = 2.5)

Expand Down

0 comments on commit da47da2

Please sign in to comment.