Ignore:
Timestamp:
Jun 10, 2022, 5:02:03 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
8419b76
Parents:
bf7c7ea
Message:

Re-instated the isolate/multi-cluster option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/options.cfa

    rbf7c7ea r329e26a  
    4242
    4343        { // cluster
     44                1,     // nclusters;
    4445                1,     // nprocs;
    4546                1,     // nworkers;
     
    5354void parse_options( int argc, char * argv[] ) {
    5455        unsigned nentries = 0;
     56        bool isolate = false;
     57
     58
    5559        static cfa_option opt[] = {
    5660                { 'p', "port",           "Port the server will listen on", options.socket.port},
    5761                { 'c', "cpus",           "Number of processors to use", options.clopts.nprocs},
    5862                { 't', "threads",        "Number of worker threads to use", options.clopts.nworkers},
     63                {'\0', "isolate",        "Create one cluster per processor", isolate, parse_settrue},
    5964                {'\0', "log",            "Enable logs", options.log, parse_settrue},
    6065                {'\0', "sout",           "Redirect standard out to file", options.reopen_stdout},
     
    9196                nentries = v;
    9297        }
     98        if(isolate) {
     99                options.clopts.nclusters = options.clopts.nprocs;
     100                options.clopts.nprocs = 1;
     101        }
    93102        options.clopts.params.num_entries = nentries;
    94         options.clopts.instance = 0p;
    95         options.clopts.thrd_cnt = 0;
     103        options.clopts.instance = alloc(options.clopts.nclusters);
     104        options.clopts.thrd_cnt = alloc(options.clopts.nclusters);
     105        options.clopts.cltr_cnt = 0;
     106        for(i; options.clopts.nclusters) {
     107                options.clopts.thrd_cnt[i] = 0;
     108        }
    96109
    97110
Note: See TracChangeset for help on using the changeset viewer.