#include "site-stuff.h" #include #if NEWCC #include #else #include #endif #include #include "param.h" #include "MHD.h" int dump_step(int, MHD*); #ifdef PGI /// Portland group compiler-specific function that needs to be initialized to handle commandline arguments extern "C" void pghpf_init(int *); #endif int __argc_save; char **__argv_save; static int zz = 0; main(int argc, char **argv) { #ifdef DEBUG_MODE_ON printf("DEBUG: in MSETUP.C::main(...)\n"); #endif int i; #ifdef PGI // PG compiler stuff __argc_save = argc; __argv_save = argv; pghpf_init(&zz); #endif int ndump=1, nstart=1, nstop =1; int lstep; float Dt; int num_proc = NUMBER_OF_PROCESSORS; int nmhd = NUMBER_OF_MHD; int nion = NUMBER_OF_ION; std::cout << "Welcome to the steppes of Asia!" << endl; std::cout << "param.h: " << N_I << ' ' << N_J << ' ' << N_K << ' ' << N_ORDER << ' ' << NUMBER_OF_PROCESSORS << ' ' << NUMBER_OF_MHD << ' ' << NUMBER_OF_ION << endl; #ifdef PARA_PPP // Optimization_Manager::Initialize_Virtual_Machine("",num_proc,argc,argv); int my_pe = Communication_Manager::My_Process_Number; #endif // constructor for the MHD class #ifdef PARA_PPP Range mhd_procs(0,nmhd-1); MHD mhd = MHD(N_I,N_J,N_K,N_ORDER,mhd_procs); #else MHD mhd = MHD(N_I,N_J,N_K,N_ORDER); #endif #ifdef PARA_PPP Communication_Manager::Sync(); Optimization_Manager::Exit_Virtual_Machine(); #endif }