psblas3-mcbind:

cbind/base/psb_cpenv_mod.f90
 cbind/test/pargen/ppdec.c

Fix psb_c_set_index_base; use it in test program.
psblas3-mcbind
Salvatore Filippone 8 years ago
parent 855f557673
commit a566ae52e4

@ -16,7 +16,7 @@ contains
subroutine psb_c_set_index_base(base) bind(c) subroutine psb_c_set_index_base(base) bind(c)
implicit none implicit none
integer(psb_c_int) :: base integer(psb_c_int), value :: base
psb_c_index_base = base psb_c_index_base = base
end subroutine psb_c_set_index_base end subroutine psb_c_set_index_base

@ -123,7 +123,7 @@ int matgen(int ictxt, int ng,int idim,int vg[],psb_c_dspmat *ah,psb_c_descriptor
info = 0; info = 0;
psb_c_info(ictxt,&iam,&np); psb_c_info(ictxt,&iam,&np);
deltah = (double) 1.0/(idim-1); deltah = (double) 1.0/(idim-1);
psb_c_set_index_base(1);
for (glob_row=1; glob_row<=ng; glob_row++) { for (glob_row=1; glob_row<=ng; glob_row++) {
/* Check if I have to do something about this entry */ /* Check if I have to do something about this entry */
@ -214,10 +214,6 @@ int matgen(int ictxt, int ng,int idim,int vg[],psb_c_dspmat *ah,psb_c_descriptor
icol[el]=(x)*idim*idim+(y-1)*idim+(z); icol[el]=(x)*idim*idim+(y-1)*idim+(z);
el=el+1; el=el+1;
} }
for (i=0; i<el; i++) {
irow[i]=glob_row-1;
icol[i]--;
}
if ((ret=psb_c_dspins(el,irow,icol,val,ah,cdh))!=0) if ((ret=psb_c_dspins(el,irow,icol,val,ah,cdh))!=0)
fprintf(stderr,"From psb_c_dspins: %d\n",ret); fprintf(stderr,"From psb_c_dspins: %d\n",ret);
psb_c_dgeins(1,irow,zt,bh,cdh); psb_c_dgeins(1,irow,zt,bh,cdh);

Loading…
Cancel
Save