mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
Merge branch 'serial-match' into development
This commit is contained in:
@@ -73,6 +73,22 @@ module amg_d_matchboxp_mod
|
||||
use iso_c_binding
|
||||
use psb_base_cbind_mod
|
||||
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
interface MatchingC
|
||||
subroutine dMatchingC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate) bind(c,name='dMatching')
|
||||
use iso_c_binding
|
||||
import :: psb_c_ipk_, psb_c_lpk_
|
||||
implicit none
|
||||
|
||||
integer(psb_c_lpk_), value :: nlver,nledge
|
||||
integer(psb_c_lpk_) :: verlocptr(*),verlocind(*), verdistance(*)
|
||||
integer(psb_c_lpk_) :: mate(*)
|
||||
real(c_double) :: edgelocweight(*)
|
||||
end subroutine dMatchingC
|
||||
end interface MatchingC
|
||||
|
||||
#else
|
||||
interface MatchBoxPC
|
||||
subroutine dMatchBoxPC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate, myrank, numprocs, icomm,&
|
||||
@@ -93,7 +109,7 @@ module amg_d_matchboxp_mod
|
||||
real(c_double) :: msgpercent(*)
|
||||
end subroutine dMatchBoxPC
|
||||
end interface MatchBoxPC
|
||||
|
||||
#endif
|
||||
interface amg_i_aggr_assign
|
||||
module procedure amg_i_d_aggr_assign
|
||||
end interface amg_i_aggr_assign
|
||||
@@ -1129,11 +1145,15 @@ contains
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*)' Calling MatchBoxP '
|
||||
end if
|
||||
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
call MatchingC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate)
|
||||
#else
|
||||
call MatchBoxPC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate, mrank, mnp, icomm,&
|
||||
& msgindsent,msgactualsent,msgpercent,&
|
||||
& ph0_time, ph1_time, ph2_time, ph1_card, ph2_card)
|
||||
#endif
|
||||
verlocptr(:) = verlocptr(:) + 1
|
||||
verlocind(:) = verlocind(:) + 1
|
||||
verdistance(:) = verdistance(:) + 1
|
||||
@@ -119,10 +119,6 @@
|
||||
module amg_d_parmatch_aggregator_mod
|
||||
use amg_d_base_aggregator_mod
|
||||
use amg_d_matchboxp_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
type, extends(amg_d_base_aggregator_type) :: amg_d_parmatch_aggregator_type
|
||||
end type amg_d_parmatch_aggregator_type
|
||||
#else
|
||||
type, extends(amg_d_base_aggregator_type) :: amg_d_parmatch_aggregator_type
|
||||
integer(psb_ipk_) :: matching_alg
|
||||
integer(psb_ipk_) :: n_sweeps ! When n_sweeps >1 we need an auxiliary descriptor
|
||||
@@ -685,5 +681,4 @@ contains
|
||||
|
||||
return
|
||||
end subroutine amg_d_parmatch_aggregator_bld_map
|
||||
#endif
|
||||
end module amg_d_parmatch_aggregator_mod
|
||||
|
||||
@@ -73,6 +73,22 @@ module amg_s_matchboxp_mod
|
||||
use iso_c_binding
|
||||
use psb_base_cbind_mod
|
||||
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
interface MatchingC
|
||||
subroutine sMatchingC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate) bind(c,name='sMatching')
|
||||
use iso_c_binding
|
||||
import :: psb_c_ipk_, psb_c_lpk_
|
||||
implicit none
|
||||
|
||||
integer(psb_c_lpk_), value :: nlver,nledge
|
||||
integer(psb_c_lpk_) :: verlocptr(*),verlocind(*), verdistance(*)
|
||||
integer(psb_c_lpk_) :: mate(*)
|
||||
real(c_float) :: edgelocweight(*)
|
||||
end subroutine sMatchingC
|
||||
end interface MatchingC
|
||||
|
||||
#else
|
||||
interface MatchBoxPC
|
||||
subroutine sMatchBoxPC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate, myrank, numprocs, icomm,&
|
||||
@@ -93,7 +109,7 @@ module amg_s_matchboxp_mod
|
||||
real(c_double) :: msgpercent(*)
|
||||
end subroutine sMatchBoxPC
|
||||
end interface MatchBoxPC
|
||||
|
||||
#endif
|
||||
interface amg_i_aggr_assign
|
||||
module procedure amg_i_s_aggr_assign
|
||||
end interface amg_i_aggr_assign
|
||||
@@ -1129,11 +1145,15 @@ contains
|
||||
call psb_barrier(ictxt)
|
||||
if (me == 0) write(0,*)' Calling MatchBoxP '
|
||||
end if
|
||||
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
call MatchingC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate)
|
||||
#else
|
||||
call MatchBoxPC(nlver,nledge,verlocptr,verlocind,edgelocweight,&
|
||||
& verdistance, mate, mrank, mnp, icomm,&
|
||||
& msgindsent,msgactualsent,msgpercent,&
|
||||
& ph0_time, ph1_time, ph2_time, ph1_card, ph2_card)
|
||||
#endif
|
||||
verlocptr(:) = verlocptr(:) + 1
|
||||
verlocind(:) = verlocind(:) + 1
|
||||
verdistance(:) = verdistance(:) + 1
|
||||
@@ -119,10 +119,6 @@
|
||||
module amg_s_parmatch_aggregator_mod
|
||||
use amg_s_base_aggregator_mod
|
||||
use amg_s_matchboxp_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
type, extends(amg_s_base_aggregator_type) :: amg_s_parmatch_aggregator_type
|
||||
end type amg_s_parmatch_aggregator_type
|
||||
#else
|
||||
type, extends(amg_s_base_aggregator_type) :: amg_s_parmatch_aggregator_type
|
||||
integer(psb_ipk_) :: matching_alg
|
||||
integer(psb_ipk_) :: n_sweeps ! When n_sweeps >1 we need an auxiliary descriptor
|
||||
@@ -685,5 +681,4 @@ contains
|
||||
|
||||
return
|
||||
end subroutine amg_s_parmatch_aggregator_bld_map
|
||||
#endif
|
||||
end module amg_s_parmatch_aggregator_mod
|
||||
|
||||
@@ -5,7 +5,8 @@ MODDIR=../../../modules
|
||||
HERE=../..
|
||||
|
||||
FINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(MODDIR) $(FMFLAG)$(INCDIR) $(PSBLAS_INCLUDES)
|
||||
CXXINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(INCDIR) $(FMFLAG)/.
|
||||
CXXINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(INCDIR) $(FMFLAG)/. -I$(PSBLAS_INCDIR)
|
||||
CINCLUDES=$(FMFLAG)$(HERE) $(FMFLAG)$(INCDIR) $(FMFLAG)/. -I$(PSBLAS_INCDIR)
|
||||
|
||||
#CINCLUDES= -I${SUPERLU_INCDIR} -I${HSL_INCDIR} -I${SPRAL_INCDIR} -I/home/users/pasqua/Ambra/BootCMatch/include -lBCM -L/home/users/pasqua/Ambra/BootCMatch/lib -lm
|
||||
|
||||
@@ -61,7 +62,8 @@ amg_s_parmatch_unsmth_bld.o \
|
||||
amg_s_parmatch_smth_bld.o \
|
||||
amg_s_parmatch_spmm_bld_inner.o
|
||||
|
||||
MPCOBJS=MatchBoxPC.o \
|
||||
MPCOBJS=Matching.o \
|
||||
MatchBoxPC.o \
|
||||
sendBundledMessages.o \
|
||||
initialize.o \
|
||||
extractUChunk.o \
|
||||
|
||||
@@ -40,15 +40,17 @@
|
||||
// ************************************************************************
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if !defined(SERIAL_MPI)
|
||||
#include "amg_config.h"
|
||||
#include "MatchBoxPC.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include <mpi.h>
|
||||
#endif
|
||||
|
||||
#include "MatchBoxPC.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
MilanLongInt* verLocPtr, MilanLongInt* verLocInd, MilanReal* edgeLocWeight,
|
||||
@@ -58,7 +60,6 @@ void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
MilanLongInt* msgIndSent, MilanLongInt* msgActualSent, MilanReal* msgPercent,
|
||||
MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time,
|
||||
MilanLongInt* ph1_card, MilanLongInt* ph2_card ) {
|
||||
#if !defined(SERIAL_MPI)
|
||||
MPI_Comm C_comm=MPI_Comm_f2c(icomm);
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -72,7 +73,7 @@ void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
double tmr = MPI_Wtime();
|
||||
#endif
|
||||
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
//fprintf(stderr,"Warning: using buggy OpenMP matching!\n");
|
||||
dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(NLVer, NLEdge,
|
||||
verLocPtr, verLocInd, edgeLocWeight,
|
||||
@@ -97,7 +98,6 @@ void dMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
fprintf(stderr, "Elaboration time: %f for %ld nodes\n", tmr, NLVer);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
@@ -108,13 +108,12 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
MilanLongInt* msgIndSent, MilanLongInt* msgActualSent, MilanReal* msgPercent,
|
||||
MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time,
|
||||
MilanLongInt* ph1_card, MilanLongInt* ph2_card ) {
|
||||
#if !defined(SERIAL_MPI)
|
||||
MPI_Comm C_comm=MPI_Comm_f2c(icomm);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,"MatchBoxPC: rank %d nlver %ld nledge %ld [ %ld %ld ]\n",
|
||||
myRank,NLVer, NLEdge,verDistance[0],verDistance[1]);
|
||||
#endif
|
||||
#if defined(OPENMP)
|
||||
#if defined(PSB_OPENMP)
|
||||
//fprintf(stderr,"Warning: using buggy OpenMP matching!\n");
|
||||
salgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(NLVer, NLEdge,
|
||||
verLocPtr, verLocInd, edgeLocWeight,
|
||||
@@ -132,9 +131,10 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
ph0_time, ph1_time, ph2_time,
|
||||
ph1_card, ph2_card );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,10 @@
|
||||
#include <assert.h>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#ifdef OPENMP
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
#ifdef PSB_OPENMP
|
||||
// OpenMP is included and used if and only if the OpenMP version of the matching
|
||||
// is required
|
||||
#include "omp.h"
|
||||
@@ -82,7 +85,6 @@ const int BundleTag = 9; // Predefined tag
|
||||
|
||||
static vector<MilanLongInt> DEFAULT_VECTOR;
|
||||
|
||||
#if !defined(SERIAL_MPI)
|
||||
|
||||
// MPI type map
|
||||
template <typename T>
|
||||
@@ -95,14 +97,12 @@ template <>
|
||||
inline MPI_Datatype TypeMap<double>() { return MPI_DOUBLE; }
|
||||
template <>
|
||||
inline MPI_Datatype TypeMap<float>() { return MPI_FLOAT; }
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if !defined(SERIAL_MPI)
|
||||
|
||||
#define MilanMpiLongInt MPI_LONG_LONG
|
||||
|
||||
@@ -630,8 +630,9 @@ is disabled there is no reason to actually compile or reference them. */
|
||||
MilanReal *ph0_time, MilanReal *ph1_time, MilanReal *ph2_time,
|
||||
MilanLongInt *ph1_card, MilanLongInt *ph2_card);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
#include "amg_config.h"
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
#include <stdlib.h>
|
||||
#include "psb_types.h"
|
||||
|
||||
psb_l_t d_trymatch(psb_l_t rowindex, psb_l_t colindex,
|
||||
psb_l_t nrows_W, psb_l_t *W_i, psb_l_t *W_j, psb_d_t *W_data,
|
||||
psb_l_t *jrowindex, psb_l_t ljrowindex,
|
||||
psb_l_t *jcolindex, psb_l_t ljcolindex, psb_l_t *rmatch)
|
||||
{
|
||||
|
||||
psb_l_t tryrowmatch, trycolmatch;
|
||||
psb_l_t i, j, k, nzrow_W, startj, kindex;
|
||||
psb_d_t cweight, nweight;
|
||||
|
||||
// psb_l_t *W_i = bcm_CSRMatrixI(W);
|
||||
// psb_l_t *W_j = bcm_CSRMatrixJ(W);
|
||||
// psb_l_t nrows_W = bcm_CSRMatrixNumRows(W);
|
||||
// psb_d_t *W_data=bcm_CSRMatrixData(W);
|
||||
|
||||
k=-1;
|
||||
i=0;
|
||||
while (i<ljrowindex && k ==-1)
|
||||
{
|
||||
if(jrowindex[i]==colindex) k=i;
|
||||
i++;
|
||||
}
|
||||
if(k >= 0)
|
||||
{
|
||||
ljrowindex=ljrowindex-1;
|
||||
for(i=k; i<ljrowindex; ++i) jrowindex[i]=jrowindex[i+1];
|
||||
}
|
||||
|
||||
k=-1;
|
||||
i=0;
|
||||
while(i<ljcolindex && k==-1)
|
||||
{
|
||||
if(jcolindex[i]==rowindex) k=i;
|
||||
i++;
|
||||
}
|
||||
if(k >= 0)
|
||||
{
|
||||
ljcolindex=ljcolindex-1;
|
||||
for(i=k; i<ljcolindex; ++i) jcolindex[i]=jcolindex[i+1];
|
||||
}
|
||||
|
||||
nzrow_W=W_i[rowindex+1]-W_i[rowindex];
|
||||
startj=W_i[rowindex];
|
||||
kindex=-1;
|
||||
k=0;
|
||||
while(k<nzrow_W && kindex==-1)
|
||||
{
|
||||
if(W_j[startj+k]==colindex) kindex=startj+k;
|
||||
k++;
|
||||
}
|
||||
cweight=W_data[kindex];
|
||||
|
||||
while((rmatch[rowindex]==-1 && rmatch[colindex]==-1)
|
||||
&& (ljrowindex !=0 || ljcolindex !=0))
|
||||
{
|
||||
|
||||
if (rmatch[rowindex] == -1 && ljrowindex !=0)
|
||||
{
|
||||
tryrowmatch=jrowindex[0];
|
||||
nzrow_W=W_i[rowindex+1]-W_i[rowindex];
|
||||
startj=W_i[rowindex];
|
||||
k=0;
|
||||
kindex=-1;
|
||||
while(k<nzrow_W && kindex==-1)
|
||||
{
|
||||
if(W_j[startj+k]==tryrowmatch) kindex=startj+k;
|
||||
k++;
|
||||
}
|
||||
nweight=W_data[kindex];
|
||||
|
||||
ljrowindex=ljrowindex-1;
|
||||
for(i=0; i<ljrowindex; ++i) jrowindex[i]=jrowindex[i+1];
|
||||
|
||||
if(nweight > cweight && rmatch[tryrowmatch]==-1)
|
||||
{
|
||||
|
||||
nzrow_W=W_i[tryrowmatch+1]-W_i[tryrowmatch];
|
||||
psb_l_t *trymatchindexrow;
|
||||
trymatchindexrow= (psb_l_t *) calloc(nzrow_W, sizeof(psb_l_t));
|
||||
|
||||
startj=W_i[tryrowmatch];
|
||||
for(k=0; k<nzrow_W; ++k) trymatchindexrow[k]=W_j[startj+k];
|
||||
|
||||
d_trymatch(rowindex,tryrowmatch,
|
||||
nrows_W, W_i, W_j, W_data,
|
||||
jrowindex,ljrowindex,
|
||||
trymatchindexrow,nzrow_W,rmatch);
|
||||
free(trymatchindexrow);
|
||||
}
|
||||
}
|
||||
|
||||
if(rmatch[colindex]==-1 && ljcolindex!=0)
|
||||
{
|
||||
trycolmatch=jcolindex[0];
|
||||
nzrow_W=W_i[colindex+1]-W_i[colindex];
|
||||
startj=W_i[colindex];
|
||||
k=0;
|
||||
kindex=-1;
|
||||
while(k<nzrow_W && kindex==-1)
|
||||
{
|
||||
if(W_j[startj+k]==trycolmatch) kindex=startj+k;
|
||||
k++;
|
||||
}
|
||||
nweight=W_data[kindex];
|
||||
|
||||
ljcolindex=ljcolindex-1;
|
||||
for(i=0; i<ljcolindex; ++i) jcolindex[i]=jcolindex[i+1];
|
||||
|
||||
if(nweight > cweight && rmatch[trycolmatch]==-1)
|
||||
{
|
||||
nzrow_W=W_i[trycolmatch+1]-W_i[trycolmatch];
|
||||
psb_l_t *trymatchindexcol;
|
||||
trymatchindexcol= (psb_l_t *) calloc(nzrow_W, sizeof(psb_l_t));
|
||||
|
||||
startj=W_i[trycolmatch];
|
||||
for(k=0; k<nzrow_W; ++k) trymatchindexcol[k]=W_j[startj+k];
|
||||
|
||||
d_trymatch(colindex,trycolmatch,
|
||||
nrows_W, W_i, W_j, W_data,
|
||||
jcolindex,ljcolindex,
|
||||
trymatchindexcol,nzrow_W,rmatch);
|
||||
free(trymatchindexcol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rmatch[rowindex]==-1 & rmatch[colindex]==-1)
|
||||
{
|
||||
rmatch[rowindex]=colindex;
|
||||
rmatch[colindex]=rowindex;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
psb_l_t *d_CSRMatrixHMatch( psb_l_t nrows_B, psb_l_t ncols_B,
|
||||
psb_l_t nnz_B, psb_l_t *B_i,
|
||||
psb_l_t *B_j, psb_d_t *B_data)
|
||||
{
|
||||
|
||||
psb_l_t i, j, k, *rmatch;
|
||||
psb_d_t *c, alpha;
|
||||
psb_l_t jbp, nzrows_B;
|
||||
psb_d_t tmp=0.0;
|
||||
psb_l_t rno, cno, nzrows_cno, startj, ljrowindex, ljjrowindex;
|
||||
psb_l_t *jrowindex, *jjrowindex;
|
||||
|
||||
#if 0
|
||||
psb_l_t *B_i = bcm_CSRMatrixI(B);
|
||||
psb_l_t *B_j = bcm_CSRMatrixJ(B);
|
||||
psb_d_t *B_data = bcm_CSRMatrixData(B);
|
||||
psb_l_t nrows_B = bcm_CSRMatrixNumRows(B);
|
||||
psb_l_t ncols_B = bcm_CSRMatrixNumCols(B);
|
||||
psb_l_t nnz_B = bcm_CSRMatrixNumNonzeros(B);
|
||||
#endif
|
||||
// assert(nrows_B==ncols_B);
|
||||
|
||||
rmatch = (psb_l_t *) calloc(nrows_B, sizeof(psb_l_t));
|
||||
|
||||
for(i=0; i<nrows_B; ++i) rmatch[i]=-1;
|
||||
|
||||
jrowindex = (psb_l_t *) calloc(nrows_B, sizeof(psb_l_t));
|
||||
jjrowindex = (psb_l_t *) calloc(nrows_B, sizeof(psb_l_t));
|
||||
|
||||
jbp=0;
|
||||
for(i=0; i< nrows_B; ++i)
|
||||
{
|
||||
nzrows_B=B_i[i+1]-B_i[i];
|
||||
|
||||
for(j=0; j<nzrows_B; ++j) jrowindex[j]=B_j[jbp+j];
|
||||
for(j=0; j<nzrows_B; ++j)
|
||||
{
|
||||
rno=i;
|
||||
cno=B_j[jbp+j];
|
||||
|
||||
startj=B_i[cno];
|
||||
nzrows_cno=B_i[cno+1]-startj;
|
||||
|
||||
for(k=0; k<nzrows_cno; ++k) jjrowindex[k]=B_j[startj+k];
|
||||
|
||||
if(rmatch[rno] == -1 && rmatch[cno] == -1)
|
||||
d_trymatch(rno,cno,nrows_B,B_i,B_j,B_data,
|
||||
jrowindex,nzrows_B,jjrowindex,nzrows_cno,rmatch);
|
||||
|
||||
}
|
||||
|
||||
jbp=jbp+nzrows_B;
|
||||
}
|
||||
|
||||
free(jrowindex);
|
||||
free(jjrowindex);
|
||||
|
||||
return rmatch;
|
||||
}
|
||||
|
||||
|
||||
void dMatching(psb_l_t NLVer, psb_l_t NLEdge,
|
||||
psb_l_t *verLocPtr, psb_l_t *verLocInd, psb_d_t *edgeLocWeight,
|
||||
psb_l_t *verDistance, psb_l_t *Mate)
|
||||
{
|
||||
psb_l_t *lmate;
|
||||
lmate = d_CSRMatrixHMatch( NLVer, NLVer, NLEdge,
|
||||
verLocPtr, verLocInd,edgeLocWeight);
|
||||
for (psb_l_t i=0; i<NLVer; i++){
|
||||
Mate[i] = lmate[i];
|
||||
}
|
||||
free(lmate);
|
||||
return;
|
||||
}
|
||||
|
||||
void sMatching(psb_l_t NLVer, psb_l_t NLEdge,
|
||||
psb_l_t *verLocPtr, psb_l_t *verLocInd, psb_s_t *edgeLocWeight,
|
||||
psb_l_t *verDistance, psb_l_t *Mate)
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "amg_config.h"
|
||||
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
#include "psb_types.h"
|
||||
void dMatching(psb_l_t NLVer, psb_l_t NLEdge,
|
||||
psb_l_t *verLocPtr, psb_l_t *verLocInd, psb_d_t *edgeLocWeight,
|
||||
psb_l_t *verDistance, psb_l_t *Mate);
|
||||
void sMatching(psb_l_t NLVer, psb_l_t NLEdge,
|
||||
psb_l_t *verLocPtr, psb_l_t *verLocInd, psb_s_t *edgeLocWeight,
|
||||
psb_l_t *verDistance, psb_l_t *Mate);
|
||||
#endif
|
||||
+3
-3
@@ -70,7 +70,7 @@
|
||||
Statistics: ph1_card, ph2_card : Size: |P| number of processes in the comm-world (number of matched edges in Phase 1 and Phase 2)
|
||||
*/
|
||||
|
||||
#ifdef SERIAL_MPI
|
||||
#ifdef PSB_SERIAL_MPI
|
||||
#else
|
||||
|
||||
// DOUBLE PRECISION VERSION
|
||||
@@ -86,7 +86,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC(
|
||||
MilanReal* msgPercent,
|
||||
MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time,
|
||||
MilanLongInt* ph1_card, MilanLongInt* ph2_card ) {
|
||||
#if !defined(SERIAL_MPI)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#ifdef PRINT_DEBUG_INFO_
|
||||
cout<<"\n("<<myRank<<")Within algoEdgeApproxDominatingEdgesLinearSearchMessageBundling()"; fflush(stdout);
|
||||
#endif
|
||||
@@ -1313,7 +1313,7 @@ void salgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateC(
|
||||
MilanReal* msgPercent,
|
||||
MilanReal* ph0_time, MilanReal* ph1_time, MilanReal* ph2_time,
|
||||
MilanLongInt* ph1_card, MilanLongInt* ph2_card ) {
|
||||
#if !defined(SERIAL_MPI)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#ifdef PRINT_DEBUG_INFO_
|
||||
cout<<"\n("<<myRank<<")Within algoEdgeApproxDominatingEdgesLinearSearchMessageBundling()"; fflush(stdout);
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -70,7 +70,7 @@
|
||||
Statistics: ph1_card, ph2_card : Size: |P| number of processes in the comm-world (number of matched edges in Phase 1 and Phase 2)
|
||||
*/
|
||||
//#define DEBUG_HANG_
|
||||
#ifdef SERIAL_MPI
|
||||
#ifdef PSB_SERIAL_MPI
|
||||
#else
|
||||
|
||||
// DOUBLE PRECISION VERSION
|
||||
@@ -102,7 +102,7 @@ void dalgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
||||
* i+1-th value is the position of the first element on the i+1-th row
|
||||
*/
|
||||
|
||||
#if !defined(SERIAL_MPI)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#ifdef PRINT_DEBUG_INFO_
|
||||
cout << "\n(" << myRank << ")Within algoEdgeApproxDominatingEdgesLinearSearchMessageBundling()";
|
||||
fflush(stdout);
|
||||
@@ -583,7 +583,7 @@ void salgoDistEdgeApproxDomEdgesLinearSearchMesgBndlSmallMateCMP(
|
||||
* i+1-th value is the position of the first element on the i+1-th row
|
||||
*/
|
||||
|
||||
#if !defined(SERIAL_MPI)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#ifdef PRINT_DEBUG_INFO_
|
||||
cout << "\n(" << myRank << ")Within algoEdgeApproxDominatingEdgesLinearSearchMessageBundling()";
|
||||
fflush(stdout);
|
||||
|
||||
@@ -98,11 +98,7 @@ subroutine amg_d_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,&
|
||||
& ac,desc_ac, op_prol,op_restr,info)
|
||||
use psb_base_mod
|
||||
use amg_base_prec_type
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_inner_mat_asb
|
||||
#endif
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(amg_dml_parms), intent(inout) :: parms
|
||||
@@ -133,8 +129,6 @@ subroutine amg_d_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,&
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt,me,np)
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
if (debug) write(0,*) me,' ',trim(name),' Start:',&
|
||||
& allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr)
|
||||
|
||||
@@ -146,16 +140,17 @@ subroutine amg_d_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,&
|
||||
case(amg_repl_mat_)
|
||||
!
|
||||
!
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='no repl coarse_mat_ here')
|
||||
goto 9999
|
||||
|
||||
if (np>1) then
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='no repl coarse_mat_ here')
|
||||
goto 9999
|
||||
end if
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='invalid amg_coarse_mat_')
|
||||
goto 9999
|
||||
end select
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -98,11 +98,7 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
|
||||
& ac,desc_ac, op_prol,op_restr,info)
|
||||
use psb_base_mod
|
||||
use amg_base_prec_type
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_mat_asb
|
||||
#endif
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(amg_dml_parms), intent(inout) :: parms
|
||||
@@ -135,8 +131,6 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
|
||||
return
|
||||
end if
|
||||
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
if (debug) write(0,*) me,' ',trim(name),' Start:',&
|
||||
& allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr)
|
||||
|
||||
@@ -199,7 +193,7 @@ subroutine amg_d_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
|
||||
call psb_errpush(info,name,a_err='invalid amg_coarse_mat_')
|
||||
goto 9999
|
||||
end select
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -135,11 +135,7 @@ subroutine amg_d_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,&
|
||||
use psb_base_mod
|
||||
use amg_d_inner_mod
|
||||
use amg_base_prec_type
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_mat_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -176,7 +172,6 @@ subroutine amg_d_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,&
|
||||
! algorithm specified by
|
||||
!
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call clean_shortcuts(ag)
|
||||
!
|
||||
! When requesting smoothed aggregation we cannot use the
|
||||
@@ -212,14 +207,12 @@ subroutine amg_d_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,&
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='Inner aggrmat asb')
|
||||
goto 9999
|
||||
end if
|
||||
#endif
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
return
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
contains
|
||||
subroutine clean_shortcuts(ag)
|
||||
@@ -248,5 +241,4 @@ contains
|
||||
end if
|
||||
end if
|
||||
end subroutine clean_shortcuts
|
||||
#endif
|
||||
end subroutine amg_d_parmatch_aggregator_mat_bld
|
||||
|
||||
@@ -47,11 +47,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
use psb_base_mod
|
||||
use amg_base_prec_type
|
||||
use amg_d_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_aggregator_build_tprol
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(amg_d_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -120,8 +116,6 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
& amg_aggr_ord_nat_,is_legal_ml_aggr_ord)
|
||||
call amg_check_def(parms%aggr_thresh,'Aggr_Thresh',dzero,is_legal_d_aggr_thrs)
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
match_algorithm = ag%matching_alg
|
||||
n_sweeps = ag%n_sweeps
|
||||
if (2**n_sweeps /= ag%orig_aggr_size) then
|
||||
@@ -466,7 +460,7 @@ subroutine amg_d_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_bootCMatch_if')
|
||||
goto 9999
|
||||
end if
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -110,11 +110,7 @@ subroutine amg_d_parmatch_smth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
use amg_base_prec_type
|
||||
use amg_d_inner_mod
|
||||
use amg_d_base_aggregator_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_smth_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -194,8 +190,6 @@ subroutine amg_d_parmatch_smth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
|
||||
if (do_timings) call psb_tic(idx_phase1)
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
naggr = nlaggr(me+1)
|
||||
ntaggr = sum(nlaggr)
|
||||
naggrm1 = sum(nlaggr(1:me))
|
||||
@@ -403,7 +397,7 @@ subroutine amg_d_parmatch_smth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done smooth_aggregate '
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,11 +99,7 @@ subroutine amg_d_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
& ac,desc_ac,op_prol,op_restr,t_prol,info)
|
||||
use psb_base_mod
|
||||
use amg_d_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_spmm_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -140,7 +136,6 @@ subroutine amg_d_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call a%cp_to(acsr)
|
||||
|
||||
call amg_d_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,&
|
||||
@@ -154,7 +149,7 @@ subroutine amg_d_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done spmm_bld '
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,11 +99,7 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
& ac,desc_ac,op_prol,op_restr,t_prol,info)
|
||||
use psb_base_mod
|
||||
use amg_d_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_spmm_bld_inner
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -139,7 +135,6 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt, me, np)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
@@ -163,7 +158,6 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
naggrm1 = sum(nlaggr(1:me))
|
||||
naggrp1 = sum(nlaggr(1:me+1))
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
!
|
||||
! Here T_PROL should be arriving with GLOBAL indices on the cols
|
||||
! and LOCAL indices on the rows.
|
||||
@@ -203,11 +197,10 @@ subroutine amg_d_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done smooth_aggregate '
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,11 +99,7 @@ subroutine amg_d_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
& ac,desc_ac,op_prol,op_restr,t_prol,info)
|
||||
use psb_base_mod
|
||||
use amg_d_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_spmm_bld_ov
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -141,8 +137,6 @@ subroutine amg_d_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
call a%mv_to(acsr)
|
||||
|
||||
call amg_d_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,&
|
||||
@@ -158,7 +152,6 @@ subroutine amg_d_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done spmm_bld '
|
||||
#endif
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -109,11 +109,7 @@ subroutine amg_d_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
use amg_base_prec_type
|
||||
use amg_d_inner_mod
|
||||
use amg_d_base_aggregator_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_d_parmatch_aggregator_mod, amg_protect_name => amg_d_parmatch_unsmth_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -168,7 +164,6 @@ subroutine amg_d_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
nglob = desc_a%get_global_rows()
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
@@ -209,7 +204,8 @@ subroutine amg_d_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
call op_prol%mv_from(coo_prol)
|
||||
|
||||
if (debug) write(0,*) me,' ',trim(name),' After mv_from',psb_get_errstatus()
|
||||
if (debug) write(0,*) me,' ',trim(name),' ',ac%get_fmt(),ac%get_nrows(),ac%get_ncols(),ac%get_nzeros(),naggr,ntaggr
|
||||
if (debug) write(0,*) me,' ',trim(name),' ',ac%get_fmt(),ac%get_nrows(),&
|
||||
& ac%get_ncols(),ac%get_nzeros(),naggr,ntaggr
|
||||
! write(0,*) me,' ',trim(name),' Final AC newstyle ',ac%get_fmt(),ac%get_nrows(),ac%get_ncols(),ac%get_nzeros()
|
||||
|
||||
if (debug) then
|
||||
@@ -236,7 +232,6 @@ subroutine amg_d_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
#endif
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -98,11 +98,7 @@ subroutine amg_s_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,&
|
||||
& ac,desc_ac, op_prol,op_restr,info)
|
||||
use psb_base_mod
|
||||
use amg_base_prec_type
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_inner_mat_asb
|
||||
#endif
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(amg_sml_parms), intent(inout) :: parms
|
||||
@@ -133,8 +129,6 @@ subroutine amg_s_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,&
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt,me,np)
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
if (debug) write(0,*) me,' ',trim(name),' Start:',&
|
||||
& allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr)
|
||||
|
||||
@@ -146,16 +140,17 @@ subroutine amg_s_parmatch_aggregator_inner_mat_asb(ag,parms,a,desc_a,&
|
||||
case(amg_repl_mat_)
|
||||
!
|
||||
!
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='no repl coarse_mat_ here')
|
||||
goto 9999
|
||||
|
||||
if (np>1) then
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='no repl coarse_mat_ here')
|
||||
goto 9999
|
||||
end if
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
call psb_errpush(info,name,a_err='invalid amg_coarse_mat_')
|
||||
goto 9999
|
||||
end select
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -98,11 +98,7 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
|
||||
& ac,desc_ac, op_prol,op_restr,info)
|
||||
use psb_base_mod
|
||||
use amg_base_prec_type
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_mat_asb
|
||||
#endif
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
type(amg_sml_parms), intent(inout) :: parms
|
||||
@@ -135,8 +131,6 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
|
||||
return
|
||||
end if
|
||||
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
if (debug) write(0,*) me,' ',trim(name),' Start:',&
|
||||
& allocated(ag%ac),allocated(ag%desc_ac), allocated(ag%prol),allocated(ag%restr)
|
||||
|
||||
@@ -199,7 +193,7 @@ subroutine amg_s_parmatch_aggregator_mat_asb(ag,parms,a,desc_a,&
|
||||
call psb_errpush(info,name,a_err='invalid amg_coarse_mat_')
|
||||
goto 9999
|
||||
end select
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -135,11 +135,7 @@ subroutine amg_s_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,&
|
||||
use psb_base_mod
|
||||
use amg_s_inner_mod
|
||||
use amg_base_prec_type
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_mat_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -176,7 +172,6 @@ subroutine amg_s_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,&
|
||||
! algorithm specified by
|
||||
!
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call clean_shortcuts(ag)
|
||||
!
|
||||
! When requesting smoothed aggregation we cannot use the
|
||||
@@ -212,14 +207,12 @@ subroutine amg_s_parmatch_aggregator_mat_bld(ag,parms,a,desc_a,ilaggr,nlaggr,&
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='Inner aggrmat asb')
|
||||
goto 9999
|
||||
end if
|
||||
#endif
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
9999 call psb_error_handler(err_act)
|
||||
return
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
contains
|
||||
subroutine clean_shortcuts(ag)
|
||||
@@ -248,5 +241,4 @@ contains
|
||||
end if
|
||||
end if
|
||||
end subroutine clean_shortcuts
|
||||
#endif
|
||||
end subroutine amg_s_parmatch_aggregator_mat_bld
|
||||
|
||||
@@ -47,11 +47,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
use psb_base_mod
|
||||
use amg_base_prec_type
|
||||
use amg_s_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_aggregator_build_tprol
|
||||
#endif
|
||||
use iso_c_binding
|
||||
implicit none
|
||||
class(amg_s_parmatch_aggregator_type), target, intent(inout) :: ag
|
||||
@@ -120,8 +116,6 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
& amg_aggr_ord_nat_,is_legal_ml_aggr_ord)
|
||||
call amg_check_def(parms%aggr_thresh,'Aggr_Thresh',szero,is_legal_s_aggr_thrs)
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
match_algorithm = ag%matching_alg
|
||||
n_sweeps = ag%n_sweeps
|
||||
if (2**n_sweeps /= ag%orig_aggr_size) then
|
||||
@@ -466,7 +460,7 @@ subroutine amg_s_parmatch_aggregator_build_tprol(ag,parms,ag_data,&
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_bootCMatch_if')
|
||||
goto 9999
|
||||
end if
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -110,11 +110,7 @@ subroutine amg_s_parmatch_smth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
use amg_base_prec_type
|
||||
use amg_s_inner_mod
|
||||
use amg_s_base_aggregator_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_smth_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -194,8 +190,6 @@ subroutine amg_s_parmatch_smth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
|
||||
if (do_timings) call psb_tic(idx_phase1)
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
naggr = nlaggr(me+1)
|
||||
ntaggr = sum(nlaggr)
|
||||
naggrm1 = sum(nlaggr(1:me))
|
||||
@@ -403,7 +397,7 @@ subroutine amg_s_parmatch_smth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done smooth_aggregate '
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,11 +99,7 @@ subroutine amg_s_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
& ac,desc_ac,op_prol,op_restr,t_prol,info)
|
||||
use psb_base_mod
|
||||
use amg_s_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_spmm_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -140,7 +136,6 @@ subroutine amg_s_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call a%cp_to(acsr)
|
||||
|
||||
call amg_s_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,&
|
||||
@@ -154,7 +149,7 @@ subroutine amg_s_parmatch_spmm_bld(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done spmm_bld '
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,11 +99,7 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
& ac,desc_ac,op_prol,op_restr,t_prol,info)
|
||||
use psb_base_mod
|
||||
use amg_s_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_spmm_bld_inner
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -139,7 +135,6 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
info=psb_success_
|
||||
call psb_erractionsave(err_act)
|
||||
|
||||
|
||||
ictxt = desc_a%get_context()
|
||||
call psb_info(ictxt, me, np)
|
||||
debug_unit = psb_get_debug_unit()
|
||||
@@ -163,7 +158,6 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
naggrm1 = sum(nlaggr(1:me))
|
||||
naggrp1 = sum(nlaggr(1:me+1))
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
!
|
||||
! Here T_PROL should be arriving with GLOBAL indices on the cols
|
||||
! and LOCAL indices on the rows.
|
||||
@@ -203,11 +197,10 @@ subroutine amg_s_parmatch_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,&
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done smooth_aggregate '
|
||||
#endif
|
||||
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -99,11 +99,7 @@ subroutine amg_s_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
& ac,desc_ac,op_prol,op_restr,t_prol,info)
|
||||
use psb_base_mod
|
||||
use amg_s_inner_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_spmm_bld_ov
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -141,8 +137,6 @@ subroutine amg_s_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
debug_unit = psb_get_debug_unit()
|
||||
debug_level = psb_get_debug_level()
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
call a%mv_to(acsr)
|
||||
|
||||
call amg_s_parmatch_spmm_bld_inner(acsr,desc_a,ilaggr,nlaggr,parms,&
|
||||
@@ -158,7 +152,6 @@ subroutine amg_s_parmatch_spmm_bld_ov(a,desc_a,ilaggr,nlaggr,parms,&
|
||||
if (debug_level >= psb_debug_outer_) &
|
||||
& write(debug_unit,*) me,' ',trim(name),&
|
||||
& 'Done spmm_bld '
|
||||
#endif
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -109,11 +109,7 @@ subroutine amg_s_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
use amg_base_prec_type
|
||||
use amg_s_inner_mod
|
||||
use amg_s_base_aggregator_mod
|
||||
#if defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#else
|
||||
use amg_s_parmatch_aggregator_mod, amg_protect_name => amg_s_parmatch_unsmth_bld
|
||||
#endif
|
||||
implicit none
|
||||
|
||||
! Arguments
|
||||
@@ -168,7 +164,6 @@ subroutine amg_s_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
nglob = desc_a%get_global_rows()
|
||||
nrow = desc_a%get_local_rows()
|
||||
ncol = desc_a%get_local_cols()
|
||||
@@ -209,7 +204,8 @@ subroutine amg_s_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
call op_prol%mv_from(coo_prol)
|
||||
|
||||
if (debug) write(0,*) me,' ',trim(name),' After mv_from',psb_get_errstatus()
|
||||
if (debug) write(0,*) me,' ',trim(name),' ',ac%get_fmt(),ac%get_nrows(),ac%get_ncols(),ac%get_nzeros(),naggr,ntaggr
|
||||
if (debug) write(0,*) me,' ',trim(name),' ',ac%get_fmt(),ac%get_nrows(),&
|
||||
& ac%get_ncols(),ac%get_nzeros(),naggr,ntaggr
|
||||
! write(0,*) me,' ',trim(name),' Final AC newstyle ',ac%get_fmt(),ac%get_nrows(),ac%get_ncols(),ac%get_nzeros()
|
||||
|
||||
if (debug) then
|
||||
@@ -236,7 +232,6 @@ subroutine amg_s_parmatch_unsmth_bld(dol1smoothing,ag,a,desc_a,ilaggr,nlaggr,&
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
#endif
|
||||
call psb_erractionrestore(err_act)
|
||||
return
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "MatchBoxPC.h"
|
||||
// TODO comment
|
||||
#if !defined(SERIAL_MPI)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
void clean(MilanLongInt NLVer,
|
||||
MilanInt myRank,
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* @param edgeLocWeight
|
||||
* @return
|
||||
*/
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
MilanLongInt firstComputeCandidateMateD(MilanLongInt adj1,
|
||||
MilanLongInt adj2,
|
||||
@@ -136,3 +137,4 @@ MilanLongInt computeCandidateMateS(MilanLongInt adj1,
|
||||
return w;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,10 @@
|
||||
|
||||
#ifndef _static_Queue_
|
||||
#define _static_Queue_
|
||||
#include "amg_config.h"
|
||||
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "primitiveDataTypeDefinitions.h"
|
||||
#include "preProcessorDirectives.h"
|
||||
|
||||
@@ -199,3 +202,4 @@ class staticQueue
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#include "amg_config.h"
|
||||
#include "MatchBoxPC.h"
|
||||
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
void extractUChunk(
|
||||
vector<MilanLongInt> &UChunkBeingProcessed,
|
||||
vector<MilanLongInt> &U,
|
||||
@@ -28,3 +32,4 @@ void extractUChunk(
|
||||
|
||||
} // End of critical U // End of critical U
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "amg_config.h"
|
||||
#include "MatchBoxPC.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
/// Find the owner of a ghost node:
|
||||
MilanInt findOwnerOfGhost(MilanLongInt vtxIndex, MilanLongInt *mVerDistance,
|
||||
MilanInt myRank, MilanInt numProcs)
|
||||
@@ -26,3 +28,4 @@ MilanInt findOwnerOfGhost(MilanLongInt vtxIndex, MilanLongInt *mVerDistance,
|
||||
|
||||
return Current;
|
||||
} // End of findOwnerOfGhost()
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "amg_config.h"
|
||||
#include "MatchBoxPC.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
void initialize(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
MilanLongInt StartIndex, MilanLongInt EndIndex,
|
||||
MilanLongInt *numGhostEdges,
|
||||
@@ -301,3 +304,4 @@ void initialize(MilanLongInt NLVer, MilanLongInt NLEdge,
|
||||
} // End of single region
|
||||
} // End of parallel region
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "amg_config.h"
|
||||
#include "MatchBoxPC.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
/**
|
||||
* //TODO documentation
|
||||
* @param k
|
||||
@@ -43,3 +46,4 @@ bool isAlreadyMatched(MilanLongInt node,
|
||||
|
||||
return val >= 0; // Already matched
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "amg_config.h"
|
||||
#include "MatchBoxPC.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
void PARALLEL_COMPUTE_CANDIDATE_MATE_BD(MilanLongInt NLVer,
|
||||
MilanLongInt *verLocPtr,
|
||||
@@ -53,4 +55,4 @@ void PARALLEL_COMPUTE_CANDIDATE_MATE_BS(MilanLongInt NLVer,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
#ifndef _preprocessor_Directives_
|
||||
#define _preprocessor_Directives_
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
//I/O
|
||||
#include <iostream>
|
||||
@@ -72,10 +74,10 @@
|
||||
#include <map>
|
||||
|
||||
//MPI:
|
||||
#if !defined(SERIAL_MPI)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "mpi.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
#ifndef _primitiveDataType_Definition_
|
||||
#define _primitiveDataType_Definition_
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
|
||||
#include "preProcessorDirectives.h"
|
||||
|
||||
@@ -152,5 +154,5 @@ const float FMINUS_INFINITY = -FPLUS_INFINITY;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
void PROCESS_CROSS_EDGE(MilanLongInt *edge,
|
||||
MilanLongInt *S)
|
||||
@@ -21,3 +23,4 @@ void PROCESS_CROSS_EDGE(MilanLongInt *edge,
|
||||
|
||||
// End: PARALLEL_PROCESS_CROSS_EDGE_B
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
void PARALLEL_PROCESS_EXPOSED_VERTEX_BD(MilanLongInt NLVer,
|
||||
MilanLongInt *candidateMate,
|
||||
@@ -367,3 +369,4 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_BS(MilanLongInt NLVer,
|
||||
} // End of parallel region
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
void processMatchedVerticesD(
|
||||
MilanLongInt NLVer,
|
||||
@@ -583,3 +585,4 @@ void processMatchedVerticesS(
|
||||
} // End of parallel region
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
//#define DEBUG_HANG_
|
||||
void processMatchedVerticesAndSendMessagesD(
|
||||
@@ -589,3 +591,4 @@ void processMatchedVerticesAndSendMessagesS(
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
//#define DEBUG_HANG_
|
||||
#if !defined(SERIAL_MPI)
|
||||
|
||||
void processMessagesD(
|
||||
MilanLongInt NLVer,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
void queuesTransfer(vector<MilanLongInt> &U,
|
||||
vector<MilanLongInt> &privateU,
|
||||
@@ -31,3 +33,4 @@ void queuesTransfer(vector<MilanLongInt> &U,
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "amg_config.h"
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#include "MatchBoxPC.h"
|
||||
void sendBundledMessages(MilanLongInt *numGhostEdges,
|
||||
MilanInt *BufferSize,
|
||||
@@ -154,7 +156,7 @@ void sendBundledMessages(MilanLongInt *numGhostEdges,
|
||||
|
||||
#pragma omp task depend(inout : OneMessageSize, *BufferSize) depend(out : numMessagesToSend) depend(in : *numGhostEdges)
|
||||
{
|
||||
|
||||
|
||||
#ifdef PRINT_DEBUG_INFO_
|
||||
cout << "\n(" << myRank << ")Number of Ghost edges = " << *numGhostEdges;
|
||||
cout << "\n(" << myRank << ")Total number of potential message X 2 = " << *numGhostEdges * 2;
|
||||
@@ -206,3 +208,4 @@ void sendBundledMessages(MilanLongInt *numGhostEdges,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -252,15 +252,9 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_c_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_c_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (PSB_SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
@@ -42,9 +42,7 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_d_base_aggregator_mod
|
||||
use amg_d_dec_aggregator_mod
|
||||
use amg_d_symdec_aggregator_mod
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
use amg_d_parmatch_aggregator_mod
|
||||
#endif
|
||||
use amg_d_poly_smoother
|
||||
use amg_d_jac_smoother
|
||||
use amg_d_as_smoother
|
||||
@@ -280,17 +278,11 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_d_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_d_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
case('COUP','COUPLED')
|
||||
allocate(amg_d_parmatch_aggregator_type :: lv%aggr, stat=info)
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (PSB_SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
@@ -42,9 +42,7 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
use amg_s_base_aggregator_mod
|
||||
use amg_s_dec_aggregator_mod
|
||||
use amg_s_symdec_aggregator_mod
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
use amg_s_parmatch_aggregator_mod
|
||||
#endif
|
||||
use amg_s_poly_smoother
|
||||
use amg_s_jac_smoother
|
||||
use amg_s_as_smoother
|
||||
@@ -260,17 +258,11 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_s_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_s_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
case('COUP','COUPLED')
|
||||
allocate(amg_s_parmatch_aggregator_type :: lv%aggr, stat=info)
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (PSB_SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
@@ -272,15 +272,9 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
|
||||
allocate(amg_z_dec_aggregator_type :: lv%aggr, stat=info)
|
||||
case('SYMDEC')
|
||||
allocate(amg_z_symdec_aggregator_type :: lv%aggr, stat=info)
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
#endif
|
||||
case default
|
||||
info = psb_err_internal_error_
|
||||
#if !defined(PSB_SERIAL_MPI)
|
||||
call psb_errpush(info,name,a_err='Unsupported PAR_AGGR_ALG')
|
||||
#else
|
||||
call psb_errpush(info,name,a_err='PAR_AGGR_ALG unsupported (PSB_SERIAL_MPI on)')
|
||||
#endif
|
||||
goto 9999
|
||||
end select
|
||||
if (info == psb_success_) call lv%aggr%default()
|
||||
|
||||
@@ -58,8 +58,8 @@ VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MUL
|
||||
-3 ! Max Number of levels in a multilevel preconditioner; if <0, lib default
|
||||
-3 ! Target coarse matrix size per process; if <0, lib default
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC, COUPLED
|
||||
SOC1 ! aggregation measure SOC1, MATCHBOXP
|
||||
COUPLED ! Parallel aggregation: DEC, SYMDEC, COUPLED
|
||||
MATCHBOXP ! aggregation measure SOC1, MATCHBOXP
|
||||
8 ! Requested size of the aggregates for MATCHBOXP
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
|
||||
Reference in New Issue
Block a user