Lock the mex file to avoid Matlab crashes.
authorR. Gokberk Cinbis <gokberkcinbis@gmail.com>
Wed, 20 Aug 2014 04:53:31 +0000 (07:53 +0300)
committerR. Gokberk Cinbis <gokberkcinbis@gmail.com>
Wed, 20 Aug 2014 04:53:31 +0000 (07:53 +0300)
commit1b5ef7402d9e486f1c00af5e7f0e735633d94118
tree90093f7f02c75a864a2acfb17c6238cbab7918ad
parent78eea2416e35f0be63a79881d4b23647a885de84
Lock the mex file to avoid Matlab crashes.

Commands like "clear all" and "clear function" causes segmentation faults or errors like these (especially after an 'init'):
 libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe/proto/caffe.proto
 libprotobuf FATAL google/protobuf/descriptor.cc:862] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
 [libprotobuf ERROR google/protobuf/message.cc:333] Type appears to be in generated pool but wasn't registered: caffe.LayerParameter
 Attempt to restart MATLAB?
To avoid these, lock the the mex file.
matlab/caffe/matcaffe.cpp