diff --git a/.vscode/launch.json b/.vscode/launch.json index 34f8f4b..9451ef3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,7 +13,8 @@ "args": [ "mem", "-t", - "1", + "128", + "-K", "800000000", "-M", "-R", "'@RG\\tID:normal\\tSM:normal\\tPL:illumina\\tLB:normal\\tPG:bwa'", diff --git a/Makefile b/Makefile index e2a86ae..884a90b 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ OPTIMIZE=-O3 CFLAGS= -g -Wall -Wno-unused-function $(AVX2) $(AVX512BW) $(OPTIMIZE) WRAP_MALLOC=-DUSE_MALLOC_WRAPPERS -#SAM_EXACT= -DSAM_EXACT +SAM_EXACT= -DSAM_EXACT SHOW_PERF= -DSHOW_PERF SHOW_DATA_PERF= -DSHOW_DATA_PERF DEBUG_FILE_OUTPUT= -DDEBUG_FILE_OUTPUT diff --git a/bwa.c b/bwa.c index 23e3a72..08e5308 100644 --- a/bwa.c +++ b/bwa.c @@ -159,7 +159,8 @@ void bseq_read_pe_mt(int chunk_size, int* n_, void* ks1_, void* ks2_, int copy_c *m_ = n; return; } - m = (chunk_size + size / init_n_reads - 1) / (size / init_n_reads); + float bases_per_read = size * 1.0 / init_n_reads; + m = (chunk_size + bases_per_read * 100) / (bases_per_read); // 多开辟100个reads的冗余空间 #else m = 50000; #endif