Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
0d1c2ebb
Commit
0d1c2ebb
authored
Aug 10, 2019
by
Matthieu Schaller
Browse files
The parallel i/o should also not get the DM part mass.
parent
2b015f3f
Changes
4
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
0d1c2ebb
...
...
@@ -856,13 +856,12 @@ int main(int argc, char *argv[]) {
#if defined(HAVE_HDF5)
#if defined(WITH_MPI)
#if defined(HAVE_PARALLEL_HDF5)
read_ic_parallel
(
ICfileName
,
&
us
,
dim
,
&
parts
,
&
gparts
,
&
sparts
,
&
bparts
,
&
Ngas
,
&
Ngpart
,
&
Ngpart_background
,
&
Nspart
,
&
Nbpart
,
&
flag_entropy_ICs
,
&
high_res_DM_mass
,
with_hydro
,
(
with_external_gravity
||
with_self_gravity
),
with_stars
,
with_black_holes
,
cleanup_h
,
cleanup_sqrt_a
,
cosmo
.
h
,
cosmo
.
a
,
myrank
,
nr_nodes
,
MPI_COMM_WORLD
,
MPI_INFO_NULL
,
nr_threads
,
dry_run
);
read_ic_parallel
(
ICfileName
,
&
us
,
dim
,
&
parts
,
&
gparts
,
&
sparts
,
&
bparts
,
&
Ngas
,
&
Ngpart
,
&
Ngpart_background
,
&
Nspart
,
&
Nbpart
,
&
flag_entropy_ICs
,
with_hydro
,
(
with_external_gravity
||
with_self_gravity
),
with_stars
,
with_black_holes
,
cleanup_h
,
cleanup_sqrt_a
,
cosmo
.
h
,
cosmo
.
a
,
myrank
,
nr_nodes
,
MPI_COMM_WORLD
,
MPI_INFO_NULL
,
nr_threads
,
dry_run
);
#else
read_ic_serial
(
ICfileName
,
&
us
,
dim
,
&
parts
,
&
gparts
,
&
sparts
,
&
bparts
,
&
Ngas
,
&
Ngpart
,
...
...
examples/nIFTyCluster/Baryonic/nifty.yml
View file @
0d1c2ebb
...
...
@@ -49,7 +49,7 @@ Gravity:
# Parameters for the hydrodynamics scheme
SPH
:
resolution_eta
:
1.48691
# 100 ngb with wendland0-c2
resolution_eta
:
1.48691
# 100 ngb with wendland0-c2
h_min_ratio
:
0.1
# Minimal smoothing in units of softening.
CFL_condition
:
0.1
# Courant-Friedrich-Levy condition for time integration.
minimal_temperature
:
100
# (internal units)
...
...
src/parallel_io.c
View file @
0d1c2ebb
...
...
@@ -706,10 +706,10 @@ void read_ic_parallel(char* fileName, const struct unit_system* internal_units,
struct
spart
**
sparts
,
struct
bpart
**
bparts
,
size_t
*
Ngas
,
size_t
*
Ngparts
,
size_t
*
Ngparts_background
,
size_t
*
Nstars
,
size_t
*
Nblackholes
,
int
*
flag_entropy
,
float
*
gpart_mass
,
int
with_hydro
,
int
with_gravity
,
int
with_stars
,
int
with_black_holes
,
int
cleanup_h
,
int
cleanup_sqrt_a
,
double
h
,
double
a
,
int
mpi_rank
,
int
mpi_size
,
MPI_Comm
comm
,
MPI_Info
info
,
int
n_threads
,
int
with_hydro
,
int
with_gravity
,
int
with_stars
,
int
with_black_holes
,
int
cleanup_h
,
int
cleanup_sqrt_a
,
double
h
,
double
a
,
int
mpi_rank
,
int
mpi_size
,
MPI_Comm
comm
,
MPI_Info
info
,
int
n_threads
,
int
dry_run
)
{
hid_t
h_file
=
0
,
h_grp
=
0
;
...
...
@@ -981,13 +981,6 @@ void read_ic_parallel(char* fileName, const struct unit_system* internal_units,
/* Prepare the DM particles */
io_prepare_dm_gparts
(
&
tp
,
*
gparts
,
Ndm
);
/* Record the mass of the DM particles */
const
float
local_gpart_mass
=
(
*
gparts
)[
0
].
mass
;
float
global_gpart_mass
;
MPI_Allreduce
(
&
local_gpart_mass
,
&
global_gpart_mass
,
1
,
MPI_FLOAT
,
MPI_MAX
,
comm
);
*
gpart_mass
=
global_gpart_mass
;
/* Prepare the DM background particles */
io_prepare_dm_background_gparts
(
&
tp
,
*
gparts
+
Ndm
,
Ndm_background
);
...
...
src/parallel_io.h
View file @
0d1c2ebb
...
...
@@ -38,11 +38,11 @@ void read_ic_parallel(char* fileName, const struct unit_system* internal_units,
struct
spart
**
sparts
,
struct
bpart
**
bparts
,
size_t
*
Ngas
,
size_t
*
Ngparts
,
size_t
*
Ngparts_background
,
size_t
*
Nsparts
,
size_t
*
Nbparts
,
int
*
flag_entropy
,
float
*
gpart_mass
,
int
with_hydro
,
int
with_gravity
,
int
with_stars
,
int
with_black_holes
,
int
cleanup_h
,
int
cleanup_sqrt_a
,
double
h
,
double
a
,
int
mpi_rank
,
int
mpi_size
,
MPI_Comm
comm
,
MPI_Info
info
,
int
nr_threads
,
int
dry_run
);
int
with_hydro
,
int
with_gravity
,
int
with_stars
,
int
with_black_holes
,
int
cleanup_h
,
int
cleanup_sqrt_a
,
double
h
,
double
a
,
int
mpi_rank
,
int
mpi_size
,
MPI_Comm
comm
,
MPI_Info
info
,
int
nr_threads
,
int
dry_run
);
void
write_output_parallel
(
struct
engine
*
e
,
const
char
*
baseName
,
const
struct
unit_system
*
internal_units
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment