MPI_Barrier(MPI_COMM_WORLD);
{ //write the constraintmatrix to a file on each cpu
- std::string fname = base+"cm_" + Utilities::int_to_string(myid) + ".dot";
+ std::string fname = base+"cm_" + Utilities::int_to_string(numprocs) + "_" + Utilities::int_to_string(myid) + ".dot";
std::ofstream file(fname.c_str());
constraints.print(file);
}
{
//sort and merge the constraint matrices on proc 0, generate a checksum
//and output that into the deallog
- system((std::string("cat ") + base+"cm_?.dot|sort -n|uniq >" + base+"cm").c_str());
+ system((std::string("cat ") + base+"cm_" +Utilities::int_to_string(numprocs)+ "_?.dot|sort -n|uniq >" + base+"cm").c_str());
system((std::string("md5sum ") + base + "cm >" + base + "cm.check").c_str());
{
std::ifstream file((base+"cm.check").c_str());
MappingQ<dim>(degree));
constraints.close();
- if (myid==0)
- system("rm -rf no_flux_constraints_03/cm_?.dot");
+ std::string base = output_file_for_mpi("no_flux_constraints_03");
MPI_Barrier(MPI_COMM_WORLD);
{ //write the constraintmatrix to a file on each cpu
- char fname[] = "no_flux_constraints_03/cm_0.dot";
- fname[26]+=myid;
+ std::string fname = base+"cm_" + Utilities::int_to_string(numprocs) + "_" + Utilities::int_to_string(myid) + ".dot";
+ std::ofstream file(fname.c_str());
std::ofstream file(fname);
constraints.print(file);
}
{
//sort and merge the constraint matrices on proc 0, generate a checksum
//and output that into the deallog
- system("cat no_flux_constraints_03/cm_?.dot|sort -n|uniq >no_flux_constraints_03/cm");
- system("md5sum no_flux_constraints_03/cm >no_flux_constraints_03/cm.check");
+ system((std::string("cat ") + base+"cm_" +Utilities::int_to_string(numprocs)+ "_?.dot|sort -n|uniq|md5sum >" + base+Utilities::int_to_string(numprocs)+"cm.check").c_str());
{
- std::ifstream file("no_flux_constraints_03/cm.check");
+ std::ifstream file((base+Utilities::int_to_string(numprocs)+"cm.check").c_str());
std::string str;
while (!file.eof())
{