Fix option to choose the number of node
Option is now in the getopt string and accessible with -l switch.
This commit is contained in:
parent
f430cc17a7
commit
70f8f95647
|
@ -48,7 +48,7 @@ function_run () {
|
|||
"") exit 1 ;;
|
||||
0|1 ) exit 1 ;;
|
||||
2 ) optNbNodes="" ;;
|
||||
[0-9]* ) optNbNodes="-t $nbNodes" ;;
|
||||
[0-9]* ) optNbNodes="-l $nbNodes" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
#define MAX_BLOCK_ENTRIES (page_size / sizeof(void *))
|
||||
//#define MAX_BLOCK_ENTRIES ((BUF_SIZE * 4 + page_size) & ~(page_size - 1)) // Big buffer size is not a good idea
|
||||
#define toString(x) doStringification(x)
|
||||
#define doStringification(x) #x
|
||||
#define WORDS_PER_LINE (CACHE_LINE_SIZE / sizeof(uintptr_t))
|
||||
|
@ -65,14 +66,14 @@ void usage(char *argv[])
|
|||
"\t\t\t\tThis library must implement functions in calc.h\n"
|
||||
"\t\t\t\t(default to none)\n"
|
||||
"-k\t\t\t\tCheck we receive what is sent\n"
|
||||
"-l nb_nodes\t\t\tNumber of nodes in the pipeline chain\n"
|
||||
"-d\t\t\t\tReceive one piece of data\n"
|
||||
"-h\t\t\t\tPrint this help\n"
|
||||
"-s <level>\t\t\tShare the same L<level> cache or not\n"
|
||||
"\t\t\t\tIf level is:\n"
|
||||
"\t\t\t\t\t> 0, then the same L<level> must be shared\n"
|
||||
"\t\t\t\t\t< 0, then different L<level> must be used\n"
|
||||
"\t\t\t\t\t= 0, then no constraint is given, only main memory (RAM) is guaranteed to be shared\n"
|
||||
"-t\t\t\tnb_nodes\t\tNumber of nodes in the pipeline chain\n";
|
||||
"\t\t\t\t\t= 0, then no constraint is given, only main memory (RAM) is guaranteed to be shared\n";
|
||||
printf("Usage : %s %s\n", argv[0], format);
|
||||
printf("Options :\n");
|
||||
printf("%s\n", options);
|
||||
|
@ -145,7 +146,7 @@ int analyse_options(int argc, char *argv[])
|
|||
int opt;
|
||||
|
||||
opterr = 0;
|
||||
while ((opt = getopt(argc, argv, ":bc:dhkn:s::"/*p:"*/)) != -1)
|
||||
while ((opt = getopt(argc, argv, ":bc:dhl:kn:s::"/*p:"*/)) != -1)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue