Changeset 1233


Ignore:
Timestamp:
Nov 25, 2008 9:34:52 AM (15 years ago)
Author:
gah
Message:
 
Location:
trunk/packages/vizservers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanoscale/server.c

    r1232 r1233  
    3939fd_set pipe_rfds;           // Descriptors that are pipes to children.
    4040fd_set service_rfds[MAX_SERVICES];
    41 int maxScreens = 1;
    42 int nRequests = -1;
     41int maxCards = 1;
     42int dispNum = -1;
    4343char displayVar[200];
    4444
     
    244244
    245245        switch(c) {
    246         case 'x': /* Number of screens */
     246        case 'x': /* Number of video cards */
    247247            maxScreens = strtoul(optarg, 0, 0);
    248             if ((maxScreens < 1) || (maxScreens > 10)) {
    249                 fprintf(stderr, "bad number of max screens specified\n");
     248            if ((maxCards < 1) || (maxCards > 10)) {
     249                fprintf(stderr, "bad number of max videocards specified\n");
    250250                return 1;
    251251            }
     
    582582                    perror("fcntl");
    583583                }
    584                 nRequests++;
    585              
     584                dispNum++;
     585                if (dispNum >= maxCards) {
     586                    dispNum = 0;
     587                }
    586588                // Fork the new process.  Connect i/o to the new socket.
    587589                status = fork();
     
    608610                                    close(fd);
    609611                             
    610                                 if (maxScreens > 1) {
    611                                     int dispNum;
    612 
    613                                     dispNum = nRequests % maxScreens;
     612                                if (maxCards > 1) {
    614613                                    displayVar[11] = dispNum + '0';
    615614                                }
  • trunk/packages/vizservers/start_viz.sh.in

    r1231 r1233  
    2525export PATH LD_LIBRARY_PATH PYMOL_PATH
    2626
    27 nscreens=`lspci | fgrep VGA | wc -l`
    28 nanoscale="${dir}/bin/nanoscale -S${nscreens} -b $nanoscale_port -s $broadcast"
     27nvideo=`lspci | fgrep VGA | wc -l`
     28nanoscale="${dir}/bin/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast"
    2929nanovis="${dir}/bin/nanovis -p ${dir}/lib/shaders:${dir}/lib/resources"
    3030pymolproxy="${dir}/bin/pymolproxy ${dir}/bin/pymol -p -q -i -x -X 0 -Y 0"
Note: See TracChangeset for help on using the changeset viewer.