C interface. Not fully working yet.

new-context
Salvatore Filippone 4 years ago
parent b376d226cb
commit 8b2b86d44d

@ -870,7 +870,8 @@ contains
include 'mpif.h' include 'mpif.h'
#endif #endif
type(psb_ctxt_type), intent(out) :: ictxt type(psb_ctxt_type), intent(out) :: ictxt
integer(psb_mpk_), intent(in), optional :: np, basectxt, ids(:) type(psb_ctxt_type), intent(in), optional :: basectxt
integer(psb_mpk_), intent(in), optional :: np, ids(:)
integer(psb_mpk_) :: i, isnullcomm, icomm integer(psb_mpk_) :: i, isnullcomm, icomm
integer(psb_mpk_), allocatable :: iids(:) integer(psb_mpk_), allocatable :: iids(:)
@ -899,7 +900,11 @@ contains
end if end if
if (present(basectxt)) then if (present(basectxt)) then
basecomm = basectxt if (allocated(basectxt%ctxt)) then
basecomm = basectxt%ctxt
else
basecomm = mpi_comm_world
end if
else else
basecomm = mpi_comm_world basecomm = mpi_comm_world
end if end if

@ -242,8 +242,8 @@ int main(int argc, char *argv[])
ictxt = psb_c_init(); ictxt = psb_c_init();
psb_c_info(ictxt,&iam,&np); psb_c_info(ictxt,&iam,&np);
fprintf(stdout,"Initialization: am %d of %d\n",iam,np); fprintf(stdout,"Initialization: am %d of %d\n",iam,np);
fflush(stdout); fflush(stdout);
psb_c_barrier(ictxt); psb_c_barrier(ictxt);
if (iam == 0) { if (iam == 0) {
fgets(buffer,LINEBUFSIZE,stdin); fgets(buffer,LINEBUFSIZE,stdin);
@ -278,7 +278,7 @@ int main(int argc, char *argv[])
fprintf(stderr,"%d Check on received: methd %s ptype %s afmt %s\n", fprintf(stderr,"%d Check on received: methd %s ptype %s afmt %s\n",
iam,methd,ptype,afmt); iam,methd,ptype,afmt);
fflush(stderr);
psb_c_barrier(ictxt); psb_c_barrier(ictxt);
cdh=psb_c_new_descriptor(); cdh=psb_c_new_descriptor();

@ -2,7 +2,7 @@
BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES BICGSTAB Iterative method BICGSTAB CGS BICG BICGSTABL RGMRES
BJAC Preconditioner NONE DIAG BJAC BJAC Preconditioner NONE DIAG BJAC
CSR A Storage format CSR COO CSR A Storage format CSR COO
100 Domain size (acutal system is this**3) 080 Domain size (acutal system is this**3)
1 Stopping criterion 1 Stopping criterion
80 MAXIT 80 MAXIT
01 ITRACE 01 ITRACE

Loading…
Cancel
Save