odenas / indexed_ms Goto Github PK
View Code? Open in Web Editor NEWFast matching statistics in small space
License: GNU General Public License v3.0
Fast matching statistics in small space
License: GNU General Public License v3.0
One easy optimization that we could is to not test for repmaximality when we do parent operation from already repmaximal node, since the new node is certainly repmaximal.
indexed_ms/fast_ms/src/range_queries.cpp
Line 127 in 8c9af47
As of March 31, fd_ms runs much slower due to the removal of operations on the bwt (like the backward step). This was motivated by the equivalence of (v.i, v.j)
with the interval of the word of locus v
.
Revert the code to use the intervals and bsteps.
Is there a way to make the lazy_wl completely transparent, in the sense that you don't need to call the followup explicitly.
Why is the lazy mode not supported, while it is advertised as a parameter?
Running matching_stats_parallel.x -lazy_wl 1
results in the error message
ERROR from buiold_runs: lazy mode not supported
indexed_ms/fast_ms/src/range_queries.cpp
Line 120 in b862939
Try with mut_xxx
strings where the mutation period is potentially larger than the block
I also think we could report the time taken by normal parent operation vs. lazy parent when it comes after a Weiner link (the latter should be slower)
fixed size chunks defined over the bit-vector
https://github.com/bingmann/malloc_count
used in papers which use parallelism:
https://users.dcc.uchile.cl/~jfuentess/thesis/files/sea2015.pdf
https://arxiv.org/pdf/1702.07578.pdf
Split the text into d
equal-length pieces, do the matching statistics on each piece independently. Then, we can compute the missing matching statistics which are the ones that cross the boundaries between pieces.
Restructure the snakefile so that it runs max operations,
Benchmark max operations
rle_partial_max_vector constructor signature rle_partial_max_vector(const string&)
and rle_partial_max_vector(const string&, counter_t&)
rle_partial_max_vector.noindex(int from, int to, algo)
which calls either trivial
or djamal
Current rank tests are very superficial and not unified.
Create two types of tests:
The double_rank
comes in a vanilla flavor and an extra trick which fails early on the WT search for the symbol.
Perform sandbox tests on nodes that
Perform the full test on all inputs available (you can run this in parallel).
csa.double_rank()
was not calling wt.double_rank
, I made the change, but the code is failing. inspect!
add tests with large blocks
"-ms_path", "../experiments/range_tests/vanilla_compression_techniques/mm.t.ms",
"-compression", "none", "-op", "max", "-algo", "t",
"-block_size", "4",
"-ridx_path", "../experiments/range_tests/vanilla_compression_techniques/max/HG03061-2.t.ms.none.4.ridx",
"-from_idx", "265581", "-to_idx", "265583",
for a n-threaded run, n ms
vectors are allocated. See if you can reduce this space requirement
What kind of restriction do you have for the input text and the pattern? For arbitrary files, I get the following error:
bin/matching_stats_parallel.x -s_path makefile -t_path readme.md [master] ?? [ 134 ]
building RUNS ...
* loadding index string from makefile
* building the CST of length 10 DONE (0 seconds, 11 leaves)
** filling 1 slices with : 1 threads ...
*** [0 .. 1149)
matching_stats_parallel.x: src/fd_ms/p_runs_vector.hpp:354: fdms::p_runs_vector<cst_t>::p_runs_state fdms::p_runs_vector<cst_t>::fill_slice(fdms::InputSpec, const cst_t&, fdms::p_runs_vector<cst_t>::size_type) [with cst_t = fdms::StreeOhleb<>; fdms::p_runs_vector<cst_t>::size_type = long unsigned int]: Assertion `!st.is_root(u)' failed.
python script_tests.py --v --vv --slow_prg slow_ms.py --nthreads 5 datasets/testing rnd_20_10
INFO:root:testing on input msinput_pair(s_path='datasets/testing/rnd_20_10.s', t_path='datasets/testing/rnd_20_10.t')
DEBUG:utils:running: /Users/denas/Library/Developer/Xcode/DerivedData/fast_ms-dtwaybjykudaehehgvtglnvhcjbp/Build/Products/Debug/fd_ms -lca_parents 0 -nthreads 5 -rank_fail 0 -s_path datasets/testing/rnd_20_10.s -t_path datasets/testing/rnd_20_10.t -use_maxrep 0 -answer 1 -lazy_wl 0
loading input . . |s| = 113, |t| = 20. DONE (0 seconds)
building RUNS ...
* building the CST of length 113 DONE (0 seconds, 114 nodes)
* computing with a, double_rank_no_fail / consecutive_parents strategy, over 5 threads ...
** launching runs computation over : [0 .. 4)
** launching runs computation over : [4 .. 8)
** launching runs computation over : [8 .. 12)
** launching runs computation over : [12 .. 16)
** launching runs computation over : [16 .. 20)
** merging over 4 threads ...
*** launching runs merge of slices 4 and 3 ...
*** launching runs merge of slices 3 and 2 ...
*** launching runs merge of slices 2 and 1 ...
*** launching runs merge of slices 1 and 0 ...
DONE (0 seconds)
* reversing string s of length 113 DONE (0 seconds)
building MS ...
* building the CST of length 113 DONE (0 seconds, 114 nodes)
* computing with a non-lazy, double_rank_no_fail strategy, over 5 threads ...
** launching ms computation over : [0 .. 4)
** launching ms computation over : [4 .. 8)
** launching ms computation over : [8 .. 12)
** launching ms computation over : [12 .. 16)
** launching ms computation over : [16 .. 20)
* total ms length : 77 (with |t| = 20)
DONE (0 seconds)
DEBUG:utils:got: 19 18 17 16 15 14 13 12 11 10 9 8 8 7 6 5 4 3 2 1
DEBUG:utils:running: python slow_ms.py datasets/testing/rnd_20_10.s datasets/testing/rnd_20_10.t
DEBUG:utils:got: 19 18 17 16 15 14 13 12 11 11 10 9 8 7 6 5 4 3 2 1
+ 11
- 8
Having users setup a virtual env for the software is onerous. Remove
scan as you do in the trivial method
same for other scans in this method
Fixes
It takes too long to compute the maxrep vector.
-load_cst
flag)why not just if ((ms_idx + 1) % block_size == 0)
?
avoid division and write as a for
loop
ridx is not needed and should be de-allocated after rmq construction
int_from should be a const
The code can now leverage a maxrep
bitvector indicating the nodes that correspond to maximal repeats.
This information can be used to speedup the WL operations.
Experiment in sandbox to test the effect of the fail mechanism, double rank and the maxrep vector.
Update range_query_profile.cpp
The current optimization is trivial, can we do it at the rank data structure level?
implement a correct method (e.g, using python/numpy) and integrate into own folder with smake
rename the existing test folder for sum
this key is not consistent
matchin_stats_parallel.cpp should be used instead (with nthreads=1)
construct_im()
will write input to a file and call construct()
to build the data structure. However, you have already loaded the input (you just passed it to construct_im
), which means it is being loaded twice.
indexed_ms/fast_ms/src/range_queries.cpp
Line 38 in 8c9af47
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.