Skip to content
Snippets Groups Projects
Commit 2166fb0c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Don't allow runs with star particles over MPI

parent ae21e481
No related branches found
No related tags found
2 merge requests!310Star particles and gparts links over MPI,!304Star particle infrastructure
...@@ -274,6 +274,9 @@ int main(int argc, char *argv[]) { ...@@ -274,6 +274,9 @@ int main(int argc, char *argv[]) {
/* Genesis 1.1: And then, there was time ! */ /* Genesis 1.1: And then, there was time ! */
clocks_set_cpufreq(cpufreq); clocks_set_cpufreq(cpufreq);
/* How vocal are we ? */
const int talking = (verbose == 1 && myrank == 0) || (verbose == 2);
if (myrank == 0 && dry_run) if (myrank == 0 && dry_run)
message( message(
"Executing a dry run. No i/o or time integration will be performed."); "Executing a dry run. No i/o or time integration will be performed.");
...@@ -286,13 +289,18 @@ int main(int argc, char *argv[]) { ...@@ -286,13 +289,18 @@ int main(int argc, char *argv[]) {
/* Report host name(s). */ /* Report host name(s). */
#ifdef WITH_MPI #ifdef WITH_MPI
if (myrank == 0 || verbose > 1) { if (talking) {
message("Rank %d running on: %s", myrank, hostname()); message("Rank %d running on: %s", myrank, hostname());
} }
#else #else
message("Running on: %s", hostname()); message("Running on: %s", hostname());
#endif #endif
#ifdef WITH_MPI
if (with_stars)
error("No support for stars over MPI for now. Buy Matthieu a drink first.");
#endif
/* Do we have debugging checks ? */ /* Do we have debugging checks ? */
#ifdef SWIFT_DEBUG_CHECKS #ifdef SWIFT_DEBUG_CHECKS
message("WARNING: Debugging checks activated. Code will be slower !"); message("WARNING: Debugging checks activated. Code will be slower !");
...@@ -315,9 +323,6 @@ int main(int argc, char *argv[]) { ...@@ -315,9 +323,6 @@ int main(int argc, char *argv[]) {
message("sizeof(struct cell) is %4zi bytes.", sizeof(struct cell)); message("sizeof(struct cell) is %4zi bytes.", sizeof(struct cell));
} }
/* How vocal are we ? */
const int talking = (verbose == 1 && myrank == 0) || (verbose == 2);
/* Read the parameter file */ /* Read the parameter file */
struct swift_params *params = malloc(sizeof(struct swift_params)); struct swift_params *params = malloc(sizeof(struct swift_params));
if (params == NULL) error("Error allocating memory for the parameter file."); if (params == NULL) error("Error allocating memory for the parameter file.");
...@@ -373,6 +378,7 @@ int main(int argc, char *argv[]) { ...@@ -373,6 +378,7 @@ int main(int argc, char *argv[]) {
if (myrank == 0) message("Reading ICs from file '%s'", ICfileName); if (myrank == 0) message("Reading ICs from file '%s'", ICfileName);
fflush(stdout); fflush(stdout);
/* Get ready to read particles of all kinds */
struct part *parts = NULL; struct part *parts = NULL;
struct gpart *gparts = NULL; struct gpart *gparts = NULL;
struct spart *sparts = NULL; struct spart *sparts = NULL;
...@@ -415,7 +421,7 @@ int main(int argc, char *argv[]) { ...@@ -415,7 +421,7 @@ int main(int argc, char *argv[]) {
if (gparts[k].type == swift_type_gas) error("Linking problem"); if (gparts[k].type == swift_type_gas) error("Linking problem");
} }
#endif #endif
/* Get the total number of particles across all nodes. */ /* Get the total number of particles across all nodes. */
long long N_total[3] = {0, 0, 0}; long long N_total[3] = {0, 0, 0};
#if defined(WITH_MPI) #if defined(WITH_MPI)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment