Commit 04fe2b17 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'master' into ic-checks

parents cfd96b50 7bf76a88
...@@ -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 */
......
...@@ -907,7 +907,8 @@ void engine_repartition(struct engine *e) { ...@@ -907,7 +907,8 @@ void engine_repartition(struct engine *e) {
message("took %.3f %s.", clocks_from_ticks(getticks() - tic), message("took %.3f %s.", clocks_from_ticks(getticks() - tic),
clocks_getunit()); clocks_getunit());
#else #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 #endif
} }
...@@ -1064,10 +1065,10 @@ void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj, ...@@ -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); 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 +2091,8 @@ static inline void engine_make_hydro_loops_dependencies( ...@@ -2090,8 +2091,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");
} }
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