Commit cd73a325 authored by Rayan Chikhi's avatar Rayan Chikhi
Browse files

reverted some unwanted changes in simplifications (not fully finished)

also, added memory limit for unit tests
parent df5023d0
......@@ -25,7 +25,7 @@
// We include required definitions
/********************************************************************************/
#define DEBUG(a) a
#define DEBUG(a) //a
// this is to control whether we instrument code for timing or not (shouldn't affect performance, in principle)
#define TIME(a) a
......@@ -120,7 +120,7 @@ void Simplifications<Node,Edge,GraphDataVariant>::simplify()
do
{
nbECRemovedPreviously = nbECRemoved;
//nbECRemoved = removeErroneousConnections(); // now we're using bulges removal, not bubbles (to follow SPAdes)
nbECRemoved = removeErroneousConnections(); // now we're using bulges removal, not bubbles (to follow SPAdes)
if (ECRemoval.size() != 0)
ECRemoval += " + ";
ECRemoval += to_string(nbECRemoved);
......@@ -128,7 +128,7 @@ void Simplifications<Node,Edge,GraphDataVariant>::simplify()
while (((nbECRemovedPreviously == 0 && nbECRemoved > 0 ) || nbECRemoved >= 10)
&& _nbECRemovalPasses < 20);
return; // FIXME!!!!!!!
return; // FIXME!!!!!!! this is just a temporary modification
nbECRemoved = 0; // reset EC removal counter
do
......
......@@ -224,6 +224,7 @@ public:
/** We configure parameters for a SortingCountAlgorithm object. */
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties();
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......
......@@ -114,12 +114,18 @@ public:
void setUp () {}
void tearDown () {}
// SMALL VALUE NEEDED because continuous integration servers are not very powerful...
static const u_int64_t MAX_MEMORY = 1000;
/********************************************************************************/
void DSK_check1_aux (const char* sequences[], size_t nbSequences, size_t kmerSize, size_t nks, size_t checkNbSolids)
{
/** We configure parameters for a SortingCountAlgorithm object. */
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties(); LOCAL (params);
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......@@ -250,6 +256,7 @@ public:
/** We configure parameters for a SortingCountAlgorithm object. */
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties();
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......@@ -345,6 +352,7 @@ public:
/** We configure parameters for a SortingCountAlgorithm object. */
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties(); LOCAL (params);
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......@@ -428,7 +436,6 @@ public:
template<size_t span>
void DSK_perBank_aux (IBank* bank, size_t kmerSize, size_t nksMin, size_t nksMax, KmerSolidityKind solidityKind, size_t checkNb)
{
size_t maxMemory = 0;
size_t maxDiskSpace = 0;
size_t nbCores = 1;
......@@ -437,7 +444,7 @@ public:
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_KMER_ABUNDANCE_MIN, nksMin);
params->setInt (STR_KMER_ABUNDANCE_MAX, nksMax);
params->setInt (STR_MAX_MEMORY, maxMemory);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_MAX_DISK, maxDiskSpace);
params->setStr (STR_SOLIDITY_KIND, toString(solidityKind));
params->setStr (STR_URI_OUTPUT, "output");
......@@ -671,6 +678,7 @@ public:
/** We configure parameters for a SortingCountAlgorithm object. */
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties();
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......
......@@ -77,6 +77,8 @@ public:
void setUp () {}
void tearDown () {}
// SMALL VALUE NEEDED because continuous integration servers are not very powerful...
static const u_int64_t MAX_MEMORY = 1000;
/********************************************************************************/
void Debloom_check1 ()
......@@ -94,6 +96,7 @@ public:
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties(); LOCAL (params);
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MINIMIZER_SIZE, miniSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......
......@@ -83,6 +83,10 @@ public:
void setUp () {}
void tearDown () {}
// SMALL VALUE NEEDED because continuous integration servers are not very powerful...
static const u_int64_t MAX_MEMORY = 1000;
/** Shortcuts. */
typedef Kmer<32>::Count Count;
typedef Kmer<32>::Type Type;
......@@ -105,6 +109,7 @@ public:
/** We configure parameters for a SortingCountAlgorithm object. */
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties();
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setStr (STR_URI_OUTPUT, "foo");
......@@ -183,6 +188,7 @@ public:
IProperties* params = SortingCountAlgorithm<>::getDefaultProperties();
params->setInt (STR_KMER_SIZE, kmerSize);
params->setInt (STR_KMER_ABUNDANCE_MIN, nks);
params->setInt (STR_MAX_MEMORY, MAX_MEMORY);
params->setStr (STR_URI_OUTPUT, "foo");
IBank* bank = new BankStrings (seqs, ARRAY_SIZE(seqs));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment