Commit 78bca2d2 authored by Victor Yu's avatar Victor Yu
Browse files

Update SCOTCH to 6.0.9

parent 2a73cb87
......@@ -16,6 +16,7 @@
* AAA method has become the default pole expansion method in PEXSI.
* Increased default number of poles from 20 to 30.
* Improved accuracy of pole expansion based on minimax approximation.
* Updated redistributed (PT-)SCOTCH source code to version 6.0.9.
### SLEPc-SIPs
* Interface compatible with PETSc 3.13 and SLEPc 3.13.
......
......@@ -7,7 +7,7 @@ SET(elsi_URL "http://elsi-interchange.org")
SET(elsi_EMAIL "elsi-team@duke.edu")
SET(elsi_LICENSE "BSD 3")
SET(elsi_DESCRIPTION "Electronic Structure Infrastructure")
SET(elsi_DATESTAMP "20200427")
SET(elsi_DATESTAMP "20200429")
### CMake modules ###
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
......
......@@ -1970,6 +1970,6 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\end{Verbatim}
\end{tcolorbox}
The source code of ELPA 2020.05.001 (LGPL3), libOMM 1.0.0 (BSD2), NTPoly 2.4.0 (MIT), PEXSI 1.2.0 (BSD3), PT-SCOTCH 6.0.0 (CeCILL-C), SuperLU\_DIST 6.2.0 (BSD3), and BSEPACK 0.1 (BSD3) are redistributed through this version of ELSI. Individual license of each library can be found in the corresponding subfolder.
The source code of ELPA 2020.05.001 (LGPL3), libOMM 1.0.0 (BSD2), NTPoly 2.4.0 (MIT), PEXSI 1.2.0 (BSD3), PT-SCOTCH 6.0.9 (CeCILL-C), SuperLU\_DIST 6.2.0 (BSD3), and BSEPACK 0.1 (BSD3) are redistributed through this version of ELSI. Individual license of each library can be found in the corresponding subfolder.
\end{document}
......@@ -4,7 +4,6 @@ LIST(APPEND pexsi_src
src/blas.cpp
src/f_interface.f90
src/getPole.cpp
src/get_perm_c_parmetis.c
src/global.cpp
src/interface.cpp
src/lapack.cpp
......
This diff is collapsed.
MACRO(cpp_scotch arg1)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_VERSION=6)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_RELEASE=0)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_PATCHLEVEL=0)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_VERSION_NUM=6)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_RELEASE_NUM=0)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_PATCHLEVEL_NUM=9)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE COMMON_RANDOM_FIXED_SEED)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE SCOTCH_RENAME)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE IDXSIZE32)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE INTSIZE32)
TARGET_COMPILE_DEFINITIONS(${arg1} PRIVATE HAVE_NOT_SYS_WAIT_H)
ENDMACRO()
MACRO(inc_scotch arg1)
......@@ -16,7 +17,8 @@ MACRO(inc_scotch arg1)
${INC_PATHS})
ENDMACRO()
SET(SCOTCH_SOURCE_DIR "${PROJECT_SOURCE_DIR}/external/SCOTCH/src/libscotch")
SET(SCOTCH_DIR "${PROJECT_SOURCE_DIR}/external/SCOTCH/src/libscotch")
SET(SCOTCHMETIS_DIR "${PROJECT_SOURCE_DIR}/external/SCOTCH/src/libscotchmetis")
### Generate headers ###
ADD_EXECUTABLE(dummysizes src/libscotch/dummysizes.c)
......@@ -38,24 +40,26 @@ ELSE()
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/generated/scotch.h ${PROJECT_BINARY_DIR}/generated/scotchf.h
COMMAND ${dummy_command} ${SCOTCH_SOURCE_DIR}/library.h ${PROJECT_BINARY_DIR}/generated/scotch.h
COMMAND ${dummy_command} ${SCOTCH_SOURCE_DIR}/library_f.h ${PROJECT_BINARY_DIR}/generated/scotchf.h
DEPENDS dummysizes ${SCOTCH_SOURCE_DIR}/library.h ${SCOTCH_SOURCE_DIR}/library_f.h
COMMAND ${dummy_command} ${SCOTCH_DIR}/library.h ${PROJECT_BINARY_DIR}/generated/scotch.h
COMMAND ${dummy_command} ${SCOTCH_DIR}/library_f.h ${PROJECT_BINARY_DIR}/generated/scotchf.h
COMMAND ${dummy_command} ${SCOTCHMETIS_DIR}/library_metis.h ${PROJECT_BINARY_DIR}/generated/metis.h
DEPENDS dummysizes ${SCOTCH_DIR}/library.h ${SCOTCH_DIR}/library_f.h ${SCOTCHMETIS_DIR}/library_metis.h
VERBATIM)
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/generated/ptscotch.h ${PROJECT_BINARY_DIR}/generated/ptscotchf.h
COMMAND ${ptdummy_command} ${SCOTCH_SOURCE_DIR}/library_pt.h ${PROJECT_BINARY_DIR}/generated/ptscotch.h
COMMAND ${ptdummy_command} ${SCOTCH_SOURCE_DIR}/library_pt_f.h ${PROJECT_BINARY_DIR}/generated/ptscotchf.h
DEPENDS ptdummysizes ${SCOTCH_SOURCE_DIR}/library_pt.h ${SCOTCH_SOURCE_DIR}/library_pt_f.h
COMMAND ${ptdummy_command} ${SCOTCH_DIR}/library_pt.h ${PROJECT_BINARY_DIR}/generated/ptscotch.h
COMMAND ${ptdummy_command} ${SCOTCH_DIR}/library_pt_f.h ${PROJECT_BINARY_DIR}/generated/ptscotchf.h
COMMAND ${ptdummy_command} ${SCOTCHMETIS_DIR}/library_parmetis.h ${PROJECT_BINARY_DIR}/generated/parmetis.h
DEPENDS ptdummysizes ${SCOTCH_DIR}/library_pt.h ${SCOTCH_DIR}/library_pt_f.h ${SCOTCHMETIS_DIR}/library_parmetis.h
VERBATIM)
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/generated/parser_ll.c ${PROJECT_BINARY_DIR}/generated/parser_yy.c
COMMAND bison -pscotchyy -y -b y -d -v -o${PROJECT_BINARY_DIR}/generated/tmp2.c ${SCOTCH_SOURCE_DIR}/parser_yy.y
COMMAND bison -pscotchyy -y -b y -d -v -o${PROJECT_BINARY_DIR}/generated/tmp2.c ${SCOTCH_DIR}/parser_yy.y
COMMAND mv ${PROJECT_BINARY_DIR}/generated/tmp2.c ${PROJECT_BINARY_DIR}/generated/parser_yy.c
COMMAND mv ${PROJECT_BINARY_DIR}/generated/tmp2.h ${PROJECT_BINARY_DIR}/generated/parser_ly.h
COMMAND flex -Pscotchyy -o${PROJECT_BINARY_DIR}/generated/tmp1.c ${SCOTCH_SOURCE_DIR}/parser_ll.l
COMMAND flex -Pscotchyy -o${PROJECT_BINARY_DIR}/generated/tmp1.c ${SCOTCH_DIR}/parser_ll.l
COMMAND mv ${PROJECT_BINARY_DIR}/generated/tmp1.c ${PROJECT_BINARY_DIR}/generated/parser_ll.c
DEPENDS ${SCOTCH_SOURCE_DIR}/parser_yy.y ${SCOTCH_SOURCE_DIR}/parser_ll.l ${SCOTCH_SOURCE_DIR}/parser_yy.h ${SCOTCH_SOURCE_DIR}/parser_ll.h
DEPENDS ${SCOTCH_DIR}/parser_yy.y ${SCOTCH_DIR}/parser_ll.l ${SCOTCH_DIR}/parser_yy.h ${SCOTCH_DIR}/parser_ll.h
VERBATIM)
### Source files ###
......@@ -66,12 +70,15 @@ LIST(APPEND scotch_src
${PROJECT_BINARY_DIR}/generated/parser_yy.c
src/libscotch/arch.c
src/libscotch/arch_build.c
src/libscotch/arch_build2.c
src/libscotch/arch_cmplt.c
src/libscotch/arch_cmpltw.c
src/libscotch/arch_deco.c
src/libscotch/arch_deco2.c
src/libscotch/arch_dist.c
src/libscotch/arch_hcub.c
src/libscotch/arch_mesh.c
src/libscotch/arch_sub.c
src/libscotch/arch_tleaf.c
src/libscotch/arch_torus.c
src/libscotch/arch_vcmplt.c
......@@ -91,7 +98,7 @@ LIST(APPEND scotch_src
src/libscotch/common.c
src/libscotch/common_file.c
src/libscotch/common_file_compress.c
src/libscotch/common_file_uncompress.c
src/libscotch/common_file_decompress.c
src/libscotch/common_integer.c
src/libscotch/common_memory.c
src/libscotch/common_string.c
......@@ -104,7 +111,10 @@ LIST(APPEND scotch_src
src/libscotch/graph_base.c
src/libscotch/graph_band.c
src/libscotch/graph_check.c
src/libscotch/graph_clone.c
src/libscotch/graph_coarsen.c
src/libscotch/graph_diam.c
src/libscotch/graph_ielo.c
src/libscotch/graph_induce.c
src/libscotch/graph_io.c
src/libscotch/graph_io_chac.c
......@@ -120,6 +130,7 @@ LIST(APPEND scotch_src
src/libscotch/hgraph_check.c
src/libscotch/hgraph_induce.c
src/libscotch/hgraph_order_bl.c
src/libscotch/hgraph_order_cc.c
src/libscotch/hgraph_order_cp.c
src/libscotch/hgraph_order_gp.c
src/libscotch/hgraph_order_hd.c
......@@ -162,6 +173,8 @@ LIST(APPEND scotch_src
src/libscotch/library_arch_f.c
src/libscotch/library_arch_build.c
src/libscotch/library_arch_build_f.c
src/libscotch/library_arch_dom.c
src/libscotch/library_arch_dom_f.c
src/libscotch/library_common_f.c
src/libscotch/library_geom.c
src/libscotch/library_geom_f.c
......@@ -175,6 +188,10 @@ LIST(APPEND scotch_src
src/libscotch/library_graph_coarsen_f.c
src/libscotch/library_graph_color.c
src/libscotch/library_graph_color_f.c
src/libscotch/library_graph_diam.c
src/libscotch/library_graph_diam_f.c
src/libscotch/library_graph_induce.c
src/libscotch/library_graph_induce_f.c
src/libscotch/library_graph_io_chac.c
src/libscotch/library_graph_io_chac_f.c
src/libscotch/library_graph_io_habo.c
......@@ -194,6 +211,8 @@ LIST(APPEND scotch_src
src/libscotch/library_graph_part_ovl.c
src/libscotch/library_graph_part_ovl_f.c
src/libscotch/library_mapping.c
src/libscotch/library_memory.c
src/libscotch/library_memory_f.c
src/libscotch/library_mesh.c
src/libscotch/library_mesh_f.c
src/libscotch/library_mesh_graph.c
......@@ -383,12 +402,14 @@ LIST(APPEND ptscotch_src
src/libscotch/vdgraph_store.c)
LIST(APPEND scotchmetis_src
${PROJECT_BINARY_DIR}/generated/metis.h
src/libscotchmetis/metis_graph_order.c
src/libscotchmetis/metis_graph_order_f.c
src/libscotchmetis/metis_graph_part.c
src/libscotchmetis/metis_graph_part_f.c)
LIST(APPEND ptscotchparmetis_src
${PROJECT_BINARY_DIR}/generated/parmetis.h
src/libscotchmetis/parmetis_dgraph_order.c
src/libscotchmetis/parmetis_dgraph_order_f.c
src/libscotchmetis/parmetis_dgraph_part.c
......@@ -399,6 +420,8 @@ LIST(APPEND generated_src
${PROJECT_BINARY_DIR}/generated/scotchf.h
${PROJECT_BINARY_DIR}/generated/ptscotch.h
${PROJECT_BINARY_DIR}/generated/ptscotchf.h
${PROJECT_BINARY_DIR}/generated/metis.h
${PROJECT_BINARY_DIR}/generated/parmetis.h
${PROJECT_BINARY_DIR}/generated/parser_ll.c
${PROJECT_BINARY_DIR}/generated/parser_yy.c)
......@@ -441,6 +464,8 @@ cpp_scotch(ptscotcherr)
TARGET_COMPILE_DEFINITIONS(ptscotch PRIVATE SCOTCH_PTSCOTCH)
TARGET_COMPILE_DEFINITIONS(ptscotcherr PRIVATE SCOTCH_PTSCOTCH)
TARGET_COMPILE_DEFINITIONS(ptscotchparmetis PRIVATE SCOTCH_PTSCOTCH)
TARGET_COMPILE_DEFINITIONS(scotchmetis PRIVATE SCOTCH_METIS_VERSION=5)
TARGET_COMPILE_DEFINITIONS(ptscotchparmetis PRIVATE SCOTCH_METIS_VERSION=5)
LIST(APPEND scotch_target
scotch
......
/* Copyright 2004,2007-2012 IPB, Universite de Bordeaux, INRIA & CNRS
/* Copyright 2004,2007-2013,2015,2016,2018,2019 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
......@@ -8,13 +8,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
......@@ -25,7 +25,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-C license and that you accept its terms.
*/
......@@ -63,8 +63,8 @@
/** to 09 jan 2004 **/
/** # Version 5.1 : from : 11 dec 2007 **/
/** to 25 jun 2010 **/
/** # Version 6.0 : from : 14 fev 2011 **/
/** to 01 jul 2012 **/
/** # Version 6.0 : from : 14 feb 2011 **/
/** to 28 apr 2019 **/
/** **/
/************************************************************/
......@@ -76,13 +76,16 @@
#include "module.h"
#include "common.h"
#include "graph.h"
#include "arch.h"
#include "arch_cmplt.h"
#include "arch_cmpltw.h"
#include "arch_deco.h"
#include "arch_deco2.h"
#include "arch_dist.h"
#include "arch_hcub.h"
#include "arch_mesh.h"
#include "arch_sub.h"
#include "arch_tleaf.h"
#include "arch_torus.h"
#include "arch_vcmplt.h"
......@@ -95,6 +98,7 @@
static const ArchClass archClassTab[] = { ARCHCLASSBLOCK ("cmplt", Cmplt, ARCHPART),
ARCHCLASSBLOCK ("cmpltw", Cmpltw, ARCHPART),
ARCHCLASSBLOCK ("deco", Deco, ARCHNONE),
ARCHCLASSBLOCK ("deco", Deco2, ARCHNONE), /* Hidden, type-2 decomposition-defined architecture */
ARCHCLASSBLOCK ("dist", Dist, ARCHNONE),
ARCHCLASSBLOCK ("hcub", Hcub, ARCHNONE),
ARCHCLASSBLOCK ("tleaf", Tleaf, ARCHNONE),
......@@ -105,8 +109,11 @@ static const ArchClass archClassTab[] = { ARCHCLASSBLOCK ("cmplt", Cmplt
ARCHCLASSBLOCK ("mesh2U", Mesh2u, ARCHNONE),
#endif /* SCOTCH_DEBUG_ARCH3 */
ARCHCLASSBLOCK ("mesh3D", Mesh3, ARCHNONE),
ARCHCLASSBLOCK ("meshXD", MeshX, ARCHNONE),
ARCHCLASSBLOCK ("sub", Sub, ARCHNONE),
ARCHCLASSBLOCK ("torus2D", Torus2, ARCHNONE),
ARCHCLASSBLOCK ("torus3D", Torus3, ARCHNONE),
ARCHCLASSBLOCK ("torusXD", TorusX, ARCHNONE),
ARCHCLASSBLOCK ("varcmplt", Vcmplt, ARCHPART | ARCHVAR),
ARCHCLASSBLOCK ("varhcub", Vhcub, ARCHVAR),
ARCHCLASSBLOCKNULL };
......@@ -131,7 +138,7 @@ int
archInit (
Arch * restrict const archptr)
{
memset (archptr, 0, sizeof (Arch)); /* Initialize architecture body (arch->class = NULL) */
memSet (archptr, 0, sizeof (Arch)); /* Initialize architecture body (arch->class = NULL) */
return (0);
}
......@@ -163,9 +170,12 @@ Arch * restrict const archptr)
o = 0; /* Assume everything will be all right */
if ((archptr->class != NULL) &&
(archptr->class->archFree != NULL)) /* If there is a specific freeing routing */
(archptr->class->archFree != NULL)) /* If there is a specific freeing routine */
o = archptr->class->archFree (&archptr->data); /* Call it */
memset (archptr, 0, sizeof (Arch)); /* Initialize the architecture body (arch->class = NULL) */
#ifdef SCOTCH_DEBUG_GRAPH2
memSet (archptr, ~0, sizeof (Arch)); /* Purge graph fields */
#endif /* SCOTCH_DEBUG_GRAPH2 */
return (o);
}
......@@ -195,16 +205,17 @@ FILE * const stream)
return (1);
}
archptr->class = class; /* Set architecture class */
archptr->flagval = archptr->class->flagval | ARCHFREE; /* Copy architecture flag before it can be modified and set freeing flag */
if (class->archLoad != NULL) { /* If class has loading function */
if (class->archLoad (&archptr->data, stream) != 0) { /* Load class data */
errorPrint ("archLoad: cannot load architecture data");
class->archFree (&archptr->data); /* Perform clean-up */
memset (archptr, 0, sizeof (Arch)); /* Initialize architecture body */
memSet (archptr, 0, sizeof (Arch)); /* Initialize architecture body */
return (1);
}
}
archptr->class = class; /* Set architecture class */
archptr->flagval = archptr->class->flagval; /* Copy architecture flag */
return (0);
}
......@@ -229,7 +240,6 @@ FILE * restrict const stream)
archptr->class->archname) == EOF);
if (archptr->class->archSave != NULL) /* If class has saving function */
o |= archptr->class->archSave (&archptr->data, stream); /* Write architecture data */
o |= (fprintf (stream, "\n") == EOF);
if (o != 0)
errorPrint ("archSave: bad output");
......@@ -247,15 +257,23 @@ FILE * restrict const stream)
const ArchClass *
archClass (
const char * const name)
{
return (archClass2 (name, 0)); /* Get first instance of class name */
}
const ArchClass *
archClass2 (
const char * const name,
const int num)
{
const ArchClass * restrict class; /* Pointer to architecture class */
for (class = archClassTab; /* For all classes */
(class->archname != NULL) && /* Search if class names match */
(strcasecmp (name, class->archname) != 0);
class ++) ;
for (class = archClassTab; class->archname != NULL; class ++) { /* For all classes */
if (strcasecmp (name, class->archname) == 0) /* If class names matches */
return (class + num); /* Return proper class */
}
return ((class->archname != NULL) ? class : NULL);
return (NULL); /* Class not found */
}
/**************************************/
......@@ -279,9 +297,9 @@ const char * const name)
ArchDomNum
archDomNum (
const Arch * const archptr,
const ArchDom * const domptr)
const ArchDom * const domnptr)
{
return (archDomNum2 (archptr, domptr)); /* Call proper routine */
return (archDomNum2 (archptr, domnptr)); /* Call proper routine */
}
#endif /* SCOTCH_DEBUG_ARCH2 */
......@@ -299,10 +317,10 @@ const ArchDom * const domptr)
int
archDomTerm (
const Arch * const archptr,
ArchDom * restrict const domptr,
const ArchDomNum domnum)
ArchDom * restrict const domnptr,
const ArchDomNum domnnum)
{
return (archDomTerm2 (archptr, domptr, domnum)); /* Call proper routine */
return (archDomTerm2 (archptr, domnptr, domnnum)); /* Call proper routine */
}
#endif /* SCOTCH_DEBUG_ARCH2 */
......@@ -319,9 +337,9 @@ const ArchDomNum domnum)
Anum
archDomSize (
const Arch * const archptr,
const ArchDom * const domptr)
const ArchDom * const domnptr)
{
return (archDomSize2 (archptr, domptr)); /* Call proper routine */
return (archDomSize2 (archptr, domnptr)); /* Call proper routine */
}
#endif /* SCOTCH_DEBUG_ARCH2 */
......@@ -338,9 +356,9 @@ const ArchDom * const domptr)
Anum
archDomWght (
const Arch * const archptr,
const ArchDom * const domptr)
const ArchDom * const domnptr)
{
return (archDomWght2 (archptr, domptr)); /* Call proper routine */
return (archDomWght2 (archptr, domnptr)); /* Call proper routine */
}
#endif /* SCOTCH_DEBUG_ARCH2 */
......@@ -378,9 +396,9 @@ const ArchDom * const dom1ptr)
int
archDomFrst (
const Arch * const archptr,
ArchDom * const domptr)
ArchDom * const domnptr)
{
return (archDomFrst2 (archptr, domptr)); /* Call proper routine */
return (archDomFrst2 (archptr, domnptr)); /* Call proper routine */
}
#endif /* SCOTCH_DEBUG_ARCH2 */
......@@ -395,11 +413,11 @@ ArchDom * const domptr)
int
archDomLoad (
const Arch * const archptr,
ArchDom * const domptr,
ArchDom * const domnptr,
FILE * const stream)
{
return (archptr->class->domLoad (&archptr->data, /* Call proper routine */
&domptr->data,
&domnptr->data,
stream));
}
......@@ -413,11 +431,11 @@ FILE * const stream)
int
archDomSave (
const Arch * const archptr,
const ArchDom * const domptr,
const ArchDom * const domnptr,
FILE * const stream)
{
return (archptr->class->domSave (&archptr->data, /* Call proper routine */
&domptr->data,
&domnptr->data,
stream));
}
......@@ -436,22 +454,11 @@ FILE * const stream)
int
archDomBipart (
const Arch * const archptr,
const ArchDom * const domptr,
const ArchDom * const domnptr,
ArchDom * const dom0ptr,
ArchDom * const dom1ptr)
{
int o;
o = archDomBipart2 (archptr, domptr, dom0ptr, dom1ptr); /* Call proper routine */
if ((o == 0) && /* Check domain number consistency for fixed-sized architectures */
(strncmp (archName (archptr), "var", 3) != 0) &&
(archDomNum (archptr, dom0ptr) != archDomNum (archptr, domptr))) {
errorPrint ("archDomBipart: domain number mismatch");
return (2);
}
return (o);
return (archDomBipart2 (archptr, domnptr, dom0ptr, dom1ptr)); /* Call proper routine */
}
#endif /* SCOTCH_DEBUG_ARCH2 */
......
/* Copyright 2004,2007-2011 ENSEIRB, INRIA & CNRS
/* Copyright 2004,2007-2011,2013-2015,2018 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
......@@ -8,13 +8,13 @@
** use, modify and/or redistribute the software under the terms of the
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
......@@ -25,7 +25,7 @@
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-C license and that you accept its terms.
*/
......@@ -64,8 +64,8 @@
/** to 07 dec 2004 **/
/** # Version 5.1 : from : 11 dec 2007 **/
/** to 11 aug 2010 **/
/** # Version 6.0 : from : 14 fev 2011 **/
/** to 14 fev 2011 **/
/** # Version 6.0 : from : 14 feb 2011 **/
/** to 28 may 2018 **/
/** **/
/************************************************************/
......@@ -77,15 +77,19 @@
/*+ Architecture flags. +*/
#define ARCHNONE 0x0000 /*+ No options set +*/
#define ARCHPART 0x0001 /*+ Architecture without external gains +*/
#define ARCHVAR 0x0002 /*+ Variable-sized architecture +*/
#define ARCHNONE 0x0000 /*+ No options set +*/
#define ARCHPART 0x0001 /*+ Architecture without external gains +*/
#define ARCHVAR 0x0002 /*+ Variable-sized architecture +*/
#define ARCHFREE 0x0004 /*+ Architecture contents must be freed on exit +*/
#define ARCHBITSUSED 0x0007 /* Significant bits for plain arch routines */
#define ARCHBITSNOTUSED 0x0008 /* Value above which bits not used by plain arch routines */
/*
** The type and structure definitions.
*/
typedef INT Anum; /*+ Generic integer +*/
typedef INT Anum; /*+ Generic integer for architectures +*/
#define ANUMMAX INTVALMAX
#define ANUMSTRING INTSTRING
......@@ -97,88 +101,128 @@ typedef Anum ArchDomNum; /*+ Domain number +*/
#define ARCHDOMNOTTERM ((ArchDomNum) ~0) /*+ Not-terminal number +*/
/*+ The architecture multinode element,
used for architecture coarsening.
It is equivalent to the
GraphCoarsenMulti structure. +*/
typedef struct ArchCoarsenMulti_ {
Anum vertnum[2]; /*+ Numbers of the collapsed vertices of a multinode +*/
} ArchCoarsenMulti;
/*+ The sub-includes for structure size computations. +*/
#define ARCH_NOPROTO
#include "arch_cmplt.h"
#include "arch_cmpltw.h"
#include "arch_deco.h"
#include "arch_deco2.h"
#include "arch_dist.h"
#include "arch_hcub.h"
#include "arch_tleaf.h"
#include "arch_mesh.h"
#include "arch_sub.h"
#include "arch_torus.h"
#include "arch_vcmplt.h"
#include "arch_vhcub.h"
#undef ARCH_NOPROTO
/*+ The architecture class type. +*/
typedef struct ArchClass_ {
char * archname; /*+ Architecture name +*/
int flagval; /*+ Architecture flags +*/
int (* archLoad) (); /*+ Architecture loading function +*/
int (* archSave) (); /*+ Architecture saving function +*/
int (* archFree) (); /*+ Architecture freeing function +*/
ArchDomNum (* domNum) (); /*+ Domain labeling function +*/
int (* domTerm) (); /*+ Terminal domain building function +*/
Anum (* domSize) (); /*+ Domain size function +*/
Anum (* domWght) (); /*+ Domain weight function +*/
Anum (* domDist) (); /*+ Distance computation function +*/
int (* domFrst) (); /*+ Compute biggest domain +*/
int (* domLoad) (); /*+ Domain loading routine +*/
int (* domSave) (); /*+ Domain saving routine +*/
int (* domBipart) (); /*+ Domain bipartitioning routine +*/
int (* domIncl) (); /*+ Domain inclusion routine +*/
char * archname; /*+ Architecture name +*/
int flagval; /*+ Architecture flags of the class +*/
int (* archLoad) (); /*+ Architecture loading function +*/
int (* archSave) (); /*+ Architecture saving function +*/
int (* archFree) (); /*+ Architecture freeing function +*/
int (* matchInit) (); /*+ Architecture matching init function +*/
void (* matchExit) (); /*+ Architecture matching exit function +*/
Anum (* matchMate) (); /*+ Architecture matching function +*/
ArchDomNum (* domNum) (); /*+ Domain labeling function +*/
int (* domTerm) (); /*+ Terminal domain building function +*/
Anum (* domSize) (); /*+ Domain size function +*/
Anum (* domWght) (); /*+ Domain weight function +*/
Anum (* domDist) (); /*+ Distance computation function +*/
int (* domFrst) (); /*+ Compute biggest domain +*/
int (* domLoad) (); /*+ Domain loading routine +*/
int (* domSave) (); /*+ Domain saving routine +*/
int (* domBipart) (); /*+ Domain bipartitioning routine +*/
int (* domIncl) (); /*+ Domain inclusion routine +*/
#ifdef SCOTCH_PTSCOTCH
int (* domMpiType) (); /*+ Domain MPI type building routine +*/
int (* domMpiType) (); /*+ Domain MPI type building routine +*/
#endif /* SCOTCH_PTSCOTCH */
int domsizeof; /*+ Size in bytes of domain data +*/
int domsizeof; /*+ Size in bytes of domain data +*/
} ArchClass;
/*+ The architecture type. +*/
/*+ The architecture union type. +*/
typedef union { /*+ Architecture data +*/
ArchCmplt cmplt; /*+ Complete graph architecture +*/
ArchCmpltw cmpltw; /*+ Weighted complete graph architecture +*/
ArchDeco deco; /*+ Type-1 decomposition-described architecture +*/
ArchDeco2 deco2; /*+ Type-2 decomposition-described architecture +*/
ArchDist dist; /*+ Distance multiplicator pseudo-architecture +*/
ArchHcub hcub; /*+ Hypercube architecture +*/
ArchMeshX meshx; /*+ xD-mesh architecture (includes 2D and 3D) +*/
ArchSub sub; /*+ Sub-architecture meta-architecture +*/
ArchTleaf tleaf; /*+ Tree-leaf architecture +*/
ArchVcmplt vcmplt; /*+ Variable-sized complete graph architecture +*/
ArchVhcub vhcub; /*+ Variable-sized hypercube architecture +*/
} ArchDummy;