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 = 1, testrank = 6;
81 ROL::Ptr<std::vector<RealT> > x_ptr = ROL::makePtr<std::vector<RealT>>(nrow, 0.0);
86 *outStream << std::endl;
87 for (
int i = 0; i < testrank; ++i) {
88 *outStream <<
"Rank = " << i+1 <<
" Test Rank = " << testrank << std::endl;
90 flag = sketch.
test(testrank,*outStream,1);
92 errorFlag += (flag ? 0 : 1);
94 catch (std::logic_error& err) {
95 *outStream << err.what() <<
"\n";
100 std::cout <<
"End Result: TEST FAILED\n";
102 std::cout <<
"End Result: TEST PASSED\n";
105 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...
void setRank(const int rank)
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[])