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
3e441ee0
Commit
3e441ee0
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
MPI_LONG_LONG ---> MPI_LONG_LONG_INT
parent
c1f413f1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/parallel_io.c
+2
-2
2 additions, 2 deletions
src/parallel_io.c
src/serial_io.c
+3
-3
3 additions, 3 deletions
src/serial_io.c
with
5 additions
and
5 deletions
src/parallel_io.c
+
2
−
2
View file @
3e441ee0
...
...
@@ -645,13 +645,13 @@ void write_output_parallel(struct engine* e, const char* baseName,
size_t
N
[
NUM_PARTICLE_TYPES
]
=
{
Ngas
,
Ndm
,
0
};
long
long
N_total
[
NUM_PARTICLE_TYPES
]
=
{
0
};
long
long
offset
[
NUM_PARTICLE_TYPES
]
=
{
0
};
MPI_Exscan
(
&
N
,
&
offset
,
NUM_PARTICLE_TYPES
,
MPI_LONG_LONG
,
MPI_SUM
,
comm
);
MPI_Exscan
(
&
N
,
&
offset
,
NUM_PARTICLE_TYPES
,
MPI_LONG_LONG
_INT
,
MPI_SUM
,
comm
);
for
(
int
ptype
=
0
;
ptype
<
NUM_PARTICLE_TYPES
;
++
ptype
)
N_total
[
ptype
]
=
offset
[
ptype
]
+
N
[
ptype
];
/* The last rank now has the correct N_total. Let's
* broadcast from there */
MPI_Bcast
(
&
N_total
,
6
,
MPI_LONG_LONG
,
mpi_size
-
1
,
comm
);
MPI_Bcast
(
&
N_total
,
6
,
MPI_LONG_LONG
_INT
,
mpi_size
-
1
,
comm
);
/* Now everybody konws its offset and the total number of
* particles of each
...
...
This diff is collapsed.
Click to expand it.
src/serial_io.c
+
3
−
3
View file @
3e441ee0
...
...
@@ -536,7 +536,7 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
/* Now need to broadcast that information to all ranks. */
MPI_Bcast
(
flag_entropy
,
1
,
MPI_INT
,
0
,
comm
);
MPI_Bcast
(
periodic
,
1
,
MPI_INT
,
0
,
comm
);
MPI_Bcast
(
&
N_total
,
NUM_PARTICLE_TYPES
,
MPI_LONG_LONG
,
0
,
comm
);
MPI_Bcast
(
&
N_total
,
NUM_PARTICLE_TYPES
,
MPI_LONG_LONG
_INT
,
0
,
comm
);
MPI_Bcast
(
dim
,
3
,
MPI_DOUBLE
,
0
,
comm
);
MPI_Bcast
(
ic_units
,
sizeof
(
struct
UnitSystem
),
MPI_BYTE
,
0
,
comm
);
...
...
@@ -694,12 +694,12 @@ void write_output_serial(struct engine* e, const char* baseName,
size_t
N
[
NUM_PARTICLE_TYPES
]
=
{
Ngas
,
Ndm
,
0
};
long
long
N_total
[
NUM_PARTICLE_TYPES
]
=
{
0
};
long
long
offset
[
NUM_PARTICLE_TYPES
]
=
{
0
};
MPI_Exscan
(
&
N
,
&
offset
,
NUM_PARTICLE_TYPES
,
MPI_LONG_LONG
,
MPI_SUM
,
comm
);
MPI_Exscan
(
&
N
,
&
offset
,
NUM_PARTICLE_TYPES
,
MPI_LONG_LONG
_INT
,
MPI_SUM
,
comm
);
for
(
int
ptype
=
0
;
ptype
<
NUM_PARTICLE_TYPES
;
++
ptype
)
N_total
[
ptype
]
=
offset
[
ptype
]
+
N
[
ptype
];
/* The last rank now has the correct N_total. Let's broadcast from there */
MPI_Bcast
(
&
N_total
,
6
,
MPI_LONG_LONG
,
mpi_size
-
1
,
comm
);
MPI_Bcast
(
&
N_total
,
6
,
MPI_LONG_LONG
_INT
,
mpi_size
-
1
,
comm
);
/* Now everybody konws its offset and the total number of particles of each
* type */
...
...
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