tmpS>>=1;
}
for(i=0;i<numSources;i++){
- snprintf(nm,BLOCK_SIZE,"Source.%d",i);
- nd=newNode(nm);
- AttachNode(dg,nd);
+ snprintf(nm, BLOCK_SIZE, "Source.%u", i);
+ nd = newNode(nm);
+ AttachNode(dg, nd);
}
for(j=0;j<numOfLayers;j++){
mask=0x00000001<<j;
for(i=0;i<numSources;i++){
- snprintf(nm,BLOCK_SIZE,"Comparator.%d",(i+j*firstLayerNode));
+ snprintf(nm, BLOCK_SIZE, "Comparator.%u", (i + j * firstLayerNode));
nd=newNode(nm);
AttachNode(dg,nd);
ndoff=i&(~mask);
}
mask=0x00000001<<numOfLayers;
for(i=0;i<numSources;i++){
- snprintf(nm,BLOCK_SIZE,"Sink.%d",i);
+ snprintf(nm, BLOCK_SIZE, "Sink.%u", i);
nd=newNode(nm);
AttachNode(dg,nd);
ndoff=i&(~mask);
AttachNode(dg,nd);
}
totComparators=0;
- numPrevLayerNodes=numLayerNodes;
while(numLayerNodes>maxInDeg){
numLayerNodes=numLayerNodes/maxInDeg;
if(numLayerNodes*maxInDeg<numPrevLayerNodes)
}
if(rmsm1<rms0) k=-1;
if(k==0){
- j=i+fielddim;
a->val[i]=weight*b->val[i];
a->val[i+1]=weight*b->val[i+1];
a->val[i+2]=weight*b->val[i+2];
dg=buildBH(class);
}else if(strncmp(argv[3],"WH",2)==0){
dg=buildWH(class);
- }else if(strncmp(argv[3],"SH",2)==0){
+ }else /* (strncmp(argv[3],"SH",2)==0) */ {
dg=buildSH(class);
}
if(timer_on != 0 && dg->numNodes+1>timers_tot){
timer_on=0;
if(my_rank==0)
- fprintf(stderr,"Not enough timers. Node timeing is off. \n");
+ fprintf(stderr,"Not enough timers. Node timing is off. \n");
}
- if(dg->numNodes>comm_size){
+ if(dg->numNodes && dg->numNodes>comm_size){
if(my_rank==0){
fprintf(stderr,"** The number of MPI processes should not be less than \n");
fprintf(stderr,"** the number of nodes in the graph\n");