[]\n\n" , argv[0]);
}
int main(int argc, char *argv[]){
unsigned int N, i, j;;
FILE *fileout;
double p, val;
char error_str [256];
if(argc < 3){
usage(argv);
exit(1);
}
N = atoi(argv[1]);
p = atof(argv[2]);
if (argc >3){
fileout = fopen(argv[3], "w+");
if (!fileout){
sprintf(error_str, "Error opening file %s", argv[3]);
perror(error_str);
exit(2);
}
}
else{
fileout = stdout;
}
srand(time(NULL));
/* Loop over all nodes...*/
for(i=0; i