Skip to content
Snippets Groups Projects
Commit 3ffe6ec2 authored by Nicolas Joly's avatar Nicolas Joly
Browse files

Return 0 from getNodePhysMemory() if machine memory size is unknown.

parent 674e6528
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ unsigned long getNodePhysMemory() {
return mem/1024/1024/1024;
#else
cout<<"ROCK has not been tested on this operating system, please contact author."<<endl;
return unknown_os;
return 0;
#endif
}
......
......@@ -29,7 +29,6 @@
#define unknown_os 1
#define defaultGRPMAXSize 1 //(in gigabytes) Default maximum size of srp structure but of course this size depends of the number of reads we are processing.
// 1 GB is enough to store approx 82 millions of reads (must take into account memory needed for stl containers).
// This constant is used only if you use rock's default behavior (use 90% of the machine's RAM).
......@@ -145,7 +144,7 @@ int main(int argc,char * argv[]) {
parms.lambda=0;
parms.filter_size=getNodePhysMemory()/100*90-defaultGRPMAXSize; // Prefer not to use all the machine's memory
if (parms.filter_size==unknown_os) return EXIT_FAILURE;
if (parms.filter_size==0) return EXIT_FAILURE;
while((i = getopt(argc, argv, "i:o:l:k:c:C:g:n:")) != -1) {
switch(i) {
case 'i':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment