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

Merge branch 'parallelize' into 'master'

Parallelize

See merge request 2019marechals/st7-intel!1
parents 9d38094e 82949da3
No related branches found
No related tags found
No related merge requests found
test.py test.py
__pychache__/ __pychache__/
env/**
\ No newline at end of file
import numpy as np import numpy as np
import math import math
import mpi4py
import compute_path import compute_path
import compute_tau import compute_tau
import launcher_SUBP import launcher_SUBP
def ACO(alpha, rho, Q, m, tau_0, n_iter, n1=256, n2=256, n3=256, nb_threads=4, reps=100, optimization="-O3", simd="avx512"): def ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1=256, n2=256, n3=256,
nb_threads=4, reps=100,optimization="-O3", simd="avx512"):
""" Ant colony optimization of the cache blocking parameters for the execution of """ Ant colony optimization of the cache blocking parameters for the execution of
the iso3dfd programm. the iso3dfd programm.
Args: Args:
Me (int): index of process running the function
NbP (int): number of processes
comm (): mpi communication object
alpha (float): hyperparameter alpha of ACO alpha (float): hyperparameter alpha of ACO
rho (float): evaporation rate between 0 and 1 rho (float): evaporation rate between 0 and 1
Q (float): quantity of pheromones deposited by an ant on an edge Q (float): quantity of pheromones deposited by an ant on an edge
m (int): number of ants nb_ants (int): number of ants
tau_0 (float): initial quantity of pheromones on each edge tau_0 (float): initial quantity of pheromones on each edge
n_iter (int): number of cycles done for ACO n_iter (int): number of cycles done for ACO
n1 (int, optional): First dimension of matrix. Defaults to 256. n1 (int, optional): First dimension of matrix. Defaults to 256.
...@@ -24,48 +30,85 @@ def ACO(alpha, rho, Q, m, tau_0, n_iter, n1=256, n2=256, n3=256, nb_threads=4, r ...@@ -24,48 +30,85 @@ def ACO(alpha, rho, Q, m, tau_0, n_iter, n1=256, n2=256, n3=256, nb_threads=4, r
simd (str, optional): Vectorization flag. Defaults to "avx512". simd (str, optional): Vectorization flag. Defaults to "avx512".
Returns: Returns:
(string, float): the string represents the optimal set of parameters, (np.array, float): optimal path [cbx, cby, cbz] and the associated cost
the float is the cost for this optimal path
""" """
if Me == 0 :
# Compiling the code # Compiling the code
launcher_SUBP.compileSUBP(optimization="-O3", simd="avx512") launcher_SUBP.compileSUBP(optimization="-O3", simd="avx512")
# Waiting for the compilation to end on other processes
comm.Barrier()
# Initialisation of the graph and pheromon matrix # Initialisation of the graph and pheromon matrix
n_cbx = n1//16 n_cbx = n1//16
n_cby = n2 n_cby = n2
n_cbz = n3 n_cbz = n3
tau = np.zeros((n_cbx + n_cby + 1, n_cbx + n_cby + n_cbz + 1)) tau = np.zeros((n_cbx + n_cby + 1, n_cbx + n_cby + n_cbz + 1), dtype="float64")
tau[0, 1:n_cbx+1] = tau_0 tau[0, 1:n_cbx+1] = tau_0
tau[1:n_cbx+1, n_cbx+1:n_cbx+n_cby+1] = tau_0 tau[1:n_cbx+1, n_cbx+1:n_cbx+n_cby+1] = tau_0
tau[n_cbx+1:n_cbx+n_cby+1, n_cbx+n_cby+1:n_cbx+n_cby+n_cbz+1] = tau_0 tau[n_cbx+1:n_cbx+n_cby+1, n_cbx+n_cby+1:n_cbx+n_cby+n_cbz+1] = tau_0
# Dictionary containing the previously calculated costs cost_opti = math.inf
costs = {}
# n_iter cycles of ants traveling through the graph # n_iter cycles of ants traveling through the graph
for iter in range(n_iter): for iter in range(n_iter):
paths = [] paths = []
for k in range(m): costs = []
paths.append(compute_path.compute_path(tau, alpha, n_cbx, n_cby, n_cbz)) for k in range(nb_ants//NbP):
tau, costs = compute_tau.compute_tau(tau, costs, paths, Q, rho, n1, n2, n3, nb_threads, reps) path, cost = compute_path.compute_path(tau, alpha, n1, n2, n3, nb_threads, reps)
paths.append(path)
costs.append(cost)
paths = np.array(paths, dtype="int32")
costs = np.array(costs, dtype="float64")
if Me == 0:
all_paths = np.empty(((nb_ants//NbP)*NbP, 3), dtype="int32")
all_costs = np.empty(((nb_ants//NbP)*NbP, 1), dtype="float64")
else:
all_paths = None
all_costs = None
comm.Gather(paths, all_paths, root=0)
comm.Gather(costs, all_costs, root=0)
cost_opti = math.inf if Me == 0:
for path in costs: tau, best_p, best_cost = compute_tau.compute_tau(tau, all_paths, all_costs, Q, rho, n1, n2, n3)
if costs[path] < cost_opti: if best_cost < cost_opti:
cost_opti = costs[path] cost_opti = best_cost
path_opti = path path_opti = best_p
comm.Bcast(tau, root=0)
if Me == 0:
path_opti[0] *= 16
return path_opti, cost_opti return path_opti, cost_opti
else:
return None
if __name__ == "__main__": if __name__ == "__main__":
#MPI information extraction
comm = MPI.COMM_WORLD
NbP = comm.Get_size()
Me = comm.Get_rank()
# Initialization of hyperparameters # Initialization of hyperparameters
alpha = 1 alpha = 1
rho = 0.1 rho = 0.1
Q = 10 Q = 10
m = 5 nb_ants = 5
tau_0 = Q/m tau_0 = Q/nb_ants
n_iter = 5 n_iter = 5
path_opti, cost_opti = ACO(alpha, rho, Q, m, tau_0, n_iter, 256, 256, 256, 4, 100, optimization="-O3", simd="avx512") # Parameters for compilation and execution of iso3dfd
nb_threads = 4
reps = 100
n1, n2, n3 = 256, 256, 256
optimization = "-O3"
simd = "avx512"
if Me == 0:
path_opti, cost_opti = ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1, n2, n3,
nb_threads, reps, optimization, simd)
print(path_opti) print(path_opti)
print(cost_opti) print(cost_opti)
else:
ACO(Me, NbP, comm, alpha, rho, Q, nb_ants, tau_0, n_iter, n1, n2, n3, nb_threads, reps,
optimization, simd)
import random as rd import random as rd
import numpy as np import numpy as np
import launcher_SUBP
#tau : pheromone matrix, size : 1 + n1//16 + n2 x 1 + n1//16 + n2 + n3 #tau : pheromone matrix, size : 1 + n1//16 + n2 x 1 + n1//16 + n2 + n3
def proba(i, alpha, tau, ncbx, ncby, ncbz): def proba(i, alpha, tau, n_cbx, n_cby, n_cbz):
if i == 0 : if i == 0 :
#we are on the initial state #we are on the initial state
#the ant is going to choose cbx #the ant is going to choose cbx
# sequence = [j for j in range(1,ncbx + 1)] # sequence = [j for j in range(1,n_cbx + 1)]
sequence = np.arange(1, ncbx +1) sequence = np.arange(1, n_cbx +1)
if i>0 and i<ncbx +1 : if i>0 and i<n_cbx +1 :
# we are on the first state # we are on the first state
#the ant is going to choose cby #the ant is going to choose cby
# sequence = [j for j in range(ncbx + 1,ncbx + ncby + 1)] # sequence = [j for j in range(n_cbx + 1,n_cbx + n_cby + 1)]
sequence = np.arange(ncbx + 1, ncbx + ncby + 1) sequence = np.arange(n_cbx + 1, n_cbx + n_cby + 1)
if i>ncbx and i<ncbx + ncby + 1 : if i>n_cbx and i<n_cbx + n_cby + 1 :
# we are on the second state # we are on the second state
#the ant is going to choose cbz #the ant is going to choose cbz
# sequence = [j for j in range(ncbx + ncby + 1,ncbx + ncby + ncbz + 1)] # sequence = [j for j in range(n_cbx + n_cby + 1,n_cbx + n_cby + n_cbz + 1)]
sequence = np.arange(ncbx + ncby + 1,ncbx + ncby + ncbz + 1) sequence = np.arange(n_cbx + n_cby + 1,n_cbx + n_cby + n_cbz + 1)
# weights = np.array([ tau[i][j]**alpha for j in sequence ]) # weights = np.array([ tau[i][j]**alpha for j in sequence ])
#we compute the weights and then we normalize it #we compute the weights and then we normalize it
...@@ -30,27 +32,34 @@ def proba(i, alpha, tau, ncbx, ncby, ncbz): ...@@ -30,27 +32,34 @@ def proba(i, alpha, tau, ncbx, ncby, ncbz):
return (sequence, weights) return (sequence, weights)
def compute_path(tau, alpha, ncbx, ncby, ncbz): def compute_path(tau, alpha, n1, n2, n3, nb_threads, reps):
n_cbx = n1//16
n_cby = n2
n_cbz = n3
path = [] path = []
sequence, weights = proba(0, alpha, tau, ncbx, ncby, ncbz) sequence, weights = proba(0, alpha, tau, n_cbx, n_cby, n_cbz)
new_node = rd.choices(sequence,weights)[0] new_node = rd.choices(sequence,weights)[0]
path.append(new_node) path.append(new_node)
sequence, weights = proba(path[0], alpha, tau, ncbx, ncby, ncbz) sequence, weights = proba(path[0], alpha, tau, n_cbx, n_cby, n_cbz)
new_node = rd.choices(sequence,weights)[0] new_node = rd.choices(sequence,weights)[0]
path.append(new_node) path.append(new_node)
sequence, weights = proba(path[1], alpha, tau, ncbx, ncby, ncbz) sequence, weights = proba(path[1], alpha, tau, n_cbx, n_cby, n_cbz)
new_node = rd.choices(sequence,weights)[0] new_node = rd.choices(sequence,weights)[0]
path.append(new_node) path.append(new_node)
#we transform the path so that it is now in the following form : [ncbx, ncby, ncbz] #we transform the path so that it is now in the following form : [n_cbx, n_cby, n_cbz]
path[1] = path[1] - ncbx path[1] = path[1] - n_cbx
path[2] = path[2] - ncbx - ncby path[2] = path[2] - n_cbx - n_cby
print(f"Path after transformation : {path}")
#we calculate the cost of this path and add it at the end of the path
cost = launcher_SUBP.deploySUBP(n1, n2, n3, nb_threads, reps, path[0]*16, path[1], path[2])
cost = [cost]
print(f"Path after transformation : {path} with cost equal to {cost}.")
return(path) return path, cost
import launcher_SUBP import math
def compute_tau(tau, costs, paths, Q, rho, n1, n2, n3, nb_threads, reps, fancy_strategy='AS', sub_threshold = 0.1, sup_threshold = 10**9): def compute_tau(tau, all_paths, all_costs, Q, rho, n1, n2, n3, fancy_strategy='AS', sub_threshold=0.1, sup_threshold=10**9):
"""Computing of the pheromon matrix and the cost of each path. """Computing of the pheromon matrix and the cost of each path.
Args: Args:
tau (np.array): Pheromon matrix tau (np.array): Pheromon matrix
costs (dict): Dictionnary of all previously calculated costs
paths (list): List of the paths taken by the ants: paths[i]=(cb_x//16,cb_y,cb_z) paths (list): List of the paths taken by the ants: paths[i]=(cb_x//16,cb_y,cb_z)
Q (float): Q (float): quantity of pheromones added by an ant on an edge
rho (float): Pheromon evaporation coefficient rho (float): Pheromon evaporation coefficient
n1 (int): First dimension of matrix n1 (int): First dimension of matrix
n2 (int): Second dimension of matrix n2 (int): Second dimension of matrix
n3 (int): Third dimension of matrix n3 (int): Third dimension of matrix
nb_threads (int): Number of threads per MPI process fancy_strategy (str, optional): Strategy used to update tau. Defaults to 'AS'.
reps (int): Max number of iteration before stopping the process sub_threshold (float, optional): Inferior threshold for Min-Max strategy. Defaults to 0.1.
strategy (str): Strategy used to update tau sup_threshold (float, optional): Superior threshold for Min-Max strategy. Defaults to 10**9.
Returns: Returns:
(np.array, dict): the updated pheromon matrix and the updated costs dictionary (np.array, list, float): the updated pheromon matrix, the best path and the associated cost
""" """
#evaporation of pheromons #evaporation of pheromons
tau = tau * (1-rho) tau = tau * (1-rho)
for path in paths: best_cost = math.inf
p = (path[0],path[1],path[2]) for i in range(len(all_costs)):
#if the path has already been visited, there is no need to calculate the length of the path, otherwise the deploySUBP function is called p = all_paths[i, :]
if p in costs: cost = all_costs[i, 0]
cost = costs[p]
else:
cost = launcher_SUBP.deploySUBP(nb_nodes=1, n1=n1, n2=n2, n3=n3, nb_threads=nb_threads , reps=reps, cbx=p[0]*16, cby=p[1], cbz=p[2], strategy="socket")
#addition of the cost to the list of pre-calculated costs
costs[p] = cost
if fancy_strategy == "MMAS":
#Max-Min Ant System : Only the winner ant is rewarded but the pheromon are limited within a minimal and a maximal threshold
best_p = paths[0]
best_cost = costs[best_p]
for path in paths:
p = (path[0],path[1],path[2])
cost = costs[p]
if cost < best_cost: if cost < best_cost:
best_p = p best_p = p
best_cost = cost best_cost = cost
if fancy_strategy == "AS" or fancy_strategy == 'ElitistAS':
#Classic Ant System : each path is rewarded according to its length
#Elitist Ant System : each path is rewarded according to its length
tau[0,p[0]] += Q/cost
tau[p[0],n1//16+p[1]] += Q/cost
tau[n1//16+p[1],n1//16+n2+p[2]] += Q/cost
if fancy_strategy == 'ElitistAS' or fancy_strategy == "MMAS":
#Elitist Ant System : The best ant is rewarded a second time
#Max-Min Ant System : Only the winner ant is rewarded but the pheromon are limited within a minimal and a maximal threshold
tau[0,best_p[0]] += Q/best_cost tau[0,best_p[0]] += Q/best_cost
tau[best_p[0],n1//16+best_p[1]] += Q/best_cost tau[best_p[0],n1//16+best_p[1]] += Q/best_cost
tau[n1//16+best_p[1],n1//16+n2+best_p[2]] += Q/best_cost tau[n1//16+best_p[1],n1//16+n2+best_p[2]] += Q/best_cost
size = np.size(tau)
if fancy_strategy == "MMAS":
#verification of the threshold constraint #verification of the threshold constraint
size = np.size(tau)
for i in range(size[0]): for i in range(size[0]):
for j in range(size[1]): for j in range(size[1]):
if tau[i][j] < sub_threshold: if tau[i][j] < sub_threshold:
tau[i][j] = sub_threshold tau[i][j] = sub_threshold
if tau[i][j] > sup_threshold: if tau[i][j] > sup_threshold:
tau[i][j] = sup_threshold tau[i][j] = sup_threshold
elif fancy_strategy == 'ElitistAS': # TO DO : implémenter la stratégie AS Rank
#Elitist Ant System : each path is rewarded according to its length and the winner ant is rewarded a second time return tau, best_p, best_cost
best_p = paths[0]
best_cost = costs[best_p]
for path in paths:
p = (path[0],path[1],path[2])
cost = costs[p]
if cost < best_cost:
best_p = p
best_cost = cost
tau[0,p[0]] += Q/cost
tau[p[0],n1//16+p[1]] += Q/cost
tau[n1//16+p[1],n1//16+n2+p[2]] += Q/cost
#The best ant is rewarded a second time
tau[0,best_p[0]] += Q/best_cost
tau[best_p[0],n1//16+best_p[1]] += Q/best_cost
tau[n1//16+best_p[1],n1//16+n2+best_p[2]] += Q/best_cost
elif fancy_strategy == 'ASrank':
#dépend de comment on parrallélise
else:
#Classic Ant System : each path is rewarded according to its length
for path in paths:
p = (path[0],path[1],path[2])
cost = costs[p]
tau[0,p[0]] += Q/cost
tau[p[0],n1//16+p[1]] += Q/cost
tau[n1//16+p[1],n1//16+n2+p[2]] += Q/cost
return tau,costs
#!/bin/sh
#SBATCH --time=15
mpirun -np 2 -map-by ppr:1:socket -rank-by socket -bind-to socket python3 ACO.py
\ No newline at end of file
...@@ -9,23 +9,18 @@ import tools ...@@ -9,23 +9,18 @@ import tools
# Deployment function: launch a MPI pgm on a set of cluster nodes # Deployment function: launch a MPI pgm on a set of cluster nodes
# + get the MPI pgm output and achieve a pretty print of the perf # + get the MPI pgm output and achieve a pretty print of the perf
#---------------------------------------------------------------- #----------------------------------------------------------------
def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx=32, cby=32, cbz=32, strategy="socket"): def deploySUBP(n1, n2, n3, nb_threads, reps, cbx, cby, cbz):
"""Launch MPI execution based on exe file in bin/, and returns average fitness """Launch MPI execution based on exe file in bin/, and returns average fitness
Args: Args:
nb_nodes (int, optional): Number of Kyle nodes to launch the mpirun on. Defaults to 1. n1 (int): First dimension of matrix.
n1 (int, optional): First dimension of matrix. Defaults to 256. n2 (int): Second dimension of matrix.
n2 (int, optional): Second dimension of matrix. Defaults to 256. n3 (int): Third dimension of matrix.
n3 (int, optional): Third dimension of matrix. Defaults to 256. nb_threads (int): Number of threads per MPI process.
nb_threads (int, optional): Number of threads per MPI process. Defaults to 4. reps (int): Max number of iteration before stopping the process.
reps (int, optional): Max number of iteration before stopping the process. Defaults to 100. cbx (int): First cache blocking matrix dimension.
cbx (int, optional): First cache blocking matrix dimension. Defaults to 32. cby (int): Second cache blocking matrix dimension.
cby (int, optional): Second cache blocking matrix dimension. Defaults to 32. cbz (int): Third cache blocking matrix dimension.
cbz (int, optional): Third cache blocking matrix dimension. Defaults to 32.
strategy (str, optional): Either "socket" or "core", strategy of MPI deployment. Defaults to "socket".
Raises:
ValueError: Error if strategy is not "socket" or "core"
Returns: Returns:
float: calculated fitness (average of MPI processes executions caracteristic) float: calculated fitness (average of MPI processes executions caracteristic)
...@@ -34,23 +29,8 @@ def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx= ...@@ -34,23 +29,8 @@ def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx=
# Get the name of the exe file # Get the name of the exe file
exeFile = os.listdir("bin/")[0] exeFile = os.listdir("bin/")[0]
# according to the deployment rules and strategy
print(f"NbNodes: {nb_nodes}, Strategy: map by {strategy}, cbx : {cbx}, cby : {cby}, cbz : {cbz}")
# - "socket" deployment strategy on Kyle
if strategy == "socket":
nbProcesses = 2 * nb_nodes
elif strategy == "core":
nbProcesses = 16 * nb_nodes
else:
print("Error, {} strategy is not a valid one. Please specify \"socket\" or \"core\"".format(strategy))
# Raise an error to stop the program
raise ValueError("Invalid strategy choice")
return
# MPI command # MPI command
res = subprocess.run("mpirun -np " + str(nbProcesses) + res = subprocess.run(" bin/" + exeFile + " " +
" -map-by ppr:1:" + strategy + " -bind-to " + strategy +
" bin/" + exeFile + " " +
str(n1) + " " + str(n2) + " " + str(n3) + " " + str(n1) + " " + str(n2) + " " + str(n3) + " " +
str(nb_threads) + " " + str(reps) + " " + str(nb_threads) + " " + str(reps) + " " +
str(cbx) + " " + str(cby) + " " + str(cbz), str(cbx) + " " + str(cby) + " " + str(cbz),
...@@ -59,7 +39,6 @@ def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx= ...@@ -59,7 +39,6 @@ def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx=
# Results exploitation # Results exploitation
times, throughputs, gflops, runs = tools.commandLineExtract(res) times, throughputs, gflops, runs = tools.commandLineExtract(res)
# Fitness calculation # Fitness calculation
fitness = 0. fitness = 0.
for time in times: for time in times:
...@@ -74,12 +53,12 @@ def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx= ...@@ -74,12 +53,12 @@ def deploySUBP(nb_nodes=1, n1=256, n2=256, n3=256, nb_threads=4 , reps=100, cbx=
# Compiling function # Compiling function
#----------------------------------------------------------------- #-----------------------------------------------------------------
def compileSUBP(optimization="-O3", simd="avx512"): def compileSUBP(optimization, simd):
"""Compile code using specific flags. Doesn't return anything """Compile code using specific flags. Doesn't return anything
Args: Args:
optimization (str, optional): Either "-O2" or "-O3", global standard C optimization flag. Defaults to "-O3". optimization (str): Either "-O2" or "-O3", global standard C optimization flag.
simd (str, optional): Either "sse", "avx", "avx2" or "avx512", pecificoptimizationflags for vectorization. Defaults to "avx512". simd (str): Either "sse", "avx", "avx2" or "avx512", pecificoptimizationflags for vectorization.
""" """
print("Compiling with OPTIMIZATION: {} and simd: {}".format(optimization, simd)) print("Compiling with OPTIMIZATION: {} and simd: {}".format(optimization, simd))
...@@ -102,9 +81,8 @@ def compileSUBP(optimization="-O3", simd="avx512"): ...@@ -102,9 +81,8 @@ def compileSUBP(optimization="-O3", simd="avx512"):
if __name__ == "__main__": if __name__ == "__main__":
# Command line parsing: # Command line parsing:
nb_nodes, n1, n2, n3, nb_threads, reps, cbx, cby, cbz = tools.cmdLineParsing() n1, n2, n3, nb_threads, reps, cbx, cby, cbz = tools.cmdLineParsing()
print("Number of nodes : " + str(nb_nodes))
print("n1, n2, n3 : " + str(n1) + " " + str(n2) + " " + str(n3)) print("n1, n2, n3 : " + str(n1) + " " + str(n2) + " " + str(n3))
print("Number of threads : " + str(nb_threads)) print("Number of threads : " + str(nb_threads))
print("Number of reps : " + str(reps)) print("Number of reps : " + str(reps))
...@@ -116,5 +94,5 @@ if __name__ == "__main__": ...@@ -116,5 +94,5 @@ if __name__ == "__main__":
print("---------- Deployment using Subprocess module (default values) ---------") print("---------- Deployment using Subprocess module (default values) ---------")
print(deploySUBP(strategy="socket")) print(deploySUBP(n1, n2, n3, nb_threads, reps, cbx, cby, cbz))
print(deploySUBP(strategy="core")) print(deploySUBP(n1, n2, n3, nb_threads, reps, cbx, cby, cbz))
...@@ -5,7 +5,6 @@ import re ...@@ -5,7 +5,6 @@ import re
# Cmd line parsing # Cmd line parsing
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
nb_nodes = 1
n1 = 256 n1 = 256
n2 = 256 n2 = 256
n3 = 256 n3 = 256
...@@ -18,7 +17,6 @@ cbz = 32 ...@@ -18,7 +17,6 @@ cbz = 32
def cmdLineParsing(): def cmdLineParsing():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("--N", help="number of nodes", default=nb_nodes, type=int)
parser.add_argument("--n1", help="n1", default=n1, type=int) parser.add_argument("--n1", help="n1", default=n1, type=int)
parser.add_argument("--n2", help="n1", default=n2, type=int) parser.add_argument("--n2", help="n1", default=n2, type=int)
parser.add_argument("--n3", help="n1", default=n3, type=int) parser.add_argument("--n3", help="n1", default=n3, type=int)
...@@ -30,7 +28,7 @@ def cmdLineParsing(): ...@@ -30,7 +28,7 @@ def cmdLineParsing():
args = parser.parse_args() args = parser.parse_args()
return args.N, args.n1, args.n2, args.n3, args.thds, args.reps, args.cbx, args.cby, args.cbz return args.n1, args.n2, args.n3, args.thds, args.reps, args.cbx, args.cby, args.cbz
#----------------------------------------------------------------- #-----------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment