11#if defined(QDP_USE_QMT_THREADS)
40#ifdef QDP_USE_QMT_THREADS
43 std::cout <<
"QDP uses qmt threading: Initializing threads..." ;
44 int thread_status = qmt_init();
45 if( thread_status == 0 ) {
46 std::cout <<
"Success. We have " <<
qdpNumThreads() <<
" threads \n";
49 std::cout <<
"Failure... qmt_init() returned " << thread_status << std::endl;
53#ifdef QDP_USE_OMP_THREADS
54 std::cout <<
"QDP uses OpenMP threading. We have " <<
qdpNumThreads() <<
" threads \n";
62 std::cout <<
"Failure... space for norm2 results failed " << std::endl;
68 std::cout <<
"Failure... space for innerProd results failed " << std::endl;
83 bool help_flag =
false;
84 for (
int i=0; i<*argc; i++)
86 if (strcmp((*argv)[i],
"-h")==0)
92 fprintf(stderr,
"Usage: %s options\n",(*argv)[0]);
93 fprintf(stderr,
"options:\n");
94 fprintf(stderr,
" -h help\n");
95#if defined(QDP_USE_PROFILING)
96 fprintf(stderr,
" -p %%d [%d] profile level\n",
99 fprintf(stderr,
" -poolsize <X> Create a fixed pool of X GB for Pool Alloc\n");
103 for (
int i=1; i<*argc; i++)
105#if defined(QDP_USE_PROFILING)
106 if (strcmp((*argv)[i],
"-p")==0)
109 sscanf((*argv)[++i],
"%d", &lev);
113 if ( strcmp((*argv)[i],
"-poolsize")==0)
135#if defined(QDP_USE_HDF5)
150#if defined(QMT_USE_QMT_THREADS)
155 std::cout <<
"QDP use qmt threading: Finalizing threads" << std::endl;
void init()
Initializer for layout.
StandardOutputStream cout
StandardOutputStream cerr
REAL64 * innerProd_results
Yet another random number generator.
bool QDP_isInitialized()
Is the machine initialized?
void QDP_error_exit(const char *format,...)
Simple error display and abort routine.
void QDP_initialize(int *argc, char ***argv)
Turn on the machine.
static bool isInit
Private flag for status.
void QDP_suspend()
Suspends QDP communications.
int setProgramProfileLevel(int n)
void QDP_abort(int status)
Panic button.
void QDP_resume()
Resumes QDP communications.
void initProfile(const std::string &file, const std::string &caller, int line)
void QDP_finalize()
Turn off the machine.
Primary include file for QDP.