test/sim/ut_sim_dmc.c
int ut_sim_dmc_proxy(u_test_case_t * tc) {

  ffs_t * ffs = NULL;
  proxy_t * proxy = NULL;

  int rank = 0;
  char filename[BUFSIZ];
  MPI_Comm comm = MPI_COMM_NULL;

  u_dbg("Start");

  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm_split(MPI_COMM_WORLD, rank, 0, &comm);
  sprintf(filename, "%s-%d", stub, rank);

  dbg_err_if(proxy_create(rank, comm, &proxy));
  dbg_err_if(proxy_delegate_create(proxy, "dmc"));

  dbg_err_if(proxy_ffs(proxy, &ffs));
  dbg_err_if(ffs_command_line_set(ffs, input));
  dbg_err_if(proxy_execute(proxy, SIM_EXECUTE_INIT));

  dbg_err_if(proxy_state(proxy, SIM_STATE_INIT, filename));
  dbg_err_if(proxy_state(proxy, SIM_STATE_WRITE, filename));
  dbg_err_if(proxy_state(proxy, SIM_STATE_READ, filename));
  dbg_err_if(proxy_state(proxy, SIM_STATE_DELETE, filename));

  dbg_err_if(proxy_lambda(proxy));

  dbg_err_if(proxy_execute(proxy, SIM_EXECUTE_FINISH));

  dbg_err_if(proxy_delegate_free(proxy));
  proxy_free(proxy);

  u_dbg("Success\n");
  return U_TEST_SUCCESS;

 err:
  if (proxy) proxy_free(proxy);
  MPI_Comm_free(&comm);

  u_dbg("Failure\n");
  return U_TEST_FAILURE;
}
/*****************************************************************************
 *
 *  ut_sim_dmc_proxy
 *
 *  We need to split MPI_COMM_WORLD into individual ranks to ensure the
 *  simulation is serial.
 *
 *****************************************************************************/
ut_sim_dmc_proxy
We need to split MPI_COMM_WORLD into individual ranks to ensure the
simulation is serial.
ut_sim_dmc_proxy We need to split MPI_COMM_WORLD into individual ranks to ensure the simulation is serial .
int ut_sim_dmc_proxy(u_test_case_t * tc) {
  ffs_t * ffs = NULL;
  proxy_t * proxy = NULL;
  int rank = 0;
  char filename[BUFSIZ];
  MPI_Comm comm = MPI_COMM_NULL;
  u_dbg("Start");
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm_split(MPI_COMM_WORLD, rank, 0, &comm);
  sprintf(filename, "%s-%d", stub, rank);
  dbg_err_if(proxy_create(rank, comm, &proxy));
  dbg_err_if(proxy_delegate_create(proxy, "dmc"));
  dbg_err_if(proxy_ffs(proxy, &ffs));
  dbg_err_if(ffs_command_line_set(ffs, input));
  dbg_err_if(proxy_execute(proxy, SIM_EXECUTE_INIT));
  dbg_err_if(proxy_state(proxy, SIM_STATE_INIT, filename));
  dbg_err_if(proxy_state(proxy, SIM_STATE_WRITE, filename));
  dbg_err_if(proxy_state(proxy, SIM_STATE_READ, filename));
  dbg_err_if(proxy_state(proxy, SIM_STATE_DELETE, filename));
  dbg_err_if(proxy_lambda(proxy));
  dbg_err_if(proxy_execute(proxy, SIM_EXECUTE_FINISH));
  dbg_err_if(proxy_delegate_free(proxy));
  proxy_free(proxy);
  u_dbg("Success\n");
  return U_TEST_SUCCESS;
 err:
  if (proxy) proxy_free(proxy);
  MPI_Comm_free(&comm);
  u_dbg("Failure\n");
  return U_TEST_FAILURE;
}
int ut_sim_dmc_proxy ( u_test_case_t * tc ) { ffs_t * ffs = NULL ; proxy_t * proxy = NULL ; int rank = 0 ; char filename [ BUFSIZ ] ; MPI_Comm comm = MPI_COMM_NULL ; u_dbg ( " " ) ; MPI_Comm_rank ( MPI_COMM_WORLD , & rank ) ; MPI_Comm_split ( MPI_COMM_WORLD , rank , 0 , & comm ) ; sprintf ( filename , " " , stub , rank ) ; dbg_err_if ( proxy_create ( rank , comm , & proxy ) ) ; dbg_err_if ( proxy_delegate_create ( proxy , " " ) ) ; dbg_err_if ( proxy_ffs ( proxy , & ffs ) ) ; dbg_err_if ( ffs_command_line_set ( ffs , input ) ) ; dbg_err_if ( proxy_execute ( proxy , SIM_EXECUTE_INIT ) ) ; dbg_err_if ( proxy_state ( proxy , SIM_STATE_INIT , filename ) ) ; dbg_err_if ( proxy_state ( proxy , SIM_STATE_WRITE , filename ) ) ; dbg_err_if ( proxy_state ( proxy , SIM_STATE_READ , filename ) ) ; dbg_err_if ( proxy_state ( proxy , SIM_STATE_DELETE , filename ) ) ; dbg_err_if ( proxy_lambda ( proxy ) ) ; dbg_err_if ( proxy_execute ( proxy , SIM_EXECUTE_FINISH ) ) ; dbg_err_if ( proxy_delegate_free ( proxy ) ) ; proxy_free ( proxy ) ; u_dbg ( " \n " ) ; return U_TEST_SUCCESS ; err : if ( proxy ) proxy_free ( proxy ) ; MPI_Comm_free ( & comm ) ; u_dbg ( " \n " ) ; return U_TEST_FAILURE ; }
ut_sim_dmc_proxy
  We need to split MPI_COMM_WORLD into individual ranks to ensure the
  simulation is serial.
ut_sim_dmc_proxy We need to split MPI_COMM_WORLD into individual ranks to ensure the simulation is serial .