Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ST7-Intel
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Maréchal
ST7-Intel
Commits
038489a8
Commit
038489a8
authored
Mar 25, 2021
by
Matthieu Oberon
Browse files
Options
Downloads
Patches
Plain Diff
add time measurement and increase max time for batch
parent
4fd64a86
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Appli-iso3dfd/ACO.py
+5
-1
5 additions, 1 deletion
Appli-iso3dfd/ACO.py
Appli-iso3dfd/launch.sh
+1
-1
1 addition, 1 deletion
Appli-iso3dfd/launch.sh
with
6 additions
and
2 deletions
Appli-iso3dfd/ACO.py
+
5
−
1
View file @
038489a8
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.
"
)
...
...
This diff is collapsed.
Click to expand it.
Appli-iso3dfd/launch.sh
+
1
−
1
View file @
038489a8
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment