GithubHelp home page GithubHelp logo

matlab-lmdb's People

Contributors

kyamagu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

matlab-lmdb's Issues

File already exists error

Hi,

Sometimes I get the following error when I try to read from a db, following which matlab crashes:

[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:954] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):

Any ideas as to why this is happening ?

loading existing lmdb data into matlab

Hi,

I am wondering how to use this package to load existing .mdb files into matlab ? I tried this:

database = lmdb.DB(<path-to-mdb-file>,'RDONLY',true);

but without success:

Error using LMDB_
Not a directory

Error in lmdb.DB (line 65)
this.id_ = LMDB_('new', filename, varargin{:});

Could you please clarify this ?

lmdb read and write with single value

Thanks for this great work. However, I wonder if the wrapper supported with single value. I used function ".put() " with single value but get a corresponding integer with function ".get() ". Could you make some instruction about read and write with single value? Thank your!

Error during compiling

I encounter error during compiling

This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

Please help >.<

Problem with clear cursor

Hi,

I am having a problem when I clear a cursor. I have put it as a field in a Matlab struct and, for some reason, when I call clear cursor; and the method below is execute the 'txn_commit' and the 'txn_delete' functions are making the Matlab to crash. If I comment both lines it finishes my script correctly.

Is there any drawback of commenting these lines? I am not sure what why they are being executed after the 'cursor_delete' one.

Do you have any idea about what is wrong with it? Btw, thanks for the nice package.

function delete(this)
%DELETE Destructor.
assert(isscalar(this));
LMDB_('cursor_delete', this.id_);
%LMDB_('txn_commit', this.transaction_id_);
%LMDB_('txn_delete', this.transaction_id_);
end

crashes after creating a caffe::datum

Hi Kyamagu
The matlab crashes when I run the following command:
datum = caffe_pb.toDatum(data,label),
where label=1 and data is a 7x7x2048 single or uint8 array.

The error information is as follows:
[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:1018] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):

However, the file should not already exists in the database.

I am looking forward to your reply : )
best,
Yan

load data from lmdb problem

Hi kyamagu,
First at the most, this is a very nice work!!
I want to save some 3D matrix into lmdb database. I was able to do it with database.put('MyMatrix', MyMatrix) without any problem. I was also able to retrieve the data back by using MyMatrix2=database.get('MyMatrix'). However, the problem is the retrieved MyMatrix2 is a array of char while the saved MyMatrix is a matrix of int16. Let's say size(MyMatrix) == 256x256x32 (int16) then size(MyMatrix2) == 1x2097152 (char). Do I need to explicitly tell put() function the size of the data or did I just miss something important? Please help

Error during compiling

I got this error with the newest release

/usr/local/MATLAB/R2013a/bin/mex -output +lmdb/private/LMDB_.mexa64 src/LMDB_.cc -Iinclude -Isrc/liblmdb CXXFLAGS="$CXXFLAGS -std=c++11" src/liblmdb/liblmdb.a
cc1plus: error: unrecognized command line option "-std=c++11"

mex: compile of ' "src/LMDB_.cc"' failed.

make: *** [+lmdb/private/LMDB_.mexa64] Error 1

failed to make in windows enviroment

Hi,
Sorry to bother..I'm a windows user and I'm quite new to the terms unix, linux, shell, etc.
I notice this is for UNIX but I thought to give it a try with 'MinGW make' through git bash under the matlab-lmdb-caffe-extension folder and got the following error msg. Just want to confirm if this is something to do with the cross-platform? Is there a quick solution to compile on windows?
Thanks!

$ make
C:/MinGW/bin/make -C src/liblmdb
make[1]: Entering directory 'C:/Projects/matlab-lmdb-caffe-extension/src/liblmdb'
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_stat.o liblmdb.a -o mdb_stat
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_copy.o liblmdb.a -o mdb_copy
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_dump.o liblmdb.a -o mdb_dump
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_load.o liblmdb.a -o mdb_load
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest.o liblmdb.a -o mtest
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest2.o liblmdb.a -o mtest2
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest3.o liblmdb.a -o mtest3
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest4.o liblmdb.a -o mtest4
gcc -fPIC -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest5.o liblmdb.a -o mtest5
make[1]: Leaving directory 'C:/Projects/matlab-lmdb-caffe-extension/src/liblmdb'
C:/MATLAB/R2016b/bin/mex.bat -output +lmdb/private/LMDB_.mexw64 src/LMDB_.cc -Iinclude -Isrc/liblmdb CXXFLAGS="$CXXFLAGS -std=c++11" src/liblmdb/liblmdb.a
Building with 'MinGW64 Compiler (C++)'.
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xe39): undefined reference to mdb_txn_abort' C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xe58): undefined reference to mdb_txn_begin'
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xe63): undefined reference to mdb_strerror' C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xe9e): undefined reference to mdb_txn_abort'
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xecf): undefined reference to mdb_txn_abort' C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xf07): undefined reference to mdb_cursor_close'
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xf1d): undefined reference to mdb_cursor_open' C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xf28): undefined reference to mdb_strerror'
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xf61): undefined reference to mdb_txn_commit' C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xf6c): undefined reference to mdb_strerror'
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xfbe): undefined reference to mdb_dbi_close' C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0xfc7): undefined reference to mdb_env_close'
C:\Users\ding\AppData\Local\Temp\mex_8670067939871759_6064\LMDB_.obj:LMDB_.cc:(.text+0x1007): undefined reference to `mdb_dbi_close'
...
...
...
...
...
...
collect2.exe: error: ld returned 1 exit status

Makefile:18: recipe for target '+lmdb/private/LMDB_.mexw64' failed
make: *** [+lmdb/private/LMDB_.mexw64] Error 127

Error using LMDB_ MDB_MAP_FULL: Environment mapsize limit reached

I was trying to create a LMDB dataset with a huge MAPSIZE and when i insert a datum on it, it fires the following error: Error using LMDB_MDB_MAP_FULL: Environment mapsize limit reached.

What is the MAPSIZE maximum value ?
And is there some work around to overcome this limitation ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.