52 #include "Teuchos_GlobalMPISession.hpp"
58 int main(
int argc,
char *argv[]) {
60 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
63 int iprint = argc - 1;
64 ROL::Ptr<std::ostream> outStream;
67 outStream = ROL::makePtrFromRef(std::cout);
69 outStream = ROL::makePtrFromRef(bhs);
73 oldFormatState.copyfmt(std::cout);
80 int nrow = 128, ncol = 100, rank = 4, testrank = 6;
81 ROL::Ptr<std::vector<RealT> > x_ptr = ROL::makePtr<std::vector<RealT>>(nrow, 0.0);
85 bool flag = sketch.
test(testrank,*outStream,2);
86 errorFlag += (flag ? 0 : 1);
88 catch (std::logic_error err) {
89 *outStream << err.what() <<
"\n";
94 std::cout <<
"End Result: TEST FAILED\n";
96 std::cout <<
"End Result: TEST PASSED\n";
99 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[])