***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jackknife
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E138 Institute of Solid State Physics
E138-01 Computational Materials Science
Software
jackknife
Commits
ae2d9959
Commit
ae2d9959
authored
5 years ago
by
Patrick Kappl
Browse files
Options
Downloads
Patches
Plain Diff
Add n_processes as optional command line argument
parent
96bb2079
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.py
+12
-6
12 additions, 6 deletions
main.py
with
12 additions
and
6 deletions
main.py
+
12
−
6
View file @
ae2d9959
...
@@ -9,11 +9,13 @@ import h5py
...
@@ -9,11 +9,13 @@ import h5py
# %%
# %%
# TODO: Use a config file for this
# TODO: Use a config file for this
infix
=
""
infix
=
""
n_processes
=
1
if
len
(
sys
.
argv
)
<
4
:
if
len
(
sys
.
argv
)
<
4
:
print
(
"""
Command line argument missing. Please specify the ADGA root
print
(
"""
Command line argument missing. Please specify the ADGA root
directory, the configuration file and the 2-particle Green
'
s
directory, the configuration file and the 2-particle Green
'
s
function file. The infix for the output file is an optional
function file. The infix for the output file as well as the
4th argument.
"""
)
number of MPI process to use for the DGA calculation are the
optional 4th and 5th argument respectively.
"""
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
len
(
sys
.
argv
)
>=
4
:
if
len
(
sys
.
argv
)
>=
4
:
adga_root
=
sys
.
argv
[
1
]
adga_root
=
sys
.
argv
[
1
]
...
@@ -21,14 +23,18 @@ if len(sys.argv) >= 4:
...
@@ -21,14 +23,18 @@ if len(sys.argv) >= 4:
two_particle_file
=
sys
.
argv
[
3
]
two_particle_file
=
sys
.
argv
[
3
]
if
len
(
sys
.
argv
)
>=
5
:
if
len
(
sys
.
argv
)
>=
5
:
infix
=
sys
.
argv
[
4
]
infix
=
sys
.
argv
[
4
]
if
len
(
sys
.
argv
)
>
5
:
if
len
(
sys
.
argv
)
>=
6
:
n_processes
=
sys
.
argv
[
5
]
if
len
(
sys
.
argv
)
>
6
:
print
(
"""
Too many command line arguments. Please specify only the
print
(
"""
Too many command line arguments. Please specify only the
ADGA root directory, the configuration file the 2-particle
ADGA root directory, the configuration file
,
the 2-particle
Green
'
s function file and optionally the infix for the output
Green
'
s function file and optionally the infix for the output
file name.
"""
)
file name as well as the number of MPI processes to use for
the DGA calculation.
"""
)
sys
.
exit
(
2
)
sys
.
exit
(
2
)
abinitio_dga
=
adga
.
Adga
(
adga_root
,
adga_config
,
two_particle_file
)
abinitio_dga
=
adga
.
Adga
(
adga_root
,
adga_config
,
two_particle_file
,
n_processes
)
x_generator
=
abinitio_dga
.
get_worm_sample_generator
()
x_generator
=
abinitio_dga
.
get_worm_sample_generator
()
n
=
abinitio_dga
.
n_worm_samples
n
=
abinitio_dga
.
n_worm_samples
f
=
abinitio_dga
.
__call__
f
=
abinitio_dga
.
__call__
...
...
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