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
fcc0740b
Commit
fcc0740b
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
C++ and parallel-hdf5 compilation fixes.
parent
c9f8c24a
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
src/common_io.c
+7
-7
7 additions, 7 deletions
src/common_io.c
src/parallel_io.c
+2
-1
2 additions, 1 deletion
src/parallel_io.c
with
9 additions
and
8 deletions
src/common_io.c
+
7
−
7
View file @
fcc0740b
...
...
@@ -399,19 +399,19 @@ void io_write_cell_offsets(hid_t h_grp, const int cdim[3],
/* Temporary memory for the cell-by-cell information */
double
*
centres
=
NULL
;
centres
=
malloc
(
3
*
nr_cells
*
sizeof
(
double
));
centres
=
(
double
*
)
malloc
(
3
*
nr_cells
*
sizeof
(
double
));
/* Count of particles in each cell */
long
long
*
count_part
=
NULL
,
*
count_gpart
=
NULL
,
*
count_spart
=
NULL
;
count_part
=
malloc
(
nr_cells
*
sizeof
(
long
long
));
count_gpart
=
malloc
(
nr_cells
*
sizeof
(
long
long
));
count_spart
=
malloc
(
nr_cells
*
sizeof
(
long
long
));
count_part
=
(
long
long
*
)
malloc
(
nr_cells
*
sizeof
(
long
long
));
count_gpart
=
(
long
long
*
)
malloc
(
nr_cells
*
sizeof
(
long
long
));
count_spart
=
(
long
long
*
)
malloc
(
nr_cells
*
sizeof
(
long
long
));
/* Global offsets of particles in each cell */
long
long
*
offset_part
=
NULL
,
*
offset_gpart
=
NULL
,
*
offset_spart
=
NULL
;
offset_part
=
malloc
(
nr_cells
*
sizeof
(
long
long
));
offset_gpart
=
malloc
(
nr_cells
*
sizeof
(
long
long
));
offset_spart
=
malloc
(
nr_cells
*
sizeof
(
long
long
));
offset_part
=
(
long
long
*
)
malloc
(
nr_cells
*
sizeof
(
long
long
));
offset_gpart
=
(
long
long
*
)
malloc
(
nr_cells
*
sizeof
(
long
long
));
offset_spart
=
(
long
long
*
)
malloc
(
nr_cells
*
sizeof
(
long
long
));
/* Offsets of the 0^th element */
offset_part
[
0
]
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/parallel_io.c
+
2
−
1
View file @
fcc0740b
...
...
@@ -984,7 +984,8 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
/* Open header to write simulation properties */
/* message("Writing file header..."); */
h_grp
=
H5Gcreate
(
h_file
,
"/Header"
,
H5P_DEFAULT
,
H5P_DEFAULT
,
H5P_DEFAULT
);
hid_t
h_grp
=
H5Gcreate
(
h_file
,
"/Header"
,
H5P_DEFAULT
,
H5P_DEFAULT
,
H5P_DEFAULT
);
if
(
h_grp
<
0
)
error
(
"Error while creating file header
\n
"
);
/* Convert basic output information to snapshot units */
...
...
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