Commit 8093fcd0 authored by whitlocb's avatar whitlocb
Browse files

Add -echo argument to global ids test

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23569 18c085ea-50e0-402c-830e-de6fd14e8384
parent aa9d43ef
......@@ -85,7 +85,7 @@ VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP HDF5_LIBRARY_DIR hdf5_hl HDF5_LIBRARY_D
##
# Give VisIt information so it can install MPI into the binary distribution.
VISIT_OPTION_DEFAULT(VISIT_MPICH_DIR ${VISITHOME}/mpich/3.0.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MPICH_DIR ${VISITHOME}/mpich/3.0.4/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON)
# Tell VisIt the parallel compiler so it can deduce parallel flags
......
......@@ -120,6 +120,7 @@ typedef struct
double time;
int runMode;
int done;
int echo;
int nx,ny,nz;
float extents[6];
......@@ -139,6 +140,7 @@ simulation_data_ctor(simulation_data *sim)
sim->time = 0.;
sim->runMode = SIM_STOPPED;
sim->done = 0;
sim->echo = 0;
sim->nx = 101;
sim->ny = 101;
......@@ -478,6 +480,12 @@ ProcessConsoleCommand(simulation_data *sim)
simulate_one_timestep(sim);
else if(strcmp(cmd, "run") == 0)
sim->runMode = SIM_RUNNING;
if(sim->echo && sim->par_rank == 0)
{
fprintf(stderr, "Command %s completed.\n", cmd);
fflush(stderr);
}
}
/******************************************************************************
......@@ -597,6 +605,7 @@ void mainloop(simulation_data *sim)
int main(int argc, char **argv)
{
int i;
char *env = NULL;
simulation_data sim;
simulation_data_ctor(&sim);
......@@ -616,6 +625,12 @@ int main(int argc, char **argv)
/* Initialize environment variables. */
SimulationArguments(argc, argv);
for(i = 1; i < argc; ++i)
{
if(strcmp(argv[i], "-echo") == 0)
sim.echo = 1;
}
#ifdef PARALLEL
/* Install callback functions for global communication. */
VisItSetBroadcastIntFunction2(visit_broadcast_int_callback, (void*)&sim);
......
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