Skip to content
Snippets Groups Projects
Commit 038489a8 authored by Matthieu Oberon's avatar Matthieu Oberon
Browse files

add time measurement and increase max time for batch

parent 4fd64a86
No related branches found
No related tags found
No related merge requests found
import numpy as np
import math
from mpi4py import MPI
import time
import socket
from mpi4py import MPI
import compute_path
import compute_tau
......@@ -131,9 +132,12 @@ if __name__ == "__main__":
comm.Barrier()
if Me == 0:
begin = time.time()
path_opti, cost_opti = ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter,
n1_max=n1_max, n2_max=n2_max, n3_max=n3_max, fancy_strategy=fancy_strategy,
nb_threads=nb_threads, reps=reps)
end = time.time()
print(f"Le temps d'exécution total est {end - begin} s.")
print(f"Le chemin optimal est {path_opti}.")
print(f"Le throughput associé est alors {-1*cost_opti} MPoints/s.")
......
#!/bin/sh
#SBATCH --time=15
#SBATCH --time=270
mpirun -np 2 -map-by ppr:1:socket -bind-to socket python3 ACO.py
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment