Skip to content
Snippets Groups Projects
Commit e9865fa6 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Fixed edge cases when Comm_size = 1, fixed compilation without MPI.

parent cdcc53a1
No related branches found
No related tags found
No related merge requests found
...@@ -198,7 +198,10 @@ public: ...@@ -198,7 +198,10 @@ public:
int entity_rank(int tag) const int entity_rank(int tag) const
{ {
if (num_partitions > 1)
return partition_inverse_map.at(tag)-1; return partition_inverse_map.at(tag)-1;
return 0;
} }
entity& entity_world_lookup(int); entity& entity_world_lookup(int);
......
...@@ -635,7 +635,6 @@ gather_field(const model& mod, maxwell::field& in, maxwell::field& out, ...@@ -635,7 +635,6 @@ gather_field(const model& mod, maxwell::field& in, maxwell::field& out,
} }
} }
} }
#endif
void void
export_fields_to_silo_2(const model& mod, maxwell::solver_state& state, export_fields_to_silo_2(const model& mod, maxwell::solver_state& state,
...@@ -691,6 +690,7 @@ export_fields_to_silo_2(const model& mod, maxwell::solver_state& state, ...@@ -691,6 +690,7 @@ export_fields_to_silo_2(const model& mod, maxwell::solver_state& state,
gather_field(mod, state.emf_next, dummy, 0, MPI_COMM_WORLD); gather_field(mod, state.emf_next, dummy, 0, MPI_COMM_WORLD);
} }
} }
#endif /* USE_MPI */
void void
export_fields_to_silo(const model& mod, const maxwell::solver_state& state, export_fields_to_silo(const model& mod, const maxwell::solver_state& state,
......
...@@ -221,12 +221,12 @@ void test_it(const model& mod, State& state, maxwell::parameter_loader& mpl) ...@@ -221,12 +221,12 @@ void test_it(const model& mod, State& state, maxwell::parameter_loader& mpl)
do_sources(mod, state, mpl); do_sources(mod, state, mpl);
#ifdef USE_MPI #ifdef USE_MPI
//int rank;
//MPI_Comm_rank(MPI_COMM_WORLD, &rank);
//if (rank == 0)
#endif /* USE_MPI */
if ( (silo_output_rate != 0) and (i%silo_output_rate == 0) ) if ( (silo_output_rate != 0) and (i%silo_output_rate == 0) )
export_fields_to_silo_2(mod, state, mpl); export_fields_to_silo_2(mod, state, mpl);
#else
if ( (silo_output_rate != 0) and (i%silo_output_rate == 0) )
export_fields_to_silo(mod, state, mpl);
#endif /* USE_MPI */
swap(state, mpl); swap(state, mpl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment