~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/plugins/select/bluegene/plugin/bg_switch_connections.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  bg_switch_connections.c - Blue Gene switch management functions, 
3
3
 *  establish switch connections
4
4
 *
5
 
 *  $Id: bg_switch_connections.c 17104 2009-04-01 17:20:31Z da $
 
5
 *  $Id: bg_switch_connections.c 17483 2009-05-13 18:31:42Z da $
6
6
 *****************************************************************************
7
7
 *  Copyright (C) 2004 The Regents of the University of California.
8
8
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
9
9
 *  Written by Dan Phung <phung4@llnl.gov> and Danny Auble <da@llnl.gov>
10
10
 *  
11
11
 *  This file is part of SLURM, a resource management program.
12
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
12
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
13
 *  Please also read the included file: DISCLAIMER.
13
14
 *  
14
15
 *  SLURM is free software; you can redistribute it and/or modify it under
15
16
 *  the terms of the GNU General Public License as published by the Free
221
222
                                break;  
222
223
                        }
223
224
                        conn[i].part_state = RM_PARTITION_READY;
224
 
                        debug2("adding %d -> %d", source, ba_conn->port_tar);
 
225
                        debug3("adding %d -> %d", source, ba_conn->port_tar);
225
226
                        list_push(conn_list, &conn[i]);
226
227
                }
227
228
        }
236
237
                        return SLURM_ERROR;
237
238
                } 
238
239
        } else {
239
 
                debug("we got a switch with no connections");
 
240
                debug2("we got a switch with no connections");
240
241
                list_destroy(conn_list);
241
242
                return SLURM_ERROR;
242
243
        }
287
288
        int i = 0, j = 0, switch_count = 0;
288
289
        int source = 0;
289
290
        
290
 
        debug4("checking node %c%c%c",
 
291
        debug5("checking node %c%c%c",
291
292
               alpha_num[ba_node->coord[X]], 
292
293
               alpha_num[ba_node->coord[Y]], 
293
294
               alpha_num[ba_node->coord[Z]]);
294
295
        for(i=0; i<BA_SYSTEM_DIMENSIONS; i++) {
295
 
                debug4("dim %d", i);
 
296
                debug5("dim %d", i);
296
297
                ba_switch = &ba_node->axis_switch[i];
297
298
                for(j=0; j<num_connections; j++) {
298
299
                        /* set the source port(-) to check */
314
315
                        ba_conn = &ba_switch->int_wire[source];
315
316
                        if(ba_conn->used && ba_conn->port_tar != source) {
316
317
                                switch_count++;
317
 
                                debug4("used");
 
318
                                debug5("used");
318
319
                                break;
319
320
                        }
320
321
                }
338
339
        rm_nodecard_t *ncard;
339
340
        rm_nodecard_list_t *ncard_list = NULL;
340
341
        int num, i;
341
 
        int use_nc[bluegene_bp_nodecard_cnt];
 
342
        int use_nc[bg_conf->bp_nodecard_cnt];
342
343
        double nc_pos = 0;
343
344
#endif
344
345
        xassert(bg_record->ionode_bitmap);
348
349
                return SLURM_ERROR;
349
350
        }
350
351
/*      info("configuring small block on ionodes %s out of %d ncs",  */
351
 
/*           bg_record->ionodes, bluegene_bp_nodecard_cnt); */
 
352
/*           bg_record->ionodes, bg_conf->bp_nodecard_cnt); */
352
353
#ifdef HAVE_BG_FILES    
353
354
        /* set that we are doing a small block */
354
355
        if ((rc = bridge_set_data(bg_record->bg_block, RM_PartitionSmall, 
358
359
                      bg_err_str(rc));
359
360
        }
360
361
 
361
 
        num_ncards = bg_record->node_cnt/bluegene_nodecard_node_cnt;
 
362
        num_ncards = bg_record->node_cnt/bg_conf->nodecard_node_cnt;
362
363
        if(num_ncards < 1) {
363
364
                num_ncards = 1;
364
365
                sub_nodecard = 1;
367
368
 
368
369
        /* find out how many nodecards to get for each ionode */
369
370
                
370
 
        for(i = 0; i<bluegene_numpsets; i++) {
 
371
        for(i = 0; i<bg_conf->numpsets; i++) {
371
372
                if(bit_test(bg_record->ionode_bitmap, i)) {
372
 
                        if(bluegene_nc_ratio > 1) {
 
373
                        if(bg_conf->nc_ratio > 1) {
373
374
                                int j=0;
374
 
                                for(j=0; j<bluegene_nc_ratio; j++)
 
375
                                for(j=0; j<bg_conf->nc_ratio; j++)
375
376
                                        use_nc[(int)nc_pos+j] = 1;
376
377
                        } else {
377
378
                                use_nc[(int)nc_pos] = 1;
379
380
                                        ionode_card = 1;
380
381
                        }
381
382
                }
382
 
                nc_pos += bluegene_nc_ratio;
 
383
                nc_pos += bg_conf->nc_ratio;
383
384
        }
384
385
 
385
386
        if ((rc = bridge_set_data(bg_record->bg_block,
687
688
                goto cleanup;
688
689
        }
689
690
#endif  
690
 
        debug3("BP count %d", bg_record->bp_count);
691
 
        debug3("switch count %d", bg_record->switch_count);
 
691
        debug4("BP count %d", bg_record->bp_count);
 
692
        debug4("switch count %d", bg_record->switch_count);
692
693
 
693
694
        list_iterator_reset(itr);
694
695
        while ((ba_node = list_next(itr))) {
700
701
                }
701
702
#endif
702
703
                if(!ba_node->used) {
703
 
                        debug3("%c%c%c is a passthrough, "
 
704
                        debug4("%c%c%c is a passthrough, "
704
705
                               "not including in request",
705
706
                               alpha_num[ba_node->coord[X]], 
706
707
                               alpha_num[ba_node->coord[Y]], 
707
708
                               alpha_num[ba_node->coord[Z]]);
708
709
                } else {
709
 
                        debug2("using node %c%c%c",
 
710
                        debug3("using node %c%c%c",
710
711
                               alpha_num[ba_node->coord[X]], 
711
712
                               alpha_num[ba_node->coord[Y]], 
712
713
                               alpha_num[ba_node->coord[Z]]);
757
758
                        if(_add_switch_conns(coord_switch[i],
758
759
                                             &ba_node->axis_switch[i])
759
760
                           == SLURM_SUCCESS) {
760
 
                                debug2("adding switch dim %d", i);
 
761
                                debug3("adding switch dim %d", i);
761
762
                                if (first_switch){
762
763
                                        if ((rc = bridge_set_data(
763
764
                                                     bg_record->bg_block,