📄 initstatx.cxx
字号:
/* -*- Mode: C++; c-basic-offset:4 ; -*- *//* * * (C) 2003 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */#include "mpi.h"#include "mpitestconf.h"#ifdef HAVE_IOSTREAM// Not all C++ compilers have iostream instead of iostream.h#include <iostream>#ifdef HAVE_NAMESPACE_STD// Those that do often need the std namespace; otherwise, a bare "cout"// is likely to fail to compileusing namespace std;#endif#else#include <iostream.h>#endif#include "mpitestcxx.h"int main( int argc, char *argv[] ){ int errs = 0; bool flag; int provided, claimed; provided = MPI::Init_thread( MPI::THREAD_MULTIPLE ); flag = MPI::Is_thread_main(); if (!flag) { errs++; cout << "This thread call init_thread but Is_thread_main gave false\n"; } claimed = MPI::Query_thread(); if (claimed != provided) { errs++; cout << "Query thread gave thread level " << claimed << " but Init_thread gave " << provided << "\n"; } MTest_Finalize( errs ); MPI::Finalize(); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -