Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ess-python-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESS Beam Physics
ess-python-tools
Commits
a6b1fede
Commit
a6b1fede
authored
10 years ago
by
Yngve Levinsen
Browse files
Options
Downloads
Patches
Plain Diff
added setup of exec folder
some minor fixes
parent
d04a9f5b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TraceWinCondor/head.job.template
+1
-1
1 addition, 1 deletion
TraceWinCondor/head.job.template
TraceWinCondor/submit.py
+18
-1
18 additions, 1 deletion
TraceWinCondor/submit.py
with
19 additions
and
2 deletions
TraceWinCondor/head.job.template
+
1
−
1
View file @
a6b1fede
...
...
@@ -8,6 +8,6 @@ transfer_input_files = {input_files}
log = condor.log
executable = TraceWin_exe/trace
lx
.$$(OpSys).$$(Arch)
executable = TraceWin_exe/trace
win
.$$(OpSys).$$(Arch)
priority = -5
This diff is collapsed.
Click to expand it.
TraceWinCondor/submit.py
+
18
−
1
View file @
a6b1fede
...
...
@@ -8,11 +8,25 @@ def define_and_handle_args():
parser
.
add_argument
(
"
-s
"
,
dest
=
"
seed
"
,
default
=
None
,
type
=
int
,
help
=
"
Define seed
"
)
parser
.
add_argument
(
"
-c
"
,
dest
=
"
calc_dir
"
,
default
=
''
,
type
=
str
,
help
=
"
Path to calculation folder
"
)
parser
.
add_argument
(
"
-c
"
,
dest
=
"
calc_dir
"
,
default
=
'
.
'
,
type
=
str
,
help
=
"
Path to calculation folder
"
)
return
parser
.
parse_args
()
def
setup_exec_folder
():
import
os
,
shutil
orig_path
=
os
.
path
.
join
(
os
.
environ
.
get
(
"
HOME
"
),
"
TraceWin_exe
"
)
if
not
os
.
path
.
isdir
(
orig_path
):
raise
ValueError
(
"
Cannot find tracewin executables in
"
+
orig_path
+
"
yet
"
)
os
.
makedirs
(
"
TraceWin_exe
"
)
o
=
dict
(
LINUX
=
"
lx
"
,
OSX
=
"
mac
"
)
a
=
dict
(
INTEL
=
""
,
X86_64
=
"
64
"
)
for
OpSys
in
[
"
LINUX
"
,
"
OSX
"
]:
for
Arch
in
[
"
INTEL
"
,
"
X86_64
"
]:
shutil
.
copy
(
os
.
path
.
join
(
orig_path
,
"
trace
"
+
o
[
OpSys
]
+
a
[
Arch
]),
os
.
path
.
join
(
"
TraceWin_exe
"
,
"
tracewin.%s.%s
"
%
(
OpSys
,
Arch
)))
def
setup
(
args
):
import
os
,
random
...
...
@@ -24,6 +38,9 @@ def setup(args):
if
num_jobs
==
0
:
raise
ValueError
(
"
Could not find any simulation folders in
"
+
args
.
calc_dir
)
if
not
os
.
path
.
isdir
(
"
TraceWin_exe
"
):
setup_exec_folder
()
if
args
.
seed
!=
None
:
random
.
seed
(
args
.
seed
)
rand_lst
=
[
random
.
randint
(
1e5
,
1e9
)
for
i
in
xrange
(
num_jobs
)]
...
...
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