18 #include "Teuchos_GlobalMPISession.hpp"
24 int main(
int argc,
char *argv[]) {
26 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
29 int iprint = argc - 1;
30 ROL::Ptr<std::ostream> outStream;
33 outStream = ROL::makePtrFromRef(std::cout);
35 outStream = ROL::makePtrFromRef(bhs);
39 oldFormatState.copyfmt(std::cout);
46 int nrow = 128, ncol = 100, rank = 1, testrank = 6;
47 ROL::Ptr<std::vector<RealT> > x_ptr = ROL::makePtr<std::vector<RealT>>(nrow, 0.0);
52 *outStream << std::endl;
53 for (
int i = 0; i < testrank; ++i) {
54 *outStream <<
"Rank = " << i+1 <<
" Test Rank = " << testrank << std::endl;
56 flag = sketch.
test(testrank,*outStream,1);
58 errorFlag += (flag ? 0 : 1);
60 catch (std::logic_error& err) {
61 *outStream << err.what() <<
"\n";
66 std::cout <<
"End Result: TEST FAILED\n";
68 std::cout <<
"End Result: TEST PASSED\n";
71 std::cout.copyfmt(oldFormatState);
Provides an interface for randomized sketching.
Defines a no-output stream class ROL::NullStream and a function makeStreamPtr which either wraps a re...
Provides the ROL::Vector interface for scalar values, to be used, for example, with scalar constraint...
bool test(const int rank, std::ostream &outStream=std::cout, const int verbosity=0)
basic_nullstream< char, char_traits< char >> nullstream
int main(int argc, char *argv[])