test/sim/ut_sim_lmp.c
int ut_sim_lmp_init(u_test_case_t * tc) {

  sim_lmp_t * lammps = NULL;
  ffs_t * ffs = NULL;
  const char * argv0 = "-in nonexistant.in -log logs/lammps.log -sc none";
  const char * argv1 = "-log logs/lammps.log -sc none";

  u_dbg("Start");

  dbg_err_if(ffs_create(MPI_COMM_WORLD, &ffs));
  dbg_err_if(ffs_command_line_set(ffs, argv0));

  dbg_err_if(sim_lmp_create(&lammps));
  dbg_err_if(lammps == NULL);

  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_INIT));
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_FINISH));

  dbg_err_if(ffs_command_line_reset(ffs, argv1));
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_INIT) == 0);
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_FINISH));

  sim_lmp_free(lammps);
  ffs_free(ffs);

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

 err:
  if (lammps) sim_lmp_free(lammps);
  if (ffs) ffs_free(ffs);

  u_dbg("Failure\n");
  return U_TEST_FAILURE;
}
/*****************************************************************************
 *
 *  ut_sim_lmp_init
 *
 *  Smoke test which starts LAMMPS and does nothing. We don't even
 *  need a real input file.
 *
 *****************************************************************************/
ut_sim_lmp_init
Smoke test which starts LAMMPS and does nothing. We don't even
need a real input file.
ut_sim_lmp_init Smoke test which starts LAMMPS and does nothing . We don ' t even need a real input file .
int ut_sim_lmp_init(u_test_case_t * tc) {
  sim_lmp_t * lammps = NULL;
  ffs_t * ffs = NULL;
  const char * argv0 = "-in nonexistant.in -log logs/lammps.log -sc none";
  const char * argv1 = "-log logs/lammps.log -sc none";
  u_dbg("Start");
  dbg_err_if(ffs_create(MPI_COMM_WORLD, &ffs));
  dbg_err_if(ffs_command_line_set(ffs, argv0));
  dbg_err_if(sim_lmp_create(&lammps));
  dbg_err_if(lammps == NULL);
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_INIT));
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_FINISH));
  dbg_err_if(ffs_command_line_reset(ffs, argv1));
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_INIT) == 0);
  dbg_err_if(sim_lmp_execute(lammps, ffs, SIM_EXECUTE_FINISH));
  sim_lmp_free(lammps);
  ffs_free(ffs);
  u_dbg("Success\n");
  return U_TEST_SUCCESS;
 err:
  if (lammps) sim_lmp_free(lammps);
  if (ffs) ffs_free(ffs);
  u_dbg("Failure\n");
  return U_TEST_FAILURE;
}
int ut_sim_lmp_init ( u_test_case_t * tc ) { sim_lmp_t * lammps = NULL ; ffs_t * ffs = NULL ; const char * argv0 = " " ; const char * argv1 = " " ; u_dbg ( " " ) ; dbg_err_if ( ffs_create ( MPI_COMM_WORLD , & ffs ) ) ; dbg_err_if ( ffs_command_line_set ( ffs , argv0 ) ) ; dbg_err_if ( sim_lmp_create ( & lammps ) ) ; dbg_err_if ( lammps == NULL ) ; dbg_err_if ( sim_lmp_execute ( lammps , ffs , SIM_EXECUTE_INIT ) ) ; dbg_err_if ( sim_lmp_execute ( lammps , ffs , SIM_EXECUTE_FINISH ) ) ; dbg_err_if ( ffs_command_line_reset ( ffs , argv1 ) ) ; dbg_err_if ( sim_lmp_execute ( lammps , ffs , SIM_EXECUTE_INIT ) == 0 ) ; dbg_err_if ( sim_lmp_execute ( lammps , ffs , SIM_EXECUTE_FINISH ) ) ; sim_lmp_free ( lammps ) ; ffs_free ( ffs ) ; u_dbg ( " \n " ) ; return U_TEST_SUCCESS ; err : if ( lammps ) sim_lmp_free ( lammps ) ; if ( ffs ) ffs_free ( ffs ) ; u_dbg ( " \n " ) ; return U_TEST_FAILURE ; }
ut_sim_lmp_init
  Smoke test which starts LAMMPS and does nothing.
ut_sim_lmp_init Smoke test which starts LAMMPS and does nothing .