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
04fe2b17
Commit
04fe2b17
authored
Jul 18, 2017
by
Peter W. Draper
Browse files
Merge branch 'master' into ic-checks
parents
cfd96b50
7bf76a88
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/main.c
View file @
04fe2b17
...
...
@@ -391,9 +391,8 @@ int main(int argc, char *argv[]) {
char
basename
[
PARSER_MAX_LINE_SIZE
];
parser_get_param_string
(
params
,
"Snapshots:basename"
,
basename
);
const
char
*
dirp
=
dirname
(
basename
);
if
(
access
(
dirp
,
W_OK
|
X_OK
)
!=
0
)
{
error
(
"Cannot write snapshots in directory %s (%s)"
,
dirp
,
strerror
(
errno
));
if
(
access
(
dirp
,
W_OK
|
X_OK
)
!=
0
)
{
error
(
"Cannot write snapshots in directory %s (%s)"
,
dirp
,
strerror
(
errno
));
}
/* Prepare the domain decomposition scheme */
...
...
src/engine.c
View file @
04fe2b17
...
...
@@ -907,7 +907,8 @@ void engine_repartition(struct engine *e) {
message
(
"took %.3f %s."
,
clocks_from_ticks
(
getticks
()
-
tic
),
clocks_getunit
());
#else
error
(
"SWIFT was not compiled with MPI and METIS support."
);
if
(
e
->
reparttype
->
type
!=
REPART_NONE
)
error
(
"SWIFT was not compiled with MPI and METIS support."
);
#endif
}
...
...
@@ -1064,10 +1065,10 @@ void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj,
scheduler_addunlock
(
s
,
t_rho
,
ci
->
super
->
extra_ghost
);
/* The send_rho task depends on the cell's ghost task. */
scheduler_addunlock
(
s
,
ci
->
super
->
ghost
,
t_rho
);
scheduler_addunlock
(
s
,
ci
->
super
->
ghost
_out
,
t_rho
);
/* The send_xv task should unlock the super-cell's ghost task. */
scheduler_addunlock
(
s
,
t_xv
,
ci
->
super
->
ghost
);
scheduler_addunlock
(
s
,
t_xv
,
ci
->
super
->
ghost
_in
);
#else
/* The send_rho task should unlock the super-cell's kick task. */
...
...
@@ -2090,8 +2091,8 @@ static inline void engine_make_hydro_loops_dependencies(
/* density loop --> ghost --> gradient loop --> extra_ghost */
/* extra_ghost --> force loop */
scheduler_addunlock
(
sched
,
density
,
c
->
super
->
ghost
);
scheduler_addunlock
(
sched
,
c
->
super
->
ghost
,
gradient
);
scheduler_addunlock
(
sched
,
density
,
c
->
super
->
ghost
_in
);
scheduler_addunlock
(
sched
,
c
->
super
->
ghost
_out
,
gradient
);
scheduler_addunlock
(
sched
,
gradient
,
c
->
super
->
extra_ghost
);
scheduler_addunlock
(
sched
,
c
->
super
->
extra_ghost
,
force
);
...
...
src/xmf.c
View file @
04fe2b17
...
...
@@ -42,13 +42,12 @@
* @param hdfFileName
* @return the basename part of hdfFileName.
*/
static
const
char
*
xmf_basename
(
const
char
*
hdfFileName
)
{
static
const
char
*
xmf_basename
(
const
char
*
hdfFileName
)
{
static
char
buffer
[
FILENAME_BUFFER_SIZE
];
strcpy
(
buffer
,
hdfFileName
);
return
basename
(
buffer
);
}
/**
* @brief Prepare the XMF file corresponding to a snapshot.
*
...
...
@@ -277,7 +276,7 @@ void xmf_write_line(FILE* xmfFile, const char* fileName,
fprintf
(
xmfFile
,
"<DataItem Dimensions=
\"
%zu %d
\"
NumberType=
\"
%s
\"
"
"Precision=
\"
%d
\"
Format=
\"
HDF
\"
>%s:%s/%s</DataItem>
\n
"
,
N
,
dim
,
xmf_type
(
type
),
xmf_precision
(
type
),
xmf_basename
(
fileName
),
partTypeGroupName
,
name
);
N
,
dim
,
xmf_type
(
type
),
xmf_precision
(
type
),
xmf_basename
(
fileName
),
partTypeGroupName
,
name
);
fprintf
(
xmfFile
,
"</Attribute>
\n
"
);
}
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