Skip to content

Commit 0239569

Browse files
committed
Final fixes for compilation with INTEL
1 parent aa30839 commit 0239569

13 files changed

+257
-12
lines changed

base/modules/serial/psb_c_mat_mod.F90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
!
7979
module psb_c_mat_mod
8080

81+
use psb_c_vect_mod
82+
use psb_i_vect_mod
8183
use psb_c_base_mat_mod
8284
use psb_c_csr_mat_mod, only : psb_c_csr_sparse_mat, psb_lc_csr_sparse_mat,&
8385
& psb_c_ecsr_sparse_mat
@@ -661,9 +663,8 @@ end subroutine psb_c_csput_a
661663

662664
interface
663665
subroutine psb_c_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
664-
use psb_c_vect_mod, only : psb_c_vect_type
665-
use psb_i_vect_mod, only : psb_i_vect_type
666-
import :: psb_ipk_, psb_lpk_, psb_cspmat_type
666+
import :: psb_ipk_, psb_lpk_, psb_cspmat_type, &
667+
& psb_c_vect_type, psb_i_vect_type
667668
class(psb_cspmat_type), intent(inout) :: a
668669
type(psb_c_vect_type), intent(inout) :: val
669670
type(psb_i_vect_type), intent(inout) :: ia, ja

base/modules/serial/psb_c_serial_mod.f90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ subroutine psb_cbase_numbmm(a,b,c)
9898
end subroutine psb_cbase_numbmm
9999
end interface psb_numbmm
100100

101+
interface psb_aplusat
102+
subroutine psb_caplusat(ain,aout,info)
103+
use psb_c_mat_mod, only : psb_cspmat_type
104+
import :: psb_ipk_
105+
implicit none
106+
type(psb_cspmat_type) :: ain, aout
107+
integer(psb_ipk_) :: info
108+
end subroutine psb_caplusat
109+
end interface
110+
101111
interface psb_rwextd
102112
subroutine psb_crwextd(nr,a,info,b,rowscale)
103113
use psb_c_mat_mod, only : psb_cspmat_type

base/modules/serial/psb_d_mat_mod.F90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
!
7979
module psb_d_mat_mod
8080

81+
use psb_d_vect_mod
82+
use psb_i_vect_mod
8183
use psb_d_base_mat_mod
8284
use psb_d_csr_mat_mod, only : psb_d_csr_sparse_mat, psb_ld_csr_sparse_mat,&
8385
& psb_d_ecsr_sparse_mat
@@ -661,9 +663,8 @@ end subroutine psb_d_csput_a
661663

662664
interface
663665
subroutine psb_d_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
664-
use psb_d_vect_mod, only : psb_d_vect_type
665-
use psb_i_vect_mod, only : psb_i_vect_type
666-
import :: psb_ipk_, psb_lpk_, psb_dspmat_type
666+
import :: psb_ipk_, psb_lpk_, psb_dspmat_type, &
667+
& psb_d_vect_type, psb_i_vect_type
667668
class(psb_dspmat_type), intent(inout) :: a
668669
type(psb_d_vect_type), intent(inout) :: val
669670
type(psb_i_vect_type), intent(inout) :: ia, ja

base/modules/serial/psb_d_serial_mod.f90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ subroutine psb_dbase_numbmm(a,b,c)
9898
end subroutine psb_dbase_numbmm
9999
end interface psb_numbmm
100100

101+
interface psb_aplusat
102+
subroutine psb_daplusat(ain,aout,info)
103+
use psb_d_mat_mod, only : psb_dspmat_type
104+
import :: psb_ipk_
105+
implicit none
106+
type(psb_dspmat_type) :: ain, aout
107+
integer(psb_ipk_) :: info
108+
end subroutine psb_daplusat
109+
end interface
110+
101111
interface psb_rwextd
102112
subroutine psb_drwextd(nr,a,info,b,rowscale)
103113
use psb_d_mat_mod, only : psb_dspmat_type

base/modules/serial/psb_s_mat_mod.F90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
!
7979
module psb_s_mat_mod
8080

81+
use psb_s_vect_mod
82+
use psb_i_vect_mod
8183
use psb_s_base_mat_mod
8284
use psb_s_csr_mat_mod, only : psb_s_csr_sparse_mat, psb_ls_csr_sparse_mat,&
8385
& psb_s_ecsr_sparse_mat
@@ -661,9 +663,8 @@ end subroutine psb_s_csput_a
661663

662664
interface
663665
subroutine psb_s_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
664-
use psb_s_vect_mod, only : psb_s_vect_type
665-
use psb_i_vect_mod, only : psb_i_vect_type
666-
import :: psb_ipk_, psb_lpk_, psb_sspmat_type
666+
import :: psb_ipk_, psb_lpk_, psb_sspmat_type, &
667+
& psb_s_vect_type, psb_i_vect_type
667668
class(psb_sspmat_type), intent(inout) :: a
668669
type(psb_s_vect_type), intent(inout) :: val
669670
type(psb_i_vect_type), intent(inout) :: ia, ja

base/modules/serial/psb_s_serial_mod.f90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ subroutine psb_sbase_numbmm(a,b,c)
9898
end subroutine psb_sbase_numbmm
9999
end interface psb_numbmm
100100

101+
interface psb_aplusat
102+
subroutine psb_saplusat(ain,aout,info)
103+
use psb_s_mat_mod, only : psb_sspmat_type
104+
import :: psb_ipk_
105+
implicit none
106+
type(psb_sspmat_type) :: ain, aout
107+
integer(psb_ipk_) :: info
108+
end subroutine psb_saplusat
109+
end interface
110+
101111
interface psb_rwextd
102112
subroutine psb_srwextd(nr,a,info,b,rowscale)
103113
use psb_s_mat_mod, only : psb_sspmat_type

base/modules/serial/psb_z_mat_mod.F90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
!
7979
module psb_z_mat_mod
8080

81+
use psb_z_vect_mod
82+
use psb_i_vect_mod
8183
use psb_z_base_mat_mod
8284
use psb_z_csr_mat_mod, only : psb_z_csr_sparse_mat, psb_lz_csr_sparse_mat,&
8385
& psb_z_ecsr_sparse_mat
@@ -661,9 +663,8 @@ end subroutine psb_z_csput_a
661663

662664
interface
663665
subroutine psb_z_csput_v(nz,ia,ja,val,a,imin,imax,jmin,jmax,info)
664-
use psb_z_vect_mod, only : psb_z_vect_type
665-
use psb_i_vect_mod, only : psb_i_vect_type
666-
import :: psb_ipk_, psb_lpk_, psb_zspmat_type
666+
import :: psb_ipk_, psb_lpk_, psb_zspmat_type, &
667+
& psb_z_vect_type, psb_i_vect_type
667668
class(psb_zspmat_type), intent(inout) :: a
668669
type(psb_z_vect_type), intent(inout) :: val
669670
type(psb_i_vect_type), intent(inout) :: ia, ja

base/modules/serial/psb_z_serial_mod.f90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ subroutine psb_zbase_numbmm(a,b,c)
9898
end subroutine psb_zbase_numbmm
9999
end interface psb_numbmm
100100

101+
interface psb_aplusat
102+
subroutine psb_zaplusat(ain,aout,info)
103+
use psb_z_mat_mod, only : psb_zspmat_type
104+
import :: psb_ipk_
105+
implicit none
106+
type(psb_zspmat_type) :: ain, aout
107+
integer(psb_ipk_) :: info
108+
end subroutine psb_zaplusat
109+
end interface
110+
101111
interface psb_rwextd
102112
subroutine psb_zrwextd(nr,a,info,b,rowscale)
103113
use psb_z_mat_mod, only : psb_zspmat_type

base/serial/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ FOBJS = psb_lsame.o psi_m_serial_impl.o psi_e_serial_impl.o \
1111
smmp.o lsmmp.o \
1212
psb_sgeprt.o psb_dgeprt.o psb_cgeprt.o psb_zgeprt.o\
1313
psb_spdot_srtd.o psb_aspxpby.o psb_spge_dot.o\
14+
psb_saplusat.o psb_daplusat.o psb_caplusat.o psb_zaplusat.o \
1415
psb_samax_s.o psb_damax_s.o psb_camax_s.o psb_zamax_s.o \
1516
psb_sasum_s.o psb_dasum_s.o psb_casum_s.o psb_zasum_s.o
1617

base/serial/psb_caplusat.f90

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
subroutine psb_caplusat(ain,aout,info)
2+
use psb_c_mat_mod
3+
4+
implicit none
5+
type(psb_cspmat_type), intent(inout) :: ain
6+
type(psb_cspmat_type), intent(out) :: aout
7+
integer(psb_ipk_) :: info
8+
9+
type(psb_c_coo_sparse_mat) :: acoo1, acoo2
10+
integer(psb_ipk_) :: nr, nc, nz1, nz2
11+
integer(psb_ipk_) :: err_act
12+
character(len=20) :: name, ch_err
13+
14+
name='psb_caplusat'
15+
info = psb_success_
16+
call psb_erractionsave(err_act)
17+
18+
19+
20+
nr = ain%get_nrows()
21+
nc = ain%get_ncols()
22+
23+
if (nr /= nc) then
24+
info=psb_err_internal_error_
25+
call psb_errpush(info,name)
26+
goto 9999
27+
end if
28+
29+
call ain%cp_to(acoo1)
30+
call acoo1%cp_to_coo(acoo2,info)
31+
nz1 = acoo1%get_nzeros()
32+
nz2 = acoo2%get_nzeros()
33+
call acoo1%reallocate(nz1+nz2)
34+
acoo1%ia(nz1+1:nz1+nz2) = acoo2%ja(1:nz2)
35+
acoo1%ja(nz1+1:nz1+nz2) = acoo2%ia(1:nz2)
36+
acoo1%val(nz1+1:nz1+nz2) = acoo2%val(1:nz2)
37+
call acoo1%set_nrows(nr)
38+
call acoo1%set_ncols(nr)
39+
call acoo1%set_nzeros(nz1+nz2)
40+
call aout%cp_from(acoo1)
41+
42+
call psb_erractionrestore(err_act)
43+
return
44+
45+
9999 call psb_error_handler(err_act)
46+
47+
return
48+
49+
50+
end subroutine psb_caplusat

0 commit comments

Comments
 (0)