File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 11project (LBANN)
22cmake_minimum_required (VERSION 2.8.12)
3- set (LBANN_MAJOR_VERSION 0)
4- set (LBANN_MINOR_VERSION 9)
3+ #set(LBANN_MAJOR_VERSION 0)
4+ #set(LBANN_MINOR_VERSION 91)
5+
6+ # Get the git version so that we can embed it into the executable
7+ execute_process (COMMAND git describe --abbrev=7 --dirty --always --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
8+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLBANN_VERSION=\\\" ${GIT_VERSION} \\\" " )
59
610################################################################
711# Options
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ namespace lbann {
3939class lbann_callback_print : public lbann_callback {
4040public:
4141 lbann_callback_print (int _batch_interval = 1 ) : lbann_callback(_batch_interval) {}
42+ void setup (model* m);
4243 void on_epoch_begin (model* m);
4344 void on_epoch_end (model* m);
4445 void on_test_end (model* m);
Original file line number Diff line number Diff line change 3131
3232namespace lbann {
3333
34+ void lbann_callback_print::setup (model* m) {
35+ #ifdef LBANN_VERSION
36+ lbann_comm* comm = m->get_comm ();
37+ if (comm->am_world_master ()) {
38+ std::cout << " Training with LLNL LBANN version " << LBANN_VERSION << endl;
39+ }
40+ #endif
41+ }
42+
3443void lbann_callback_print::on_epoch_begin (model* m) {
3544 lbann_comm* comm = m->get_comm ();
3645 if (comm->am_world_master ()) {
You can’t perform that action at this time.
0 commit comments