Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DALSim-Docker
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thibaut DEMARE
DALSim-Docker
Commits
e78c7e2f
Commit
e78c7e2f
authored
5 years ago
by
ThibautDemare
Browse files
Options
Downloads
Patches
Plain Diff
Make the code clearer by renaming some variables and adding some comments
parent
fe5981f1
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
startSimus.py
+12
-4
12 additions, 4 deletions
startSimus.py
with
12 additions
and
4 deletions
startSimus.py
+
12
−
4
View file @
e78c7e2f
...
@@ -21,17 +21,25 @@ def checkForBackupNeedsAndWait():
...
@@ -21,17 +21,25 @@ def checkForBackupNeedsAndWait():
if
now
>
(
lastBackup
+
timeBetweenTwoBackup
):
if
now
>
(
lastBackup
+
timeBetweenTwoBackup
):
backup
()
backup
()
# Sleep a bit: don't need to be awken all the time
# Sleep a bit: don't need to be aw
a
ken all the time
time
.
sleep
(
350
)
time
.
sleep
(
350
)
# The number of available CPU
nbCpus
=
multiprocessing
.
cpu_count
()
nbCpus
=
multiprocessing
.
cpu_count
()
# The date of the last backup done
lastBackup
=
datetime
.
now
()
lastBackup
=
datetime
.
now
()
maxNbSim
=
4
# The index of the first simulation
startingIndex
=
1
nbSimStarted
=
1
# The index of the last simulation
while
nbSimStarted
<=
maxNbSim
:
endingIndex
=
4
# The index of the simulation to start next
nbSimStarted
=
startingIndex
while
nbSimStarted
<=
endingIndex
:
resultPath
=
"
run
"
+
str
(
nbSimStarted
)
resultPath
=
"
run
"
+
str
(
nbSimStarted
)
run
(
"
cp -r ./source ./
"
+
str
(
resultPath
),
shell
=
True
)
run
(
"
cp -r ./source ./
"
+
str
(
resultPath
),
shell
=
True
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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