[cig-commits] commit 1908 by buerg to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Mon Sep 23 09:33:22 PDT 2013
Revision 1908
Insert r1626.
U trunk/aspire/source/mesh_refinement/interface.cc
U trunk/aspire/source/postprocess/visualization.cc
U trunk/aspire/source/simulator/core.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=1908&peg=1908
Diff:
Modified: trunk/aspire/source/mesh_refinement/interface.cc
===================================================================
--- trunk/aspire/source/mesh_refinement/interface.cc 2013-09-23 16:15:08 UTC (rev 1907)
+++ trunk/aspire/source/mesh_refinement/interface.cc 2013-09-23 16:33:10 UTC (rev 1908)
@@ -65,7 +65,8 @@
for (typename std::list<std_cxx1x::shared_ptr<Interface<dim> > >::iterator
p = mesh_refinement_objects.begin();
p != mesh_refinement_objects.end(); ++p)
- dynamic_cast<SimulatorAccess<dim>&>(**p).initialize (simulator);
+ if (dynamic_cast<const SimulatorAccess<dim>*>(p->get()) != 0)
+ dynamic_cast<SimulatorAccess<dim>&>(**p).initialize (simulator);
// also extract the MPI communicator over which this simulator
// operates so that we can later scale vectors that live on
Modified: trunk/aspire/source/postprocess/visualization.cc
===================================================================
--- trunk/aspire/source/postprocess/visualization.cc 2013-09-23 16:15:08 UTC (rev 1907)
+++ trunk/aspire/source/postprocess/visualization.cc 2013-09-23 16:33:10 UTC (rev 1908)
@@ -313,9 +313,12 @@
{
std::string h5_filename = solution_file_prefix + ".h5";
std::string xdmf_filename = this->get_output_directory() + "solution.xdmf";
- data_out.write_hdf5_parallel((this->get_output_directory()+h5_filename).c_str(), MPI_COMM_WORLD);
- xdmf_entries.push_back(data_out.create_xdmf_entry(h5_filename.c_str(), this->get_time(), MPI_COMM_WORLD));
- data_out.write_xdmf_file(xdmf_entries, xdmf_filename.c_str(), MPI_COMM_WORLD);
+ data_out.write_hdf5_parallel((this->get_output_directory()+h5_filename).c_str(),
+ this->get_mpi_communicator ());
+ xdmf_entries.push_back(data_out.create_xdmf_entry(h5_filename.c_str(), this->get_time(),
+ this->get_mpi_communicator ()));
+ data_out.write_xdmf_file(xdmf_entries, xdmf_filename.c_str(),
+ this->get_mpi_communicator ());
}
else if (output_format=="vtu")
{
@@ -325,7 +328,8 @@
{
AssertThrow(group_files==1, ExcNotImplemented());
data_out.write_vtu_in_parallel((this->get_output_directory() + solution_file_prefix +
- ".vtu").c_str(), MPI_COMM_WORLD);
+ ".vtu").c_str(),
+ this->get_mpi_communicator ());
if (Utilities::MPI::this_mpi_process(this->get_mpi_communicator()) == 0)
{
Modified: trunk/aspire/source/simulator/core.cc
===================================================================
--- trunk/aspire/source/simulator/core.cc 2013-09-23 16:15:08 UTC (rev 1907)
+++ trunk/aspire/source/simulator/core.cc 2013-09-23 16:33:10 UTC (rev 1908)
@@ -249,7 +249,7 @@
// finally produce a record of the run-time parameters by writing
// the currently used values into a file
// Only write the parameter files on the root node to avoid file system conflicts
- if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+ if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
{
std::ofstream prm_out ((parameters.output_directory + "parameters.prm").c_str());
AssertThrow (prm_out,
@@ -257,7 +257,7 @@
parameters.output_directory + "parameters.prm>."));
prm.print_parameters(prm_out, ParameterHandler::Text);
}
- if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
+ if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)
{
std::ofstream prm_out ((parameters.output_directory + "parameters.tex").c_str());
AssertThrow (prm_out,
@@ -1195,9 +1195,10 @@
// This prevents race conditions where some processes will checkpoint and others won't
if (parameters.checkpoint_time_secs > 0)
{
- int global_do_checkpoint = ((std::time(NULL)-last_checkpoint_time) >= parameters.checkpoint_time_secs);
+ int global_do_checkpoint = ((std::time(NULL)-last_checkpoint_time) >=
+ parameters.checkpoint_time_secs);
- MPI_Bcast(&global_do_checkpoint, 1, MPI_INT, 0, MPI_COMM_WORLD);
+ MPI_Bcast(&global_do_checkpoint, 1, MPI_INT, 0, mpi_communicator);
do_checkpoint = (global_do_checkpoint == 1);
}
More information about the CIG-COMMITS
mailing list