Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
SWIFT
SWIFTsim
Commits
e48bdf1c
Commit
e48bdf1c
authored
9 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Disable processor affinity by default, this is less surprising more often
parent
3d5f0127
No related branches found
No related tags found
1 merge request
!120
Simplify, permit user control over affinity
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README
+1
-0
1 addition, 0 deletions
README
examples/main.c
+4
-8
4 additions, 8 deletions
examples/main.c
with
5 additions
and
8 deletions
README
+
1
−
0
View file @
e48bdf1c
...
...
@@ -14,6 +14,7 @@ See INSTALL.swift for install instructions.
Usage: swift [OPTION] PARAMFILE
Valid options are:
-a Pin runners using processor affinity
-c Run with cosmological time integration
-d Dry run. Read the parameter file, allocate memory but does not read
the particles from ICs and exit before the start of time integration.
...
...
This diff is collapsed.
Click to expand it.
examples/main.c
+
4
−
8
View file @
e48bdf1c
...
...
@@ -52,7 +52,7 @@ void print_help_message() {
printf
(
"
\n
Usage: swift [OPTION] PARAMFILE
\n\n
"
);
printf
(
"Valid options are:
\n
"
);
printf
(
" %2s %8s %s
\n
"
,
"-a"
,
"
[01]"
,
"Use
processor affinity"
);
printf
(
" %2s %8s %s
\n
"
,
"-a"
,
"
"
,
"Pin runners using
processor affinity"
);
printf
(
" %2s %8s %s
\n
"
,
"-c"
,
""
,
"Run with cosmological time integration"
);
printf
(
" %2s %8s %s
\n
"
,
"-d"
,
""
,
...
...
@@ -133,7 +133,7 @@ int main(int argc, char *argv[]) {
/* Welcome to SWIFT, you made the right choice */
if
(
myrank
==
0
)
greetings
();
int
with_aff
=
1
;
int
with_aff
=
0
;
int
dry_run
=
0
;
int
dump_tasks
=
0
;
int
with_cosmology
=
0
;
...
...
@@ -148,13 +148,9 @@ int main(int argc, char *argv[]) {
/* Parse the parameters */
int
c
;
while
((
c
=
getopt
(
argc
,
argv
,
"a
:
cdef:gGhst:v:y:"
))
!=
-
1
)
switch
(
c
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"acdef:gGhst:v:y:"
))
!=
-
1
)
switch
(
c
)
{
case
'a'
:
if
(
sscanf
(
optarg
,
"%d"
,
&
with_aff
)
!=
1
)
{
if
(
myrank
==
0
)
printf
(
"Error parsing affinity switch (-a).
\n
"
);
if
(
myrank
==
0
)
print_help_message
();
return
1
;
}
with_aff
=
1
;
break
;
case
'c'
:
with_cosmology
=
1
;
...
...
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