mld2p4-2:

examples/fileread/mld_cexample_1lev.f90
 examples/fileread/mld_cexample_ml.f90
 examples/fileread/mld_dexample_1lev.f90
 examples/fileread/mld_dexample_ml.f90
 examples/fileread/mld_sexample_1lev.f90
 examples/fileread/mld_sexample_ml.f90
 examples/fileread/mld_zexample_1lev.f90
 examples/fileread/mld_zexample_ml.f90
 tests/fileread/cf_sample.f90
 tests/fileread/df_sample.f90
 tests/fileread/sf_sample.f90
 tests/fileread/zf_sample.f90

New gather usage.
stopcriterion
Salvatore Filippone 13 years ago
parent 15ff9bfa5a
commit 753dba448d

@ -267,12 +267,10 @@ program mld_cexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -287,7 +285,6 @@ program mld_cexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -304,12 +304,10 @@ program mld_cexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -324,7 +322,6 @@ program mld_cexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -266,12 +266,10 @@ program mld_dexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -286,7 +284,6 @@ program mld_dexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -303,12 +303,10 @@ program mld_dexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -323,7 +321,6 @@ program mld_dexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -267,12 +267,10 @@ program mld_sexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -287,7 +285,6 @@ program mld_sexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -304,12 +304,10 @@ program mld_sexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -324,7 +322,6 @@ program mld_sexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -266,12 +266,10 @@ program mld_zexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -286,7 +284,6 @@ program mld_zexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -303,12 +303,10 @@ program mld_zexample_ml
write(*,'("Total memory occupation for PREC : ",i12)')precsize write(*,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_glob(m_problem),r_glob(m_problem),stat=ierr) call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
if (ierr /= 0) then if (info == psb_success_) &
write(0,*) 'allocation error: no data collection' & call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
else if (info /= psb_success_) goto 9999
call psb_gather(x_glob,x,desc_A,info,root=psb_root_)
call psb_gather(r_glob,r,desc_A,info,root=psb_root_)
if (iam == psb_root_) then if (iam == psb_root_) then
write(0,'(" ")') write(0,'(" ")')
write(0,'("Saving x on file")') write(0,'("Saving x on file")')
@ -323,7 +321,6 @@ program mld_zexample_ml
write(20,998) i,x_glob(i),r_glob(i),b_glob(i) write(20,998) i,x_glob(i),r_glob(i),b_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -338,12 +338,10 @@ program cf_sample
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_col_glob(m_problem),r_col_glob(m_problem),stat=ierr)
if (ierr /= 0) then
write(psb_err_unit,*) 'allocation error: no data collection'
else
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_) call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_) if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_err_unit,'(" ")') write(psb_err_unit,'(" ")')
write(psb_err_unit,'("Saving x on file")') write(psb_err_unit,'("Saving x on file")')
@ -359,7 +357,6 @@ program cf_sample
write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i) write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -342,12 +342,10 @@ program df_sample
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_col_glob(m_problem),r_col_glob(m_problem),stat=ierr)
if (ierr /= 0) then
write(psb_err_unit,*) 'allocation error: no data collection'
else
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_) call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_) if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_err_unit,'(" ")') write(psb_err_unit,'(" ")')
write(psb_err_unit,'("Saving x on file")') write(psb_err_unit,'("Saving x on file")')
@ -363,7 +361,6 @@ program df_sample
write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i) write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -338,12 +338,10 @@ program sf_sample
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_col_glob(m_problem),r_col_glob(m_problem),stat=ierr)
if (ierr /= 0) then
write(psb_err_unit,*) 'allocation error: no data collection'
else
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_) call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_) if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_err_unit,'(" ")') write(psb_err_unit,'(" ")')
write(psb_err_unit,'("Saving x on file")') write(psb_err_unit,'("Saving x on file")')
@ -359,7 +357,6 @@ program sf_sample
write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i) write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

@ -338,12 +338,10 @@ program zf_sample
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
end if end if
allocate(x_col_glob(m_problem),r_col_glob(m_problem),stat=ierr)
if (ierr /= 0) then
write(psb_err_unit,*) 'allocation error: no data collection'
else
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_) call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_) if (info == psb_success_) &
& call psb_gather(r_col_glob,r_col,desc_a,info,root=psb_root_)
if (info /= psb_success_) goto 9999
if (iam == psb_root_) then if (iam == psb_root_) then
write(psb_err_unit,'(" ")') write(psb_err_unit,'(" ")')
write(psb_err_unit,'("Saving x on file")') write(psb_err_unit,'("Saving x on file")')
@ -359,7 +357,6 @@ program zf_sample
write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i) write(20,998) i,x_col_glob(i),r_col_glob(i),b_col_glob(i)
enddo enddo
end if end if
end if
998 format(i8,4(2x,g20.14)) 998 format(i8,4(2x,g20.14))
993 format(i6,4(1x,e12.6)) 993 format(i6,4(1x,e12.6))

Loading…
Cancel
Save