diff --git a/examples/main.c b/examples/main.c index a49ee879e04e14f40854d0c78e88a8eae6228d6f..583f05af82514f7e12e4d61d1d886082df9ddcf5 100644 --- a/examples/main.c +++ b/examples/main.c @@ -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 */ diff --git a/src/engine.c b/src/engine.c index 2680080ee60ae0b7061143eb98706397b9d31ec5..99802dc26c3d67719868f25c5463e8f8e070cd5c 100644 --- a/src/engine.c +++ b/src/engine.c @@ -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); diff --git a/src/xmf.c b/src/xmf.c index 49dfc9936257b667e9b2e13ca8d015f635553a4d..67682b4794ade773c39a748eddf765e392c74865 100644 --- a/src/xmf.c +++ b/src/xmf.c @@ -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"); }