Bug#969608: [Debian-med-packaging] Bug#969608: makeblastdb 2.10.x on 32-bit architectures

2020-09-15 Thread Aaron M. Ucko
Étienne Mollier  writes:

> Wow, thanks for the comprehensive background information.  In

No problem.

> case someone else (me in a not so near future for instance)
> stumbles upon this again, I keep note that reducing the size of
> BLASTDB_LMDB_MAP_SIZE a bit might help:

One final clarification: This variable is an override, not a cap, so any
unconditional settings thereof should be low enough to work on 32-bit
systems.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#969608: [Debian-med-packaging] Bug#969608: makeblastdb 2.10.x on 32-bit architectures

2020-09-15 Thread Étienne Mollier
Hi Aaron,

Aaron M. Ucko, on 2020-09-14 17:36:14 -0400:
> 
> Thanks for clarifying.  AFAICT, this environment imposes a tighter limit
> than native arm64 hardware, and versions 2.10.0-1 and 2.10.0-3 both hit
> it.  Rough bisection via the BLASTDB_LMDB_MAP_SIZE environment variable
> gives an empirical limit of 20,073,607,168 bytes (4,900,783 4K pages).
> This number isn't particularly round, so it presumably reflects what
> remains of some cumulative limit.  As such, the default should probably
> be at most 20,000,000,000 bytes (4,882,812½ pages ;-) to build in more
> of a margin.  That's 1/15 upstream's default, but with any luck should
> be plenty in practice, so I'm open to making that adjustment.  Also,
> this reduced limit would still be well more than we (can) allow on
> 32-bit architectures, which is in turn much more than upstream's trunk
> allows on Windows:
> 
> https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/include/objtools/blast/seqdb_writer/writedb_lmdb.hpp#L51

Wow, thanks for the comprehensive background information.  In
case someone else (me in a not so near future for instance)
stumbles upon this again, I keep note that reducing the size of
BLASTDB_LMDB_MAP_SIZE a bit might help:

(sid-arm64-sbuild)$ makeblastdb -in NC_005816.faa -dbtype prot 
-hash_index -max_file_sz 20MB -parse_seqids -taxid 10


Building a new DB, current time: 09/15/2020 19:37:37
New DB name:   /tmp/NC_005816.faa
New DB title:  NC_005816.faa
Sequence type: Protein
Deleted existing Protein BLAST database named /tmp/NC_005816.faa
Keep MBits: T
Maximum file size: 2000B

No volumes were created.

Error: mdb_env_open: Cannot allocate memory

(sid-arm64-sbuild)$ BLASTDB_LMDB_MAP_SIZE=100 makeblastdb -in 
NC_005816.faa -dbtype prot -hash_index -max_file_sz 20MB -parse_seqids -taxid 10


Building a new DB, current time: 09/15/2020 19:37:34
New DB name:   /tmp/NC_005816.faa
New DB title:  NC_005816.faa
Sequence type: Protein
Deleted existing Protein BLAST database named /tmp/NC_005816.faa
Keep MBits: T
Maximum file size: 2000B
Adding sequences from FASTA; added 10 sequences in 0.166301 seconds.

Kind Regards,
-- 
Étienne Mollier 
Old rsa/3072: 5ab1 4edf 63bb ccff 8b54  2fa9 59da 56fe fff3 882d
New rsa/4096: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/2, please excuse my verbosity.


signature.asc
Description: PGP signature