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
8e1c982d
Commit
8e1c982d
authored
7 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
VELOCIraptor init and invoke functions now return 1 or 0 depending on if an error occurred.
parent
e13eb63a
No related branches found
No related tags found
1 merge request
!578
Swift velociraptor
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/velociraptor_interface.c
+2
-2
2 additions, 2 deletions
src/velociraptor_interface.c
src/velociraptor_interface.h
+2
-2
2 additions, 2 deletions
src/velociraptor_interface.h
with
4 additions
and
4 deletions
src/velociraptor_interface.c
+
2
−
2
View file @
8e1c982d
...
...
@@ -135,7 +135,7 @@ void velociraptor_init(struct engine *e) {
message
(
"No. of top-level cells: %d"
,
sim_info
.
numcells
);
message
(
"Top-level cell locations range: (%e,%e,%e) -> (%e,%e,%e)"
,
sim_info
.
cellloc
[
0
].
loc
[
0
],
sim_info
.
cellloc
[
0
].
loc
[
1
],
sim_info
.
cellloc
[
0
].
loc
[
2
],
sim_info
.
cellloc
[
sim_info
.
numcells
-
1
].
loc
[
0
],
sim_info
.
cellloc
[
sim_info
.
numcells
-
1
].
loc
[
1
],
sim_info
.
cellloc
[
sim_info
.
numcells
-
1
].
loc
[
2
]);
InitVelociraptor
(
configfilename
,
outputFileName
,
cosmo_info
,
unit_info
,
sim_info
);
if
(
!
InitVelociraptor
(
configfilename
,
outputFileName
,
cosmo_info
,
unit_info
,
sim_info
)
)
error
(
"Exiting. VELOCIraptor initialisation failed."
)
;
/* Free cell locations after VELOCIraptor has copied them. */
//free(sim_info.cellloc);
...
...
@@ -194,7 +194,7 @@ void velociraptor_invoke(struct engine *e) {
e
->
time
);
}
InvokeVelociraptor
(
nr_gparts
,
nr_hydro_parts
,
gparts
,
cell_node_ids
,
outputFileName
);
if
(
!
InvokeVelociraptor
(
nr_gparts
,
nr_hydro_parts
,
gparts
,
cell_node_ids
,
outputFileName
)
)
error
(
"Exiting. Call to VELOCIraptor failed."
)
;
/* Reset the pthread affinity mask after VELOCIraptor returns. */
pthread_setaffinity_np
(
thread
,
sizeof
(
cpu_set_t
),
engine_entry_affinity
());
...
...
This diff is collapsed.
Click to expand it.
src/velociraptor_interface.h
+
2
−
2
View file @
8e1c982d
...
...
@@ -68,8 +68,8 @@ struct siminfo {
};
/* VELOCIraptor interface. */
void
InitVelociraptor
(
char
*
config_name
,
char
*
output_name
,
struct
cosmoinfo
cosmo_info
,
struct
unitinfo
unit_info
,
struct
siminfo
sim_info
);
void
InvokeVelociraptor
(
const
int
num_gravity_parts
,
const
int
num_hydro_parts
,
struct
gpart
*
gravity_parts
,
const
int
*
cell_node_ids
,
char
*
output_name
);
int
InitVelociraptor
(
char
*
config_name
,
char
*
output_name
,
struct
cosmoinfo
cosmo_info
,
struct
unitinfo
unit_info
,
struct
siminfo
sim_info
);
int
InvokeVelociraptor
(
const
int
num_gravity_parts
,
const
int
num_hydro_parts
,
struct
gpart
*
gravity_parts
,
const
int
*
cell_node_ids
,
char
*
output_name
);
/* VELOCIraptor wrapper functions. */
void
velociraptor_init
(
struct
engine
*
e
);
...
...
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