46 MPI_Comm comm,
int numProcs,
int localProc){
48 std::vector<std::string> stdstrings;
53 const char** params = NULL;
61 std::string solverName;
62 std::string datasource;
76 fei::console_out() <<
"Failed to find one or more required parameters in input-file."
86 if (datasource ==
"HexBeam") {
87 hexcubeptr =
new HexBeam(W, D, DofPerNode,
91 hexcubeptr =
new HexBeamCR(W, D, DofPerNode,
98 int numCRs = (W+1)*(W+1)*(numProcs*2)-1;
101 FEI_COUT <<
"========================================================"
103 FEI_COUT <<
"Size W: " << W <<
" (num-elements-along-side-of-cube)"<<
FEI_ENDL;
104 FEI_COUT <<
"Size D: " << D <<
" (num-elements-along-depth-of-cube)"<<
FEI_ENDL;
111 FEI_COUT <<
"========================================================"
123 if (whichFEI ==
"OLDFEI") {
127 catch (std::runtime_error& exc) {
133 else if (whichFEI ==
"fei::FEI_Impl") {
137 catch (std::runtime_error& exc) {
141 fei = factory->createFEI(comm);
149 CHK_ERR(
fei->parameters(numParams, params) );
158 CHK_ERR(
fei->initFields( 1, &fieldSize, &fieldID ) );
166 init_constraints(
fei.get(), hexcube, firstLocalCRID) );
172 if (localProc == 0) {
197 if (localProc == 0) {
201 FEI_COUT <<
"Total assembly time: " << fei_init_time + fei_load_time <<
FEI_ENDL;
213 err =
fei->solve(status);
216 if (localProc==0)
FEI_COUT <<
"solve returned status: " << status <<
FEI_ENDL;
221 if (localProc == 0) {
226 if (localProc == 0) {
227#if defined(FEI_PLATFORM) && defined(FEI_OPT_LEVEL)
228 double benchmark = fei_init_time;
231 testname_init <<
"cube_"<<whichFEI<<
"_init_"<<W<<
"_"<<D<<
"_"<<DofPerNode<<
"_"
232 <<solverName<<
"_np"<<numProcs<<
"_"
233 <<FEI_PLATFORM<<
"_"<<FEI_OPT_LEVEL;
236 testname_load <<
"cube_"<<whichFEI<<
"_load_"<<W<<
"_"<<D<<
"_"<<DofPerNode<<
"_"
237 <<solverName<<
"_np"<<numProcs<<
"_"
238 <<FEI_PLATFORM<<
"_"<<FEI_OPT_LEVEL;
240 double file_init, file_load;
241 bool file_benchmarks_available =
true;
244 testname_init.str().c_str());
246 testname_load.str().c_str());
248 catch (std::runtime_error& exc) {
249 file_benchmarks_available =
false;
252 if (file_benchmarks_available) {
254 bool init_test_passed =
258 benchmark = fei_load_time;
259 bool load_test_passed =
263 returnValue = init_test_passed&&load_test_passed ? 0 : 1;
268 bool testPassed = returnValue==0;
269 if (testPassed && localProc == 0) {
int beam_oldfei_main(int argc, char **argv, MPI_Comm comm, int numProcs, int localProc)