summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan L Long <jonlong@cs.berkeley.edu>2014-10-06 13:27:10 -0700
committerJonathan L Long <jonlong@cs.berkeley.edu>2014-10-06 13:28:07 -0700
commita1a48563d3cbb37ffa510d0ffae718183835e2dc (patch)
tree196319861cfe8d8d135f99274231632e075383aa
parent59a06fc2e20254d44ac980e17036fd104a8e2f57 (diff)
downloadcaffeonacl-a1a48563d3cbb37ffa510d0ffae718183835e2dc.tar.gz
caffeonacl-a1a48563d3cbb37ffa510d0ffae718183835e2dc.tar.bz2
caffeonacl-a1a48563d3cbb37ffa510d0ffae718183835e2dc.zip
use glog to provide a backtrace on crash
-rw-r--r--src/caffe/common.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/caffe/common.cpp b/src/caffe/common.cpp
index 94fdf924..834d5694 100644
--- a/src/caffe/common.cpp
+++ b/src/caffe/common.cpp
@@ -35,6 +35,8 @@ void GlobalInit(int* pargc, char*** pargv) {
::gflags::ParseCommandLineFlags(pargc, pargv, true);
// Google logging.
::google::InitGoogleLogging(*(pargv)[0]);
+ // Provide a backtrace on segfault.
+ ::google::InstallFailureSignalHandler();
}
#ifdef CPU_ONLY // CPU-only Caffe.