git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7316 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-12-08 22:58:18 +00:00
parent 6b4fd6d47c
commit 96e9210c16
2 changed files with 15 additions and 12 deletions

View File

@ -46,6 +46,7 @@ class PPPMCuda : public PPPM {
void timing(int, double &, double &);
double poissontime;
protected:
class Cuda *cuda;
class FFT3dCuda *fft1c,*fft2c;
@ -105,7 +106,7 @@ class PPPMCuda : public PPPM {
int global_flag;
dev_array* adev_data_array;
char precisionmodify;
double qqrd2e;
};
}

View File

@ -156,8 +156,10 @@ void Comm::set_proc_grid()
// use NUMA routines if numa_nodes > 0
// if NUMA routines fail, just continue
if (numa_nodes)
if (numa_set_proc_grid()) return;
if (numa_nodes) {
int flag = numa_set_proc_grid();
if (flag) return;
}
// create layout of procs mapped to simulation box
// can fail (on one partition) if constrained by other_partition_style
@ -1544,10 +1546,10 @@ void Comm::set_processors(int narg, char **arg)
iarg += 2;
} else if (strcmp(arg[iarg],"numa") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal processors command");
numa_nodes = atoi(arg[iarg+1]);
if (iarg+1 > narg) error->all(FLERR,"Illegal processors command");
numa_nodes = 1;
if (numa_nodes < 0) error->all(FLERR,"Illegal processors command");
iarg += 2;
iarg += 1;
} else error->all(FLERR,"Illegal processors command");
}
@ -1585,13 +1587,13 @@ int Comm::numa_set_proc_grid()
int procs_per_node = name_map.begin()->second;
int procs_per_numa = procs_per_node / numa_nodes;
// use regular mapping if:
// use regular mapping if any condition met
if (procs_per_numa < 4 || // 3 or less procs per numa node
procs_per_node % numa_nodes != 0 || // Different # of procs per numa node
nprocs % procs_per_numa != 0 || // Different # of procs per numa node
nprocs <= procs_per_numa || // Only 1 numa node used
user_procgrid[0] > 1 || // User specified grid dimension
if (procs_per_numa < 4 || // less than 4 procs per numa node
procs_per_node % numa_nodes != 0 || // reserve usage for numa_node != 1
nprocs % procs_per_numa != 0 || // total procs not a multiple of node
nprocs <= procs_per_numa || // only 1 node used
user_procgrid[0] > 1 || // user specified grid dimension
user_procgrid[1] > 1 || // that is greater than 1
user_procgrid[2] > 1) { // in any dimension
if (me == 0) {