7 #include <boost/program_options/errors.hpp>
8 #include <boost/program_options/options_description.hpp>
9 #include <boost/program_options/parsers.hpp>
10 #include <boost/program_options/variables_map.hpp>
27 using namespace boost;
43 table.set_row_size(8);
51 std::vector<Real> row(8);
53 for(Real value = 0.0 ; value != 1000.0 ; value += 1.0 )
55 row[0] = value / 1000;
57 row[2] = (value / 1000) - 1;
58 row[3] = std::sin(4 * row[0]);
60 row[5] = std::cos(4 * row[2]);
62 row[7] = 278 * row[0];
64 buffer.add_row( row );
72 int main(
int argc,
char ** argv)
80 Core::instance().initiate(argc, argv);
81 Comm::instance().init(argc, argv);
83 parent_comm = Comm::instance().get_parent();
84 rank = Comm::instance().rank();
86 if( parent_comm == MPI_COMM_NULL )
88 CFerror <<
"This solver cannot run without a manager. Exiting..." <<
CFendl;
96 create_component<Manager>(
"PEManager");
98 Core::instance().root().create_component<
CWorker>(
"Worker");
119 Logger::instance().getStream(
INFO).addStringForwarder(forwarder);
122 bool rank0 =
CFinfo.getFilterRankZero(LogStream::SCREEN);
124 CFinfo.setFilterRankZero(LogStream::SCREEN,
false);
126 CFinfo <<
"Worker[" << rank <<
"] -> Syncing with the parent..." <<
CFendl;
127 Comm::instance().barrier();
128 MPI_Barrier( parent_comm );
129 CFinfo <<
"Worker[" << rank <<
"] -> Synced with the parent!" <<
CFendl;
131 CFinfo.setFilterRankZero(LogStream::SCREEN, rank0);
135 CFinfo <<
"Worker[" << rank <<
"] -> " <<
"C U..." <<
CFendl;
138 MPI_Barrier( parent_comm );
141 Comm::instance().finalize();
142 Core::instance().terminate();
#define CFinfo
these are always defined
boost::thread * listening_thread()
boost::shared_ptr< Component > build_component(const std::string &builder_name, const std::string &name, const std::string &factory_type_name)
Safe pointer to an object. This is the supported method for referring to components.
external boost library namespace
Basic Classes for Solver applications used by CF.
Buffer create_buffer(const size_t buffersize=16384)
Top-level namespace for coolfluid.
MPI_Comm Communicator
communicator
void set_data_set(const common::URI &uri)
Classes offering a MPI interface for COOLFluiD.
Component & mark_basic()
marks this component as basic.
Handle< Component > create_component(const std::string &name, const std::string &builder)
Build a (sub)component of this component using the extended type_name of the component.
Most basic kernel library.
int main(int argc, char **argv)