Disable MATCHBOX with SERIAL_MPI and add error message

maint-1.1
sfilippone 1 year ago
parent 5387e206b1
commit c2fd0ac66d

@ -42,7 +42,6 @@
#include <stdlib.h>
#if !defined(SERIAL_MPI)
#include <mpi.h>
#endif
#include "MatchBoxPC.h"
#ifdef __cplusplus
@ -127,3 +126,4 @@ void sMatchBoxPC(MilanLongInt NLVer, MilanLongInt NLEdge,
#ifdef __cplusplus
}
#endif
#endif

@ -78,6 +78,8 @@ const int BundleTag = 9; // Predefined tag
static vector<MilanLongInt> DEFAULT_VECTOR;
#if !defined(SERIAL_MPI)
// MPI type map
template <typename T>
MPI_Datatype TypeMap();
@ -89,6 +91,7 @@ template <>
inline MPI_Datatype TypeMap<double>() { return MPI_DOUBLE; }
template <>
inline MPI_Datatype TypeMap<float>() { return MPI_FLOAT; }
#endif
#ifdef __cplusplus
extern "C"

@ -1,6 +1,7 @@
#include "MatchBoxPC.h"
// TODO comment
#if !defined(SERIAL_MPI)
void clean(MilanLongInt NLVer,
MilanInt myRank,
@ -89,3 +90,4 @@ void clean(MilanLongInt NLVer,
}
}
}
#endif

@ -9,6 +9,8 @@
* @param edgeLocWeight
* @return
*/
#if !defined(SERIAL_MPI)
MilanLongInt firstComputeCandidateMate(MilanLongInt adj1,
MilanLongInt adj2,
MilanLongInt *verLocInd,
@ -71,3 +73,4 @@ MilanLongInt computeCandidateMate(MilanLongInt adj1,
return w;
}
#endif

@ -1,4 +1,5 @@
#include "MatchBoxPC.h"
#if !defined(SERIAL_MPI)
void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
MilanLongInt *verLocPtr,
@ -25,3 +26,4 @@ void PARALLEL_COMPUTE_CANDIDATE_MATE_B(MilanLongInt NLVer,
}
}
}
#endif

@ -1,4 +1,5 @@
#include "MatchBoxPC.h"
#if !defined(SERIAL_MPI)
void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
MilanLongInt *candidateMate,
@ -193,3 +194,4 @@ void PARALLEL_PROCESS_EXPOSED_VERTEX_B(MilanLongInt NLVer,
} // End of parallel region
}
#endif

@ -1,5 +1,6 @@
#include "MatchBoxPC.h"
#if !defined(SERIAL_MPI)
void processMatchedVertices(
MilanLongInt NLVer,
vector<MilanLongInt> &UChunkBeingProcessed,
@ -292,3 +293,4 @@ void processMatchedVertices(
#endif
} // End of parallel region
}
#endif

@ -1,5 +1,6 @@
#include "MatchBoxPC.h"
//#define DEBUG_HANG_
#if !defined(SERIAL_MPI)
void processMatchedVerticesAndSendMessages(
MilanLongInt NLVer,
vector<MilanLongInt> &UChunkBeingProcessed,
@ -306,3 +307,4 @@ void processMatchedVerticesAndSendMessages(
cout << myRank<<" Done sending messages"<<endl;
#endif
}
#endif

@ -1,5 +1,6 @@
#include "MatchBoxPC.h"
//#define DEBUG_HANG_
#if !defined(SERIAL_MPI)
void processMessages(
MilanLongInt NLVer,
@ -313,3 +314,4 @@ void processMessages(
return;
}
#endif

@ -1,5 +1,5 @@
#include "MatchBoxPC.h"
#if !defined(SERIAL_MPI)
void sendBundledMessages(MilanLongInt *numGhostEdges,
MilanInt *BufferSize,
MilanLongInt *Buffer,
@ -207,3 +207,4 @@ void sendBundledMessages(MilanLongInt *numGhostEdges,
}
}
}
#endif

@ -42,6 +42,8 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
use amg_c_base_aggregator_mod
use amg_c_dec_aggregator_mod
use amg_c_symdec_aggregator_mod
#if !defined(SERIAL_MPI)
#endif
use amg_c_jac_smoother
use amg_c_as_smoother
use amg_c_diag_solver
@ -246,6 +248,8 @@ subroutine amg_c_base_onelev_csetc(lv,what,val,info,pos,idx)
if (info == 0) deallocate(lv%aggr,stat=info)
if (info /= 0) then
info = psb_err_internal_error_
call psb_errpush(info,name,a_err='aggregator deallocation?')
goto 9999
return
end if
end if
@ -255,8 +259,16 @@ 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(SERIAL_MPI)
#endif
case default
info = psb_err_internal_error_
#if !defined(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 (SERIAL_MPI on)')
#endif
goto 9999
end select
if (info == psb_success_) call lv%aggr%default()

@ -42,7 +42,9 @@ 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(SERIAL_MPI)
use amg_d_parmatch_aggregator_mod
#endif
use amg_d_jac_smoother
use amg_d_as_smoother
use amg_d_diag_solver
@ -267,6 +269,8 @@ subroutine amg_d_base_onelev_csetc(lv,what,val,info,pos,idx)
if (info == 0) deallocate(lv%aggr,stat=info)
if (info /= 0) then
info = psb_err_internal_error_
call psb_errpush(info,name,a_err='aggregator deallocation?')
goto 9999
return
end if
end if
@ -276,10 +280,18 @@ 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(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(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 (SERIAL_MPI on)')
#endif
goto 9999
end select
if (info == psb_success_) call lv%aggr%default()

@ -42,7 +42,9 @@ 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(SERIAL_MPI)
use amg_s_parmatch_aggregator_mod
#endif
use amg_s_jac_smoother
use amg_s_as_smoother
use amg_s_diag_solver
@ -247,6 +249,8 @@ subroutine amg_s_base_onelev_csetc(lv,what,val,info,pos,idx)
if (info == 0) deallocate(lv%aggr,stat=info)
if (info /= 0) then
info = psb_err_internal_error_
call psb_errpush(info,name,a_err='aggregator deallocation?')
goto 9999
return
end if
end if
@ -256,10 +260,18 @@ 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(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(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 (SERIAL_MPI on)')
#endif
goto 9999
end select
if (info == psb_success_) call lv%aggr%default()

@ -42,6 +42,8 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
use amg_z_base_aggregator_mod
use amg_z_dec_aggregator_mod
use amg_z_symdec_aggregator_mod
#if !defined(SERIAL_MPI)
#endif
use amg_z_jac_smoother
use amg_z_as_smoother
use amg_z_diag_solver
@ -266,6 +268,8 @@ subroutine amg_z_base_onelev_csetc(lv,what,val,info,pos,idx)
if (info == 0) deallocate(lv%aggr,stat=info)
if (info /= 0) then
info = psb_err_internal_error_
call psb_errpush(info,name,a_err='aggregator deallocation?')
goto 9999
return
end if
end if
@ -275,8 +279,16 @@ 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(SERIAL_MPI)
#endif
case default
info = psb_err_internal_error_
#if !defined(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 (SERIAL_MPI on)')
#endif
goto 9999
end select
if (info == psb_success_) call lv%aggr%default()

Loading…
Cancel
Save