Skip to content

Commit

Permalink
[software] Adapt to new folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertuletti committed Sep 13, 2024
1 parent 9a13f14 commit a5c0e1c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 142 deletions.
34 changes: 0 additions & 34 deletions software/apps/barriers_test/benchmark.sh

This file was deleted.

85 changes: 0 additions & 85 deletions software/apps/barriers_test/data_barriers_test.h

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
"-o",
"--outdir",
type=pathlib.Path,
default=pathlib.Path.cwd(),
default=pathlib.Path(__file__).parent.absolute(),
required=False,
help='Select out directory of generated data files'
)
Expand All @@ -41,7 +41,8 @@ def main():
"--tpl",
type=pathlib.Path,
required=False,
default=pathlib.Path.cwd() / "data_barriers_test.h.tpl",
default=pathlib.Path(__file__).parent.absolute()
/ "data_barriers_test.h.tpl",
help='Path to mako template'
)
parser.add_argument(
Expand All @@ -50,53 +51,53 @@ def main():
action='store_true',
help='Set verbose'
)

parser.add_argument(
"delay_distribution",
nargs='?',
type=str,
default='uniform')
parser.add_argument(
"-n",
"--num_cores",
type=int,
required=False,
default=1024,
help='Number of cores.'
)

help='Number of cores.')
parser.add_argument(
"-a",
"--a_par",
type=float,
required=False,
default=0.5,
help='Number of cores.'
)
help='Weybull a.')
parser.add_argument(
"-d",
"--d_par",
type=int,
required=False,
default=1,
help='Number of cores.'
)
help='Weybull d.')
parser.add_argument(
"-m",
"--max",
type=int,
required=False,
default=1024,
help='Max delay.'
)
help='Max delay.')

args = parser.parse_args()
num_cores = args.num_cores

# Weybull distribution
# a = args.a_par
# D = args.d_par
# delays = D * np.random.weibull(a, size=num_cores)
# delays = np.asarray(delays, dtype = 'int')

# Uniform
max_delay = args.max
delays = np.random.uniform(low=0.0, high=max_delay, size=num_cores)
delays = np.asarray(delays, dtype='int')
if args.delay_distribution == 'weybull':
# Weybull distribution
a = args.a_par
D = args.d_par
delays = D * np.random.weibull(a, size=num_cores)
delays = np.asarray(delays, dtype='int')
else:
# Uniform
max_delay = args.max
delays = np.random.uniform(low=0.0, high=max_delay, size=num_cores)
delays = np.asarray(delays, dtype='int')

kwargs = {
'name': 'barriers_test',
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit a5c0e1c

Please sign in to comment.