19 #include "../external/xgetopt/XGetopt.h"
23 #include "../scheduling/Clock.h"
27 #include "../mpi/PostMaster.h"
31 #include "../shell/Shell.h"
33 #include <sys/sysctl.h>
37 extern void testSync();
39 extern void testSyncArray(
unsigned int size,
unsigned int method );
69 unsigned int size,
unsigned int runsteps );
72 extern void testSmoldyn();
84 unsigned int numCPU = 0;
87 GetSystemInfo( &sysinfo );
89 numCPU = sysinfo.dwNumberOfProcessors;
93 numCPU = sysconf( _SC_NPROCESSORS_ONLN );
98 size_t len =
sizeof(numCPU);
102 mib[1] = HW_AVAILCPU;
105 sysctl(mib, 2, &numCPU, &len, NULL, 0);
110 sysctl( mib, 2, &numCPU, &len, NULL, 0 );
116 cout <<
"No CPU information available. Assuming single core." << endl;
132 cout << info <<
" checkChildren of " <<
134 ret.size() <<
" children\n";
135 for ( vector< Id >::iterator i = ret.begin(); i != ret.end(); ++i )
137 cout << i->element()->getName() << endl;
142 unsigned int& benchmark )
158 MPI_Init( &argc, &argv );
160 MPI_Comm_size( MPI_COMM_WORLD, &numNodes );
161 MPI_Comm_rank( MPI_COMM_WORLD, &myNode );
173 while ( ( opt = getopt( argc, argv,
"hiqurn:b:B:" ) ) != -1 ) {
179 numNodes = (
unsigned int)atoi( optarg );
182 benchmark = atoi( optarg );
190 doRegressionTests = 1;
197 cout <<
"Usage: moose -help -infiniteLoop -unit_tests -regression_tests -quit -n numNodes -benchmark [ksolve intFire hhNet msg_<msgType>_<size>]\n";
205 cout <<
"on node " << myNode <<
", numNodes = "
206 << numNodes <<
", numCores = " << numCores << endl;
215 assert( clockId.
value() == 1 );
231 assert ( shellId ==
Id() );
232 assert( clockId ==
Id( 1 ) );
233 assert( classMasterId ==
Id( 2 ) );
234 assert( postMasterId ==
Id( 3 ) );
244 assert( numMsg == 10 );
323 cout <<
"." << flush;
325 cout <<
"." << flush;
327 cout <<
"." << flush;
329 cout <<
"." << flush;
static unsigned int numCores
static void makeCinfoElements(Id parent)
static unsigned int numCores()
Element * element() const
Synonym for Id::operator()()
unsigned int value() const
static const Cinfo * initCinfo()
void processTests(Shell *s)
static void setHardware(unsigned int numCores, unsigned int numNodes, unsigned int myNode)
static void children(const Eref &e, vector< Id > &ret)
void testBuiltinsProcess()
static const Cinfo * initCinfo()
void setShellElement(Element *shelle)
static int doRegressionTests
void nonMpiTests(Shell *s)
static unsigned int myNode
void testSchedulingProcess()
void speedTestMultiNodeIntFireNetwork(unsigned int size, unsigned int runsteps)
void mooseBenchmarks(unsigned int option)
static void loadBalance()
void testBiophysicsProcess()
Id init(int argc, char **argv, bool &doUnitTests, bool &doRegressionTests, unsigned int &benchmark)
static unsigned int numNodes
static unsigned int initMsgManagers()
static void rebuildOpIndex()
static bool adopt(ObjId parent, Id child, unsigned int msgIndex)
void destroyMsgManagers()
static unsigned int myNode()
unsigned int getNumCores()
static const Cinfo * initCinfo()
static const Cinfo * initCinfo()
void checkChildren(Id parent, const string &info)
static unsigned int numNodes()
const string & getName() const