Files
psblas3/base/serial/dp/dcsrrp.f
T
Salvatore Filippone f0c52178c6 psblas-2.2-maint:
base/comm/psb_dhalo.f90
 base/comm/psb_ihalo.f90
 base/comm/psb_zhalo.f90
 base/modules/psb_spmat_type.f90
 base/modules/psb_string_mod.f90
 base/psblas/psb_dspmm.f90
 base/psblas/psb_dspsm.f90
 base/psblas/psb_zspmm.f90
 base/psblas/psb_zspsm.f90
 base/serial/dp/dcoco.f
 base/serial/dp/dcocr.f
 base/serial/dp/dcrco.f
 base/serial/dp/dcrcr.f
 base/serial/dp/dcrjd.f
 base/serial/dp/dcsrp1.f
 base/serial/dp/dcsrrp.f
 base/serial/dp/djadrp.f
 base/serial/dp/djadrp1.f
 base/serial/dp/djdcox.f
 base/serial/dp/dvtfg.f
 base/serial/dp/zcoco.f
 base/serial/dp/zcocr.f
 base/serial/dp/zcrco.f
 base/serial/dp/zcrcr.f
 base/serial/dp/zcrjd.f
 base/serial/jad/djadsm.f
 base/serial/psb_cest.f90
 base/serial/psb_dcoins.f90
 base/serial/psb_dcsprt.f90
 base/serial/psb_dfixcoo.f90
 base/serial/psb_dipcoo2csc.f90
 base/serial/psb_dipcoo2csr.f90
 base/serial/psb_dipcsr2coo.f90
 base/serial/psb_dnumbmm.f90
 base/serial/psb_drwextd.f90
 base/serial/psb_dspcnv.f90
 base/serial/psb_dspgetrow.f90
 base/serial/psb_dspscal.f90
 base/serial/psb_dsymbmm.f90
 base/serial/psb_dtransp.f90
 base/serial/psb_lsame.f90
 base/serial/psb_update_mod.f90
 base/serial/psb_zcoins.f90
 base/serial/psb_zcsprt.f90
 base/serial/psb_zfixcoo.f90
 base/serial/psb_zipcoo2csc.f90
 base/serial/psb_zipcoo2csr.f90
 base/serial/psb_zipcsr2coo.f90
 base/serial/psb_znumbmm.f90
 base/serial/psb_zrwextd.f90
 base/serial/psb_zspcnv.f90
 base/serial/psb_zspgetrow.f90
 base/serial/psb_zspscal.f90
 base/serial/psb_zsymbmm.f90
 base/serial/psb_ztransc.f90
 base/serial/psb_ztransp.f90
 base/tools/psb_cdren.f90
 base/tools/psb_dsphalo.F90
 base/tools/psb_glob_to_loc.f90
 base/tools/psb_loc_to_glob.f90
 base/tools/psb_zsphalo.F90
 krylov/psb_krylov_mod.f90
 prec/psb_dbjac_aply.f90
 prec/psb_dgprec_aply.f90
 prec/psb_dprc_aply.f90
 prec/psb_dprecbld.f90
 prec/psb_dprecinit.f90
 prec/psb_zbjac_aply.f90
 prec/psb_zgprec_aply.f90
 prec/psb_zprc_aply.f90
 prec/psb_zprecbld.f90
 prec/psb_zprecinit.f90
 util/psb_hbio_mod.f90
 util/psb_mat_dist_mod.f90
 util/psb_metispart_mod.F90
 util/psb_mmio_mod.f90
 util/psb_read_mat_mod.f90


Fixed name of TOUPPER and friends with prefix PSB_.
2008-03-11 11:12:15 +00:00

175 lines
6.8 KiB
FortranFixed

C
C Parallel Sparse BLAS version 2.2
C (C) Copyright 2006/2007/2008
C Salvatore Filippone University of Rome Tor Vergata
C Alfredo Buttari University of Rome Tor Vergata
C
C Redistribution and use in source and binary forms, with or without
C modification, are permitted provided that the following conditions
C are met:
C 1. Redistributions of source code must retain the above copyright
C notice, this list of conditions and the following disclaimer.
C 2. Redistributions in binary form must reproduce the above copyright
C notice, this list of conditions, and the following disclaimer in the
C documentation and/or other materials provided with the distribution.
C 3. The name of the PSBLAS group or the names of its contributors may
C not be used to endorse or promote products derived from this
C software without specific written permission.
C
C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
C ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
C TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
C PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS
C BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
C CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
C SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
C INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
C CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
C ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
C POSSIBILITY OF SUCH DAMAGE.
C
C
C
C Purpose
C =======
C
C Performing column permutation of a sparse matrix.
C
C Parameters
C ==========
C
C TRANS - CHARACTER*1
C On entry TRANS specifies whether the routine will use
C matrix P or the transpose of P for the permutation as follows:
C TRANS = 'N' -> permute with matrix P
C TRANS = 'T' or 'C' -> permute the transpose of P
C Unchanged on exit.
C
C M - INTEGER
C On entry: number of rows of matrix A.
C Unchanged on exit.
C
C N - INTEGER
C On entry: number of columns of matrix A.
C Unchanged on exit.
C
C DESCRA - CHARACTER*5 array of DIMENSION (10)
C On entry DESCRA defines the format of the input sparse matrix.
C Unchanged on exit.
C
C A - DOUBLE PRECISION array of DIMENSION (*)
C On entry A specifies the values of the input sparse
C matrix.
C Unchanged on exit.
C
C IA1 - INTEGER array of dimension (*)
C On entry IA1 holds integer information on input sparse
C matrix. Actual information will depend on data format used.
C Unchanged on exit.
C
C IA2 - INTEGER array of dimension (*)
C On entry IA2 holds integer information on input sparse
C matrix. Actual information will depend on data format used.
C Unchanged on exit.
C
C INFOA - INTEGER array of dimension (10)
C On entry can hold auxiliary information on input matrices
C formats or environment of subsequent calls.
C Might be changed on exit.
C
C P - INTEGER array of dimension (M)
C On entry P specifies the column permutation of matrix A
C (P(1) == 0 if no permutation).
C Unchanged on exit.
C
C WORK - DOUBLE PRECISION array of dimension (LWORK)
C On entry: work area.
C On exit INT(WORK(1)) contains the minimum value
C for LWORK satisfying DSPRP memory requirements.
C
C LWORK - INTEGER
C On entry LWORK specifies the dimension of WORK
C Unchanged on exit.
C
C IERROR - INTEGER
C On exit IERROR contains the value of error flag as follows:
C IERROR = 0 no error
C IERROR > 0 warning
C IERROR < 0 fatal error
C WORK - DOUBLE PRECISION array of dimension (LWORK)
C Work area.
C
C LWORK - INTEGER
C On entry LWORK specifies the dimension of WORK.
C LWORK must be greater than zero.
C On exit LWORK is the maximum between the initial value and
C the minimum value satisfying DSPRP memory requirements.
C
C IERROR - INTEGER
C On exit IERROR contains the value of error flag as follows:
C IERROR = 0 no error
C IERROR = 4 error on dimension of vector WORK
C IERROR = 32 unknown flag TRANS
C IERROR = 64 LWORK <= 0
C IERROR = 128 this data structure not yet considered
C
C Notes
C =====
C It is not possible to call this subroutine with LWORK=0 to get
C the minimal value for LWORK. This functionality needs a better
C connection with DxxxMM
C
C
SUBROUTINE DCSRRP(TRANS,M,N,DESCRA,JA,IA,
+ P,WORK,LWORK,IERROR)
use psb_const_mod
use psb_string_mod
IMPLICIT NONE
C .. Scalar Arguments ..
INTEGER LWORK, M, N, IERROR
CHARACTER TRANS
C .. Array Arguments ..
real(psb_dpk_) WORK(*)
INTEGER JA(*), IA(*), P(*)
CHARACTER DESCRA*11
C .. Local Scalars ..
INTEGER ERR_ACT
c .. Local Arrays ..
CHARACTER*20 NAME
INTEGER INT_VAL(5)
C .. External Subroutines ..
EXTERNAL XERBLA
C
C .. Executable Statements ..
C
NAME = 'DCSRRP\0'
IERROR = 0
CALL FCPSB_ERRACTIONSAVE(ERR_ACT)
IF (psb_toupper(DESCRA(1:1)).EQ.'S' .OR.
+ psb_toupper(DESCRA(1:1)).EQ.'T') THEN
IERROR=3023
CALL FCPSB_ERRPUSH(IERROR,NAME,INT_VAL)
GOTO 9999
endif
CALL DCSRP1(TRANS,M,N,DESCRA,JA,IA,P,WORK,WORK,LWORK*2,IERROR)
IF(IERROR.NE.0) THEN
IERROR=4011
CALL FCPSB_ERRPUSH(IERROR,NAME,INT_VAL)
GOTO 9999
END IF
CALL FCPSB_ERRACTIONRESTORE(ERR_ACT)
RETURN
9999 CONTINUE
CALL FCPSB_ERRACTIONRESTORE(ERR_ACT)
IF ( ERR_ACT .NE. 0 ) THEN
CALL FCPSB_SERROR()
RETURN
ENDIF
RETURN
END