Skip to content
Snippets Groups Projects
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
Branches
Tags
1 merge request!371Make sure the GIZMO extra loop uses the in and out ghost tasks and not just the main ghost task.
...@@ -391,9 +391,8 @@ int main(int argc, char *argv[]) { ...@@ -391,9 +391,8 @@ int main(int argc, char *argv[]) {
char basename[PARSER_MAX_LINE_SIZE]; char basename[PARSER_MAX_LINE_SIZE];
parser_get_param_string(params, "Snapshots:basename", basename); parser_get_param_string(params, "Snapshots:basename", basename);
const char *dirp = dirname(basename); const char *dirp = dirname(basename);
if (access(dirp, W_OK|X_OK) != 0) { if (access(dirp, W_OK | X_OK) != 0) {
error("Cannot write snapshots in directory %s (%s)", dirp, error("Cannot write snapshots in directory %s (%s)", dirp, strerror(errno));
strerror(errno));
} }
/* Prepare the domain decomposition scheme */ /* Prepare the domain decomposition scheme */
......
...@@ -1064,10 +1064,10 @@ void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj, ...@@ -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); scheduler_addunlock(s, t_rho, ci->super->extra_ghost);
/* The send_rho task depends on the cell's ghost task. */ /* 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. */ /* 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 #else
/* The send_rho task should unlock the super-cell's kick task. */ /* The send_rho task should unlock the super-cell's kick task. */
...@@ -2090,8 +2090,8 @@ static inline void engine_make_hydro_loops_dependencies( ...@@ -2090,8 +2090,8 @@ static inline void engine_make_hydro_loops_dependencies(
/* density loop --> ghost --> gradient loop --> extra_ghost */ /* density loop --> ghost --> gradient loop --> extra_ghost */
/* extra_ghost --> force loop */ /* extra_ghost --> force loop */
scheduler_addunlock(sched, density, c->super->ghost); scheduler_addunlock(sched, density, c->super->ghost_in);
scheduler_addunlock(sched, c->super->ghost, gradient); scheduler_addunlock(sched, c->super->ghost_out, gradient);
scheduler_addunlock(sched, gradient, c->super->extra_ghost); scheduler_addunlock(sched, gradient, c->super->extra_ghost);
scheduler_addunlock(sched, c->super->extra_ghost, force); scheduler_addunlock(sched, c->super->extra_ghost, force);
......
...@@ -42,13 +42,12 @@ ...@@ -42,13 +42,12 @@
* @param hdfFileName * @param hdfFileName
* @return the basename part of 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]; static char buffer[FILENAME_BUFFER_SIZE];
strcpy(buffer, hdfFileName); strcpy(buffer, hdfFileName);
return basename(buffer); return basename(buffer);
} }
/** /**
* @brief Prepare the XMF file corresponding to a snapshot. * @brief Prepare the XMF file corresponding to a snapshot.
* *
...@@ -277,7 +276,7 @@ void xmf_write_line(FILE* xmfFile, const char* fileName, ...@@ -277,7 +276,7 @@ void xmf_write_line(FILE* xmfFile, const char* fileName,
fprintf(xmfFile, fprintf(xmfFile,
"<DataItem Dimensions=\"%zu %d\" NumberType=\"%s\" " "<DataItem Dimensions=\"%zu %d\" NumberType=\"%s\" "
"Precision=\"%d\" Format=\"HDF\">%s:%s/%s</DataItem>\n", "Precision=\"%d\" Format=\"HDF\">%s:%s/%s</DataItem>\n",
N, dim, xmf_type(type), xmf_precision(type), N, dim, xmf_type(type), xmf_precision(type), xmf_basename(fileName),
xmf_basename(fileName), partTypeGroupName, name); partTypeGroupName, name);
fprintf(xmfFile, "</Attribute>\n"); fprintf(xmfFile, "</Attribute>\n");
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment