- 17 Aug, 2015 1 commit
-
-
Kirill Smelkov authored
ZODB 3.10.4 was released almost 4 years ago, and contains significant change how ghost objects coming from DB are initially setup.
-
- 12 Jun, 2015 1 commit
-
-
Kirill Smelkov authored
-
- 02 Jun, 2015 2 commits
-
-
Kirill Smelkov authored
As discussion in https://bitbucket.org/pypa/setuptools/issue/313 unveiled, setuptools do not have to carry setuptools.file_finders entrypoint with it in order to support _other_ projects to use .file_finders entry point. In our case it means that is is normal that we have to make sure that the group we are going to register entry-point into, exists. Remove erroneous comments introduced in 11d130d1 (setup: Ensure setuptools.file_finders entry-point group is registered).
-
Kirill Smelkov authored
py2-only syntax introduced in acf7e91d (setup/runcmd: Properly report errors, if running command is missing): File "setup.py", line 168 except Exception, e: ^ SyntaxError: invalid syntax
-
- 01 Jun, 2015 2 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
We currently use subprocess.check_output() for running external command (git), and check_output() checks running command status code, as its name promises: https://github.com/python/cpython/blob/2.7/Lib/subprocess.py#L569 and reports it appropriately to user: https://github.com/python/cpython/blob/2.7/Lib/subprocess.py#L411 but if the command is not found, it is just single error: [Errno 2] No such file or directory which gets output to the log and it is not clear what command failed, or evern if it is from runcmd() call. Redo our runcmd() manually, so that it always report erros with context - what command it was trying to run. The error now becomes: RuntimeError: (['missing-command'],): [Errno 2] No such file or directory /cc @Tyagov
-
- 28 May, 2015 1 commit
-
-
Kirill Smelkov authored
If setuptools.file_finders group is not registered, dist.get_entry_map('setuptools.file_finders') returns just {} not connected to entry map, and further modifications of this dict go nowhere (and thus, our git_lsfiles() is not hooked -> sdist fails to produce correct source archive). This is a workaround for setuptools 9.0 dropping `setuptools.file_finders` entrypoint group registration: https://bitbucket.org/pypa/setuptools/commits/f191c8a1225bd58a5fb5aa9abb31b06dc710f0b9#Lsetup.pyF175 https://bitbucket.org/pypa/setuptools/issue/313 issue reported back: https://bitbucket.org/pypa/setuptools/issue/313#comment-18430008
-
- 25 May, 2015 2 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
-
- 14 May, 2015 1 commit
-
-
Kirill Smelkov authored
In 5755a6b3 (Basic setup.py / Makefile to build/install/sdist stuff + bigfile.so skeleton) we overlooked one thing: when tailing from setup.py to make level, we forgot to setup the PYTHON env variable properly, and that leads to changing building with std python. Look e.g. $ python3 setup.py build_ext -i running build_ext python setup.py ll_build_ext --inplace ^^^ which is obviously not correct. Fix it. The tox setup we have setup for testing with multiple interpreters (7af2b2d7 "Tox setup to test things with py27 & py34 and several versions of ZODB") did not caught this, because for every python and environment versions tox initializes separate virtualenv, in which .../bin/python is a link to chosen python, and this way both python and my-selected-for-build-python are the same. Cc: @Tyagov
-
- 15 Apr, 2015 1 commit
-
-
Kirill Smelkov authored
In C99 declaration after statement is ok, and we explicitly compile with -std=gnu99. Python >= 3.4 however adds -Werror=declaration-after-statement even for extension modules irregardless of their compilation flags: https://bugs.python.org/issue21121 and the build fails this way: building 'wendelin.bigfile._bigfile' extension creating build/temp.linux-x86_64-3.4 creating build/temp.linux-x86_64-3.4/bigfile creating build/temp.linux-x86_64-3.4/lib gcc -pthread -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -D_GNU_SOURCE -I./include -I./3rdparty/ccan -I./3rdparty/include -I/usr/include/python3.4m -c bigfile/_bigfile.c -o build/temp.linux-x86_64-3.4/bigfile/_bigfile.o -std=gnu99 -fplan9-extensions -fvisibility=hidden bigfile/_bigfile.c: In function ‘pyfile_new’: bigfile/_bigfile.c:679:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] static char *kw_list[] = {"blksize", NULL}; ^ cc1: some warnings being treated as errors error: command 'gcc' failed with exit status 1 Ensure we turn off this warning and error because we already rely on compiling in C99 mode. Reported-and-tested-by:
Ivan Tyagov <ivan@tyagov.com>
-
- 03 Apr, 2015 16 commits
-
-
Kirill Smelkov authored
-
Kirill Smelkov authored
This shows how to first generate such arrays (in steps, as every transaction change should fit in memory), and then gather data from whole array using C/Fortran/etc code. It shows how to compute mean via NumPy's ndarray.mean() It also shows that e.g. ndarray.var() wants to create temporaries in size of original ndarray and that would fail, because it does not fit into RAM. ndarray.var() should not need to create such temporaries in principle - all it has to do is to first compute mean, and then compute sum (Xi - <X>)^2 in a loop. <X> is scalar, Xi - is just access to original array. ~~~~ So this also show NumPy can be incrementally improved to avoid creating such temporaries, and then it will work.
-
Kirill Smelkov authored
For this, a small wrapper over py.test is developed (to discover/collect functions to benchmar, etc) and then it runs such functions several times in a boxed enveronment. Benchmarks should be named bench_*.py
-
Kirill Smelkov authored
I.e. something like numpy.memmap for numpy.ndarray and OS files. The whole bigarray cannot be used as a drop-in replacement for numpy arrays, but BigArray _slices_ are real ndarrays and can be used everywhere ndarray can be used, including in C/Fortran code. Slice size is limited by mapping-size (= address-space size) limit, i.e. to ~ max 127TB on Linux/amd64. Changes to bigarray memory are changes to bigfile memory mapping and as such can be discarded or saved back to bigfile using mapping (= BigFileH) dirty discard/writeout interface. For the same reason the whole amount of changes to memory is limited by amount of physical RAM.
-
Kirill Smelkov authored
This adds transactionality and with e.g. NEO[1] allows to distribute objects to nodes into cluster. We hook into ZODB two-phase commit process as a separate data manager, and synchronize changes to memory, to changes to object only at that time. Alternative would be to get notified on every page change, and mark appropriate object as dirty right at that moment. But I wanted to stay close to filesystem design (we don't get notification for every file change from kernel) - that's why it is done the first way. [1] http://www.neoppod.org/
-
Kirill Smelkov authored
Exposes BigFile - this way users can define BigFile backend in Python. Also exposed are BigFile handles, and VMA objects which are results of mmaping.
-
Kirill Smelkov authored
We'll use py.test for unit-testing of Python part.
-
Kirill Smelkov authored
This thing allows to get aliasable RAM from OS kernel and to manage it. Currently we get memory from a tmpfs mount, and hugetlbfs should also work, but is TODO because hugetlbfs in the kernel needs to be improved. We need aliasing because we'll need to be able to memory map the same page into several places in address space, e.g. for taking two slices overlapping slice of the same array at different times. Comes with test programs that show we aliasing does not work for anonymous memory.
-
Kirill Smelkov authored
This will be the core of virtual memory subsystem. For now we just define a structure to describe pages of memory and add utility to allocate address space from OS.
-
Kirill Smelkov authored
We hook into SIGSEGV and handle read/write pagefaults this way. In this patch there goes stub code that only detects faults and determines (in arch specific way) whether fault was for read or write and there is a TODO to pass that information to higher level. It also comes with tests to detect we still crash if we access something incorrectly, so people could have coredumps and investigate them.
-
Kirill Smelkov authored
For BigFiles we'll needs to maintain `{} offset-in-file -> void *` mapping. A hash or a binary tree could be used there, but since we know files are most of the time accessed sequentially and locally in pages-batches, we can also organize the mapping in batches of keys. Specifically offset bits are so divided into parts, that every part addresses 1 entry in a table of hardware-page in size. To get to the actual value, the system lookups first table by first part of offset, then from first table and next part from address - second table, etc. To clients this looks like a dictionary with get/set/del & clear methods, but lookups are O(1) time always, and in contrast to hashes values are stored with locality (= adjacent lookups almost always access the same tables).
-
Kirill Smelkov authored
We'll be testing C code in a similiar-to-python way - keep test_*.c files nearby and compile/executing them as needed. Tests are run several times in several ways - as plainly compiled and also with additional error checkers: - AddressSanitizer - ThreadSanitizer - and similiar checkers from Valgrind
-
Kirill Smelkov authored
Like C bzero / memset & memcopy - but work on python buffers. We leverage NumPy for doing actual work, and this way NumPy becomes a depenency. Having NumPy as a dependency is ok - we'll for sure need it later as we are trying to build out-of-core ndarrays.
-
Kirill Smelkov authored
Like taking an exact integer log2, upcasting pointers for C-style inheritance done in a Plan9 way, and wrappers to functions which should never fail.
-
Kirill Smelkov authored
Modelled by ones used in Linux kernel.
-
Kirill Smelkov authored
It is an early project decision to use gnu99 & Plan9 C extensions, to simplify C code. So far we only build stub wendelin/bigfile/_bigfile.so . Makefile is introduced because there will be targets which are easier to handle at make level. For end users no make knowledge is required - usual `python setup.py build|install|...` work, redirecting to make where necessary. As was promised (e870781d "Top-level in-tree import redirector") setup.py contains install-time hooks to handle in-tree wendelin.py and install it as a module namespace. For sdist, we just use `git ls-files` info if we are in a checkout.
-