/-
Created
February 19, 2015 10:20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ENwbu ./bkb_merger.h KMC/kmer_counter/bkb_merger.h | |
--- ./bkb_merger.h 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/bkb_merger.h 2015-02-19 11:14:42.806689539 +0100 | |
@@ -133,8 +133,7 @@ | |
template<typename KMER_T, unsigned SIZE> | |
void CBigKmerBinMerger<KMER_T, SIZE>::Process() | |
{ | |
- // BLESS | |
- int32 bin_id(0); | |
+ int32 bin_id; | |
uint32 size = 0; | |
uint32 counter_size = min(BYTE_LOG(cutoff_max), BYTE_LOG(counter_max)); | |
uint32 lut_recs = 1 << 2 * lut_prefix_len; | |
diff -ENwbu ./defs.h KMC/kmer_counter/defs.h | |
--- ./defs.h 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/defs.h 2015-02-19 11:14:42.806689539 +0100 | |
@@ -83,10 +83,6 @@ | |
#define MIN_SR 1 | |
#define MAX_SR 16 | |
-// BLESS | |
-#define MIN_NODES 1 | |
-#define MIN_RANK 0 | |
- | |
typedef float count_t; | |
diff -ENwbu ./kb_reader.h KMC/kmer_counter/kb_reader.h | |
--- ./kb_reader.h 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/kb_reader.h 2015-02-19 11:14:42.806689539 +0100 | |
@@ -44,10 +44,6 @@ | |
int32 lut_prefix_len; | |
uint32 max_x; | |
- // BLESS | |
- int num_nodes; | |
- int rank; | |
- | |
bool both_strands; | |
bool use_quake; | |
@@ -86,10 +82,6 @@ | |
max_x = Params.max_x; | |
s_mapper = Queues.s_mapper; | |
lut_prefix_len = Params.lut_prefix_len; | |
- | |
- // BLESS | |
- num_nodes = Params.num_nodes; | |
- rank = Params.rank; | |
} | |
//---------------------------------------------------------------------------------- | |
@@ -117,8 +109,6 @@ | |
bd->init_random(); | |
while((bin_id = bd->get_next_random_bin()) >= 0) // Get id of the next bin to read | |
{ | |
- // BLESS | |
- if ((bin_id % num_nodes) == rank) { | |
bd->read(bin_id, file, name, size, n_rec, n_plus_x_recs, buffer_size, kmer_len); | |
fflush(stdout); | |
@@ -198,11 +188,9 @@ | |
//Remove temporary file | |
#ifndef DEVELOP_MODE | |
-// DEBUG | |
-// file->Remove(); | |
+ file->Remove(); | |
#endif | |
disk_logger->log_remove(size); | |
- } // BLESS | |
} | |
diff -ENwbu ./kb_storer.cpp KMC/kmer_counter/kb_storer.cpp | |
--- ./kb_storer.cpp 2015-01-29 22:37:49.000000000 +0100 | |
+++ KMC/kmer_counter/kb_storer.cpp 2015-02-19 11:14:42.806689539 +0100 | |
@@ -32,10 +32,6 @@ | |
bd = Queues.bd; | |
working_directory = Params.working_directory; | |
- // BLESS | |
- num_nodes = Params.num_nodes; | |
- rank = Params.rank; | |
- | |
mem_mode = Params.mem_mode; | |
s_mapper = Queues.s_mapper; | |
@@ -194,15 +190,12 @@ | |
for(int i = 0; i < n_bins; ++i) | |
{ | |
- // BLESS | |
- if ((i % num_nodes) == rank) { | |
f_name = GetName(i); | |
buf_sizes[i] = 0; | |
files[i]->Open(f_name); | |
bd->insert(i, files[i], f_name, 0, 0, 0, 0); | |
- } // BLESS | |
} | |
return true; | |
diff -ENwbu ./kb_storer.h KMC/kmer_counter/kb_storer.h | |
--- ./kb_storer.h 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/kb_storer.h 2015-02-19 11:14:42.806689539 +0100 | |
@@ -40,10 +40,6 @@ | |
uint64 max_mem_buffer; | |
uint64 max_mem_single_package; | |
- // BLESS | |
- int num_nodes; | |
- int rank; | |
- | |
CSignatureMapper *s_mapper; | |
CDiskLogger *disk_logger; | |
uchar* tmp_buff; | |
Common subdirectories: ./KMC and KMC/kmer_counter/KMC | |
diff -ENwbu ./kmer_counter.cpp KMC/kmer_counter/kmer_counter.cpp | |
--- ./kmer_counter.cpp 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/kmer_counter.cpp 2015-02-19 11:14:42.806689539 +0100 | |
@@ -153,11 +153,6 @@ | |
cout << " -sp<value> - number of splitting threads\n"; | |
cout << " -sr<value> - number of sorter threads\n"; | |
cout << " -so<value> - number of threads per single sorter\n"; | |
- | |
- // BLESS | |
- cout << " -d<value> - number of nodes\n"; | |
- cout << " -a<value> - rank of a current node\n"; | |
- | |
cout << "Example:\n"; | |
cout << "kmc -k27 -m24 NA19238.fastq NA.res \\data\\kmc_tmp_dir\\\n"; | |
cout << "kmc -k27 -q -m24 @files.lst NA.res \\data\\kmc_tmp_dir\\\n"; | |
@@ -173,10 +168,6 @@ | |
if(argc < 4) | |
return false; | |
- // BLESS | |
- Params.num_nodes = -1; | |
- Params.rank = -1; | |
- | |
for(i = 1 ; i < argc; ++i) | |
{ | |
if(argv[i][0] != '-') | |
@@ -253,31 +244,6 @@ | |
Params.p_mem_mode = true; | |
else if(strncmp(argv[i], "-b", 2) == 0) | |
Params.p_both_strands = false; | |
- // BLESS | |
- // number of nodes | |
- else if(strncmp(argv[i], "-d", 2) == 0) | |
- { | |
- tmp = atoi(&argv[i][2]); | |
- if(tmp < MIN_NODES) | |
- { | |
- cout << "Wrong parameter: the number of nodes " << tmp << " should be >= " << MIN_NODES << "\n"; | |
- return false; | |
- } | |
- else | |
- Params.num_nodes = tmp; | |
- } | |
- // rank | |
- else if(strncmp(argv[i], "-a", 2) == 0) | |
- { | |
- tmp = atoi(&argv[i][2]); | |
- if(tmp < MIN_RANK) | |
- { | |
- cout << "Wrong parameter: the rank of nodes should be >= " << MIN_RANK << "\n"; | |
- return false; | |
- } | |
- else | |
- Params.rank = tmp; | |
- } | |
// Number of reading threads | |
else if(strncmp(argv[i], "-sf", 3) == 0) | |
{ | |
@@ -373,20 +339,6 @@ | |
} | |
} | |
- // BLESS | |
- if (Params.num_nodes == -1) { | |
- cout << "No parameter: the option -n is mandatory" << "\n"; | |
- return false; | |
- } | |
- else if (Params.rank == -1) { | |
- cout << "No parameter: the option -rank is mandatory" << "\n"; | |
- return false; | |
- } | |
- else if (Params.rank >= Params.num_nodes) { | |
- cout << "Wrong parameter: the rank " << Params.rank << " should be smaller than the number of nodes " << Params.num_nodes << "\n"; | |
- return false; | |
- } | |
- | |
if(argc - i < 3) | |
return false; | |
Common subdirectories: ./libs and KMC/kmer_counter/libs | |
diff -ENwbu ./params.h KMC/kmer_counter/params.h | |
--- ./params.h 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/params.h 2015-02-19 11:14:42.814689539 +0100 | |
@@ -105,10 +105,6 @@ | |
vector<int> n_omp_threads;// number of OMP threads per sorters | |
uint32 max_x; //k+x-mers will be counted | |
- // BLESS | |
- int num_nodes; | |
- int rank; | |
- | |
uint32 gzip_buffer_size; | |
uint32 bzip2_buffer_size; | |
diff -ENwbu ./splitter.h KMC/kmer_counter/splitter.h | |
--- ./splitter.h 2015-01-29 22:37:50.000000000 +0100 | |
+++ KMC/kmer_counter/splitter.h 2015-02-19 11:14:42.814689539 +0100 | |
@@ -77,8 +77,7 @@ | |
void InitBins(CKMCParams &Params, CKMCQueues &Queues); | |
~CSplitter(); | |
- // BLESS | |
- bool ProcessReads(uchar *_part, uint64 _part_size, int num_nodes, int rank); | |
+ bool ProcessReads(uchar *_part, uint64 _part_size); | |
void Complete(); | |
void GetTotal(uint64 &_n_reads); | |
@@ -97,14 +96,12 @@ | |
template <> class CSplitter_Impl<false> { | |
public: | |
- // BLESS | |
- static bool ProcessReads(CSplitter<false> &ptr, uchar *_part, uint64 _part_size, int num_nodes, int rank); | |
+ static bool ProcessReads(CSplitter<false> &ptr, uchar *_part, uint64 _part_size); | |
}; | |
template <> class CSplitter_Impl<true> { | |
public: | |
- // BLESS | |
- static bool ProcessReads(CSplitter<true> &ptr, uchar *_part, uint64 _part_size, int num_nodes, int rank); | |
+ static bool ProcessReads(CSplitter<true> &ptr, uchar *_part, uint64 _part_size); | |
}; | |
//---------------------------------------------------------------------------------- | |
@@ -524,11 +521,9 @@ | |
//---------------------------------------------------------------------------------- | |
// Process the reads from the given FASTQ file part | |
-// BLESS | |
-template <bool QUAKE_MODE> bool CSplitter<QUAKE_MODE>::ProcessReads(uchar *_part, uint64 _part_size, int num_nodes, int rank) | |
+template <bool QUAKE_MODE> bool CSplitter<QUAKE_MODE>::ProcessReads(uchar *_part, uint64 _part_size) | |
{ | |
- // BLESS | |
- return CSplitter_Impl<QUAKE_MODE>::ProcessReads(*this, _part, _part_size, num_nodes, rank); | |
+ return CSplitter_Impl<QUAKE_MODE>::ProcessReads(*this, _part, _part_size); | |
} | |
//---------------------------------------------------------------------------------- | |
@@ -545,8 +540,7 @@ | |
//---------------------------------------------------------------------------------- | |
// Process the reads from the given FASTQ file part | |
-// BLESS | |
-bool CSplitter_Impl<false>::ProcessReads(CSplitter<false> &ptr, uchar *_part, uint64 _part_size, int num_nodes, int rank) | |
+bool CSplitter_Impl<false>::ProcessReads(CSplitter<false> &ptr, uchar *_part, uint64 _part_size) | |
{ | |
ptr.part = _part; | |
ptr.part_size = _part_size; | |
@@ -596,11 +590,8 @@ | |
if (len >= ptr.kmer_len) | |
{ | |
bin_no = ptr.s_mapper->get_bin_id(current_signature.get()); | |
- // BLESS | |
- if ((bin_no % num_nodes) == (unsigned int)rank) { | |
ptr.bins[bin_no]->PutExtendedKmer(seq + i - len, len); | |
} | |
- } | |
len = 0; | |
++i; | |
break; | |
@@ -611,10 +602,7 @@ | |
if (len >= ptr.kmer_len) | |
{ | |
bin_no = ptr.s_mapper->get_bin_id(current_signature.get()); | |
- // BLESS | |
- if ((bin_no % num_nodes) == (unsigned int)rank) { | |
ptr.bins[bin_no]->PutExtendedKmer(seq + i - len, len); | |
- } | |
len = ptr.kmer_len - 1; | |
} | |
current_signature.set(end_mmer); | |
@@ -628,10 +616,7 @@ | |
else if (signature_start_pos + ptr.kmer_len - 1 < i)//need to find new signature | |
{ | |
bin_no = ptr.s_mapper->get_bin_id(current_signature.get()); | |
- // BLESS | |
- if ((bin_no % num_nodes) == (unsigned int)rank) { | |
ptr.bins[bin_no]->PutExtendedKmer(seq + i - len, len); | |
- } | |
len = ptr.kmer_len - 1; | |
//looking for new signature | |
++signature_start_pos; | |
@@ -652,10 +637,7 @@ | |
if (len == ptr.kmer_len + 255) //one byte is used to store counter of additional symbols in extended k-mer | |
{ | |
bin_no = ptr.s_mapper->get_bin_id(current_signature.get()); | |
- // BLESS | |
- if ((bin_no % num_nodes) == (unsigned int)rank) { | |
ptr.bins[bin_no]->PutExtendedKmer(seq + i + 1 - len, len); | |
- } | |
i -= ptr.kmer_len - 2; | |
len = 0; | |
break; | |
@@ -666,12 +648,9 @@ | |
if (len >= ptr.kmer_len)//last one in read | |
{ | |
bin_no = ptr.s_mapper->get_bin_id(current_signature.get()); | |
- // BLESS | |
- if ((bin_no % num_nodes) == (unsigned int)rank) { | |
ptr.bins[bin_no]->PutExtendedKmer(seq + i - len, len); | |
} | |
} | |
- } | |
putchar('*'); | |
fflush(stdout); | |
@@ -684,8 +663,7 @@ | |
//---------------------------------------------------------------------------------- | |
// Process the reads from the given FASTQ file part | |
-// BLESS: the quake mode is true: no modification | |
-bool CSplitter_Impl<true>::ProcessReads(CSplitter<true> &ptr, uchar *_part, uint64 _part_size, int num_nodes, int rank) | |
+bool CSplitter_Impl<true>::ProcessReads(CSplitter<true> &ptr, uchar *_part, uint64 _part_size) | |
{ | |
ptr.part = _part; | |
ptr.part_size = _part_size; | |
@@ -827,10 +805,6 @@ | |
CSplitter<QUAKE_MODE> *spl; | |
uint64 n_reads; | |
- // BLESS | |
- int num_nodes; | |
- int rank; | |
- | |
public: | |
CWSplitter(CKMCParams &Params, CKMCQueues &Queues); | |
~CWSplitter(); | |
@@ -848,10 +822,6 @@ | |
pmm_fastq = Queues.pmm_fastq; | |
spl = new CSplitter<QUAKE_MODE>(Params, Queues); | |
spl->InitBins(Params, Queues); | |
- | |
- // BLESS | |
- num_nodes = Params.num_nodes; | |
- rank = Params.rank; | |
} | |
//---------------------------------------------------------------------------------- | |
@@ -871,8 +841,7 @@ | |
uint64 size; | |
if(pq->pop(part, size)) | |
{ | |
- // BLESS | |
- spl->ProcessReads(part, size, num_nodes, rank); | |
+ spl->ProcessReads(part, size); | |
pmm_fastq->free(part); | |
} | |
} | |
Common subdirectories: ./x64 and KMC/kmer_counter/x64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment