Commit 2d1cd395 authored by whitlocb's avatar whitlocb
Browse files

I changed the order of VisItSetupEnvironment and MPI_Init in some sim examples.



git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11555 18c085ea-50e0-402c-830e-de6fd14e8384
parent ac6a5406
...@@ -640,17 +640,15 @@ int main(int argc, char **argv) ...@@ -640,17 +640,15 @@ int main(int argc, char **argv)
simulation_data sim; simulation_data sim;
simulation_data_ctor(&sim); simulation_data_ctor(&sim);
SimulationArguments(argc, argv);
VisItSetupEnvironment();
#ifdef PARALLEL #ifdef PARALLEL
/* Initialize MPI */ /* Initialize MPI */
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &sim.par_rank); MPI_Comm_rank (MPI_COMM_WORLD, &sim.par_rank);
MPI_Comm_size (MPI_COMM_WORLD, &sim.par_size); MPI_Comm_size (MPI_COMM_WORLD, &sim.par_size);
#endif
SimulationArguments(argc, argv);
VisItSetupEnvironment();
#ifdef PARALLEL
/* Adjust the life partitioning */ /* Adjust the life partitioning */
sim.life.Nrows = NN/sim.par_size; /* assume they divide evenly */ sim.life.Nrows = NN/sim.par_size; /* assume they divide evenly */
if((float)(NN)/sim.par_size - NN/sim.par_size > 0.0) if((float)(NN)/sim.par_size - NN/sim.par_size > 0.0)
......
...@@ -413,18 +413,16 @@ int main(int argc, char **argv) ...@@ -413,18 +413,16 @@ int main(int argc, char **argv)
simulation_data sim; simulation_data sim;
simulation_data_ctor(&sim); simulation_data_ctor(&sim);
/* Initialize environment variables. */
SimulationArguments(argc, argv);
VisItSetupEnvironment();
#ifdef PARALLEL #ifdef PARALLEL
/* Initialize MPI */ /* Initialize MPI */
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
MPI_Comm_rank (MPI_COMM_WORLD, &sim.par_rank); MPI_Comm_rank (MPI_COMM_WORLD, &sim.par_rank);
MPI_Comm_size (MPI_COMM_WORLD, &sim.par_size); MPI_Comm_size (MPI_COMM_WORLD, &sim.par_size);
#endif
/* Initialize environment variables. */
SimulationArguments(argc, argv);
VisItSetupEnvironment();
#ifdef PARALLEL
/* Install callback functions for global communication. */ /* Install callback functions for global communication. */
VisItSetBroadcastIntFunction(visit_broadcast_int_callback); VisItSetBroadcastIntFunction(visit_broadcast_int_callback);
VisItSetBroadcastStringFunction(visit_broadcast_string_callback); VisItSetBroadcastStringFunction(visit_broadcast_string_callback);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment