Commit 34c7e416 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make sure the GIZMO extra loop uses the in and out ghost tasks and not just...

Make sure the GIZMO extra loop uses the in and out ghost tasks and not just the main ghost task. Code formatting.
parent 82194d03
......@@ -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 */
......
......@@ -1064,10 +1064,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 +2090,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);
......
......@@ -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");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment