Skip to content
Snippets Groups Projects
Commit b5ee5b36 authored by Martin Nolte's avatar Martin Nolte
Browse files

make headercheck pass

parent 5e9961b1
No related branches found
No related tags found
No related merge requests found
...@@ -11,62 +11,63 @@ ...@@ -11,62 +11,63 @@
extern "C" { extern "C" {
#include <parmetis.h> #include <parmetis.h>
} }
#else // #if HAVE_PARMETIS
#else static const char parmetmess[]
static const char parmetmess [] = = "**INFO Due to license reasons the library ParMETIS is\n"
"**INFO Due to license reasons the library ParMETIS is\n" " not part of the ALUGrid library distribution. \n"
" not part of the ALUGrid library distribution. \n" " To use this feature get a copy of the ParMETIS library \n"
" To use this feature get a copy of the ParMETIS library \n" " (see http://www-users.cs.umn.edu/~karypis/metis/metis/ )\n"
" (see http://www-users.cs.umn.edu/~karypis/metis/metis/ )\n" " and re-configure the ALUGrid library with the \n"
" and re-configure the ALUGrid library with the \n" " --with-parmetis=PATH_TO_ParMETIS option, \n"
" --with-parmetis=PATH_TO_ParMETIS option, \n" " or choose another Graph partitioning method. \n"
" or choose another Graph partitioning method. \n" " Exiting program, bye! \n";
" Exiting program, bye! \n"; #endif // #else // #if HAVE_PARMETIS
#endif
namespace ALUGridParMETIS namespace ALUGridParMETIS
{ {
typedef ALUGridMETIS :: idxtype idxtype ; typedef ALUGridMETIS :: idxtype idxtype ;
typedef ALUGridMETIS :: realtype realtype ; typedef ALUGridMETIS :: realtype realtype ;
inline void CALL_ParMETIS_V3_PartKway( inline void CALL_ParMETIS_V3_PartKway(
idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *ncon, idxtype *nparts, idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *ncon, idxtype *nparts,
realtype *tpwgts, realtype *ubvec, idxtype *options, idxtype *edgecut, idxtype *part, realtype *tpwgts, realtype *ubvec, idxtype *options, idxtype *edgecut, idxtype *part,
MpAccessGlobal &mpa ) MpAccessGlobal &mpa )
{ {
#if HAVE_PARMETIS #if HAVE_PARMETIS
// get communincator (see mpAccess_MPI.cc) // get communincator (see mpAccess_MPI.cc)
MPI_Comm comm = getMPICommunicator( mpa.communicator() ); MPI_Comm comm = getMPICommunicator( mpa.communicator() );
:: ParMETIS_V3_PartKway(vtxdist, xadj, adjncy, vwgt, adjwgt, :: ParMETIS_V3_PartKway(vtxdist, xadj, adjncy, vwgt, adjwgt,
wgtflag, numflag, ncon, nparts, tpwgts, wgtflag, numflag, ncon, nparts, tpwgts,
ubvec, options, edgecut, part, &comm ) ; ubvec, options, edgecut, part, &comm ) ;
#else // #if HAVE_PARMETIS #else // #if HAVE_PARMETIS
std::cerr << "**ERROR The use of ParMETIS is not supported, when the ParMETIS library is missing! in: " << __FILE__ << " line: " << __LINE__ << "\n"; std::cerr << "**ERROR The use of ParMETIS is not supported, when the ParMETIS library is missing! in: " << __FILE__ << " line: " << __LINE__ << "\n";
std::cerr << parmetmess << std::endl ; std::cerr << parmetmess << std::endl ;
exit( 1 ); exit( 1 );
#endif // #else // #if HAVE_PARMETIS #endif // #else // #if HAVE_PARMETIS
} }
inline void CALL_ParMETIS_V3_AdaptiveRepart( inline void CALL_ParMETIS_V3_AdaptiveRepart(
idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt, idxtype *vtxdist, idxtype *xadj, idxtype *adjncy, idxtype *vwgt,
idxtype *vsize, idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *ncon, idxtype *vsize, idxtype *adjwgt, idxtype *wgtflag, idxtype *numflag, idxtype *ncon,
idxtype *nparts, realtype *tpwgts, realtype *ubvec, realtype *ipc2redist, idxtype *nparts, realtype *tpwgts, realtype *ubvec, realtype *ipc2redist,
idxtype *options, idxtype *edgecut, idxtype *part, idxtype *options, idxtype *edgecut, idxtype *part,
MpAccessGlobal &mpa ) MpAccessGlobal &mpa )
{ {
#if HAVE_PARMETIS #if HAVE_PARMETIS
// get communincator (see mpAccess_MPI.cc) // get communincator (see mpAccess_MPI.cc)
MPI_Comm comm = getMPICommunicator( mpa.communicator() ); MPI_Comm comm = getMPICommunicator( mpa.communicator() );
:: ParMETIS_V3_AdaptiveRepart(vtxdist, xadj, adjncy, vwgt, vsize, adjwgt, :: ParMETIS_V3_AdaptiveRepart(vtxdist, xadj, adjncy, vwgt, vsize, adjwgt,
wgtflag, numflag, ncon, nparts, tpwgts, wgtflag, numflag, ncon, nparts, tpwgts,
ubvec, ipc2redist, options, edgecut, part, &comm ) ; ubvec, ipc2redist, options, edgecut, part, &comm ) ;
#else // #if HAVE_PARMETIS #else // #if HAVE_PARMETIS
std::cerr << "**ERROR The use of ParMETIS is not supported, when the ParMETIS library is missing! in: " << __FILE__ << " line: " << __LINE__ << "\n"; std::cerr << "**ERROR The use of ParMETIS is not supported, when the ParMETIS library is missing! in: " << __FILE__ << " line: " << __LINE__ << "\n";
std::cerr << parmetmess << std::endl ; std::cerr << parmetmess << std::endl ;
exit( 1 ); exit( 1 );
#endif // #else // #if HAVE_PARMETIS #endif // #else // #if HAVE_PARMETIS
}
} }
#endif // #ifndef PARMETIS_H_INCLUDED #endif // #ifndef PARMETIS_H_INCLUDED
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment