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

run format.sh

parent 3dd27763
......@@ -74,7 +74,8 @@ void print_help_message() {
printf(" %2s %8s %s\n", "-g", "",
"Run with an external gravitational potential");
printf(" %2s %8s %s\n", "-G", "", "Run with self-gravity");
printf(" %2s %8s %s\n", "-n", "{int}", "Execute a fixed number of time steps");
printf(" %2s %8s %s\n", "-n", "{int}",
"Execute a fixed number of time steps");
printf(" %2s %8s %s\n", "-s", "", "Run with SPH");
printf(" %2s %8s %s\n", "-t", "{int}",
"The number of threads to use on each MPI rank. Defaults to 1 if not "
......
......@@ -66,11 +66,19 @@
#include "timers.h"
#include "units.h"
const char *engine_policy_names[13] = {
"none", "rand", "steal", "keep",
"block", "fix_dt", "cpu_tight", "mpi",
"numa_affinity", "hydro", "self_gravity", "external_gravity",
"cosmology_integration"};
const char *engine_policy_names[13] = {"none",
"rand",
"steal",
"keep",
"block",
"fix_dt",
"cpu_tight",
"mpi",
"numa_affinity",
"hydro",
"self_gravity",
"external_gravity",
"cosmology_integration"};
/** The rank of the engine as a global variable (for messages). */
int engine_rank;
......
......@@ -71,7 +71,8 @@ const double runner_shift[13][3] = {
{0.0, 7.071067811865475e-01, 7.071067811865475e-01},
{0.0, 1.0, 0.0},
{0.0, 7.071067811865475e-01, -7.071067811865475e-01},
{0.0, 0.0, 1.0}, };
{0.0, 0.0, 1.0},
};
/* Does the axis need flipping ? */
const char runner_flip[27] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
......
......@@ -69,8 +69,8 @@ void scheduler_addunlock(struct scheduler *s, struct task *ta,
struct task **unlocks_new;
int *unlock_ind_new;
s->size_unlocks *= 2;
if ((unlocks_new = (struct task **)malloc(
sizeof(struct task *) *s->size_unlocks)) == NULL ||
if ((unlocks_new = (struct task **)malloc(sizeof(struct task *) *
s->size_unlocks)) == NULL ||
(unlock_ind_new = (int *)malloc(sizeof(int) * s->size_unlocks)) == NULL)
error("Failed to re-allocate unlocks.");
memcpy(unlocks_new, s->unlocks, sizeof(struct task *) * s->nr_unlocks);
......@@ -98,13 +98,11 @@ void scheduler_addunlock(struct scheduler *s, struct task *ta,
void scheduler_splittasks(struct scheduler *s) {
const int pts[7][8] = {{-1, 12, 10, 9, 4, 3, 1, 0},
{-1, -1, 11, 10, 5, 4, 2, 1},
{-1, -1, -1, 12, 7, 6, 4, 3},
{-1, -1, -1, -1, 8, 7, 5, 4},
{-1, -1, -1, -1, -1, 12, 10, 9},
{-1, -1, -1, -1, -1, -1, 11, 10},
{-1, -1, -1, -1, -1, -1, -1, 12}};
const int pts[7][8] = {
{-1, 12, 10, 9, 4, 3, 1, 0}, {-1, -1, 11, 10, 5, 4, 2, 1},
{-1, -1, -1, 12, 7, 6, 4, 3}, {-1, -1, -1, -1, 8, 7, 5, 4},
{-1, -1, -1, -1, -1, 12, 10, 9}, {-1, -1, -1, -1, -1, -1, 11, 10},
{-1, -1, -1, -1, -1, -1, -1, 12}};
const float sid_scale[13] = {0.1897, 0.4025, 0.1897, 0.4025, 0.5788,
0.4025, 0.1897, 0.4025, 0.1897, 0.4025,
0.5788, 0.4025, 0.5788};
......@@ -709,7 +707,8 @@ void scheduler_reset(struct scheduler *s, int size) {
if (s->tasks_ind != NULL) free(s->tasks_ind);
/* Allocate the new lists. */
if ((s->tasks = (struct task *)malloc(sizeof(struct task) *size)) == NULL ||
if ((s->tasks = (struct task *)malloc(sizeof(struct task) * size)) ==
NULL ||
(s->tasks_ind = (int *)malloc(sizeof(int) * size)) == NULL)
error("Failed to allocate task lists.");
}
......@@ -1229,7 +1228,7 @@ void scheduler_init(struct scheduler *s, struct space *space, int nr_tasks,
/* Init the unlocks. */
if ((s->unlocks = (struct task **)malloc(
sizeof(struct task *) *scheduler_init_nr_unlocks)) == NULL ||
sizeof(struct task *) * scheduler_init_nr_unlocks)) == NULL ||
(s->unlock_ind =
(int *)malloc(sizeof(int) * scheduler_init_nr_unlocks)) == NULL)
error("Failed to allocate unlocks.");
......
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