diff --git a/exputil/localmpi.cc b/exputil/localmpi.cc index 987230175..b0ddc8708 100644 --- a/exputil/localmpi.cc +++ b/exputil/localmpi.cc @@ -11,9 +11,9 @@ // // MPI variables // -MPI_Comm MPI_COMM_SLAVE; -MPI_Group world_group, slave_group; -int numprocs=1, slaves, myid=0, proc_namelen; +MPI_Comm MPI_COMM_WORKER; +MPI_Group world_group, worker_group; +int numprocs=1, workers, myid=0, proc_namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; std::ofstream mpi_debug; @@ -29,18 +29,18 @@ void local_init_mpi(int argc, char **argv) MPI_Get_processor_name(processor_name, &proc_namelen); //========================= - // Make SLAVE communicator + // Make WORKER communicator //========================= - slaves = numprocs - 1; + workers = numprocs - 1; - if (slaves) { + if (workers) { MPI_Comm_group(MPI_COMM_WORLD, &world_group); - std::vector nslaves (slaves); + std::vector nworkers (workers); - for (int n=1; n #include -extern MPI_Comm MPI_COMM_SLAVE; -extern MPI_Group world_group, slave_group; -extern int numprocs, slaves, myid, proc_namelen; +extern MPI_Comm MPI_COMM_WORKER; +extern MPI_Group world_group, worker_group; +extern int numprocs, workers, myid, proc_namelen; extern char processor_name[MPI_MAX_PROCESSOR_NAME]; extern std::ofstream mpi_debug; diff --git a/src/Component.cc b/src/Component.cc index 47fe2901c..609c1b07e 100644 --- a/src/Component.cc +++ b/src/Component.cc @@ -1768,7 +1768,7 @@ void Component::read_bodies_and_distribute_binary_spl(istream *in) in->read((char*)&number, sizeof(int)); } catch (...) { std::ostringstream sout; - sout << "Error reading magic info and file count from master"; + sout << "Error reading magic info and file count from root"; throw GenericError(sout.str(), __FILE__, __LINE__, 1010, true); } @@ -2116,7 +2116,7 @@ PartPtr * Component::get_particles(int* number) for (auto it=itb; it!=ite; it++) pbuf[icount++] = it->second; #ifdef DEBUG - std::cout << "get_particles: master loaded " + std::cout << "get_particles: root loaded " << icount << " of its own particles" << ", beg=" << beg << ", iend=" << end << ", dist=" << std::distance(itb, ite) @@ -2133,7 +2133,7 @@ PartPtr * Component::get_particles(int* number) while (PartPtr part=pf->RecvParticle()) pbuf[icount++] = part; #ifdef DEBUG std::cout << "Process " << myid - << ": received " << icount << " particles from Slave " << node + << ": received " << icount << " particles from Worker " << node << ", expected " << number << ", total=" << totals[node] << std::endl << std::flush; #endif @@ -2145,7 +2145,7 @@ PartPtr * Component::get_particles(int* number) curcount++; counter++; } - // Nodes send particles to master + // Nodes send particles to root } else if (myid == node) { auto itb = particles.begin(); @@ -2163,7 +2163,7 @@ PartPtr * Component::get_particles(int* number) #ifdef DEBUG std::cout << "Process " << myid - << ": sent " << icount << " particles from Slave " << node + << ": sent " << icount << " particles from Worker " << node << std::endl << std::flush; #endif } @@ -3353,7 +3353,7 @@ int Component::round_up(double dnumb) void Component::setup_distribution(void) { - // Needed for both master and slaves + // Needed for both root and workers nbodies_index = vector(numprocs); nbodies_table = vector(numprocs); diff --git a/src/Orient.cc b/src/Orient.cc index 2fa2f9bb1..676e40792 100644 --- a/src/Orient.cc +++ b/src/Orient.cc @@ -76,7 +76,7 @@ Orient::Orient(int n, int nwant, unsigned Oflg, unsigned Cflg, int in_ok; std::vector in1(4), in2(4); - if (myid==0) { // Master does the reading + if (myid==0) { // Root does the reading ifstream in(logfile.c_str()); @@ -115,7 +115,7 @@ Orient::Orient(int n, int nwant, unsigned Oflg, unsigned Cflg, double time; int tused; - in_ok = 1; // Signal slave: OK + in_ok = 1; // Signal worker: OK MPI_Bcast(&in_ok, 1, MPI_INT, 0, MPI_COMM_WORLD); @@ -176,12 +176,12 @@ Orient::Orient(int n, int nwant, unsigned Oflg, unsigned Cflg, if (restart) cout << " -- Orient: cached time=" << time << " Ecurr= " << Ecurr << endl; - cout << " -- Orient: axis master (cache size=" << sumsA.size() << "): " + cout << " -- Orient: axis root (cache size=" << sumsA.size() << "): " << axis[0] << ", " << axis[1] << ", " << axis[2] << endl; - cout << " -- Orient: center master (cache size=" << sumsC.size() << "): " + cout << " -- Orient: center root (cache size=" << sumsC.size() << "): " << center[0] << ", " << center[1] << ", " << center[2] << endl; @@ -212,7 +212,7 @@ Orient::Orient(int n, int nwant, unsigned Oflg, unsigned Cflg, } else { - in_ok = 0; // Signal slave: NO VALUES + in_ok = 0; // Signal worker: NO VALUES MPI_Bcast(&in_ok, 1, MPI_INT, 0, MPI_COMM_WORLD); @@ -261,7 +261,7 @@ Orient::Orient(int n, int nwant, unsigned Oflg, unsigned Cflg, } else { - // Get state from Master + // Get state from Root MPI_Bcast(&in_ok, 1, MPI_INT, 0, MPI_COMM_WORLD); diff --git a/src/end.cc b/src/end.cc index 5b0577e7e..2f7c0afb9 100644 --- a/src/end.cc +++ b/src/end.cc @@ -26,13 +26,13 @@ void clean_up(void) << "Process " << setw(4) << right << myid << " on " << processor_name << " pid=" << getpid() - << " MASTER NODE\t Exiting EXP\n"; + << " ROOT NODE\t Exiting EXP\n"; MPI_Barrier(MPI_COMM_WORLD); for (int j=1; j\n"; + nworkers = new int [workers]; + if (!nworkers) { + cerr << "main: problem allocating \n"; MPI_Finalize(); exit(10); } - for (n=1; n > nameMap; diff --git a/utils/SL/cyltest.cc b/utils/SL/cyltest.cc index 257082b55..4ee092f0b 100644 --- a/utils/SL/cyltest.cc +++ b/utils/SL/cyltest.cc @@ -223,7 +223,7 @@ int main(int argc, char** argv) // | // Turn on diagnostic output in SL creation---------------------------+ - // Slaves exit + // Workers exit if (use_mpi && myid>0) { MPI_Finalize(); exit(0); diff --git a/utils/SL/qtest.cc b/utils/SL/qtest.cc index 6547c23e4..1a3e1cf40 100644 --- a/utils/SL/qtest.cc +++ b/utils/SL/qtest.cc @@ -104,7 +104,7 @@ int main(int argc, char** argv) // | // Turn on diagnostic output in SL creation---------------------------------+ - // Slaves exit + // Workers exit if (use_mpi && myid>0) { MPI_Finalize(); exit(0); diff --git a/utils/SL/slcheck.cc b/utils/SL/slcheck.cc index 85a1cea9c..4a28596e8 100644 --- a/utils/SL/slcheck.cc +++ b/utils/SL/slcheck.cc @@ -124,7 +124,7 @@ int main(int argc, char** argv) } bad = true; } - // Slaves exit + // Workers exit if (use_mpi && myid>0) { MPI_Finalize(); exit(0); diff --git a/utils/Test/test_barrier.cc b/utils/Test/test_barrier.cc index 6635aa172..932b293ba 100644 --- a/utils/Test/test_barrier.cc +++ b/utils/Test/test_barrier.cc @@ -56,7 +56,7 @@ int main(int argc, char **argv) // MPI preliminaries //-------------------------------------------------- - int numprocs, slaves, myid, proc_namelen; + int numprocs, myid, proc_namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv);