Commit 0c6bf4ee authored by Andrew Heather's avatar Andrew Heather
Browse files
parents e9d9efd6 7329b1c1
EXE_INC = \
/* -g -DFULLDEBUG -O0 */ \
-I$(FOAM_UTILITIES)/parallelProcessing/decompositionMethods/decompositionMethods/lnInclude \
-I$(LIB_SRC)/decompositionAgglomeration/decompositionMethods/lnInclude \
-I$(LIB_SRC)/autoMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \
......
......@@ -2,8 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(FOAM_UTILITIES)/parallelProcessing/decompositionMethods/decompositionMethods/lnInclude
-I$(LIB_SRC)/decompositionAgglomeration/decompositionMethods/lnInclude
EXE_LIBS = \
-lmeshTools \
......
#!/bin/sh
set -x
(cd decompositionMethods; ./Allwmake)
wmake decomposePar
wmake reconstructPar
wmake reconstructParMesh
wmake redistributeMeshPar
EXE_INC = \
-I../decompositionMethods/decompositionMethods/lnInclude \
-I$(LIB_SRC)/decompositionAgglomeration/decompositionMethods/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude
......
#!/bin/sh
set -x
wmake libso metis-5.0pre2/GKlib
wmake libso metis-5.0pre2/libmetis
wmake libso decompositionMethods
(cd parMetisDecomp; ./Allwmake)
METIS 4.0.2, 3/10/04
------------------------------------------------------------------------------
- Fixed a problem with weighted graphs and ometis.c
METIS 4.0.1, 11/29/98
------------------------------------------------------------------------------
This is mostly a bug-fix release
- Fixed some bugs in the multi-constraint partitioning routines
- Fixed some bugs in the volume-minimization routines
METIS 4.0.0, 9/20/98
------------------------------------------------------------------------------
METIS 4.0 contains a number of changes over the previous major release (ver
3.0.x). Most of these changes are concentrated on the graph and mesh
partitioning routines and they do not affect the sparse matrix re-ordering
routines. Here is a list of the major changes:
Multi-Constraint Partitioning
-----------------------------
METIS now includes partitioning routines that can be used to a partition
a graph in the presence of multiple balancing constraints.
Minimizing the Total Communication Volume
-----------------------------------------
METIS now includes partitioning routines whose objective is to minimize
the total communication volume (as opposed to minimizing the edge-cut).
Minimizing the Maximum Connectivity of the Subdomains
-----------------------------------------------------
The k-way partitioning routines in METIS can now directly minimize the number
of adjacent subdomains. For most graphs corresponding to finite element
meshes, METIS is able to significantly reduce the maximum (and total) number of
adjacent subdomains.
METIS 3.0.6, 1/28/98
-------------------------------------------------------------------------------
- Fixed some problems when too many partitions were asked, and each partition
end up having 0 vertices
- Fixed some bugs in the I/O routines
- Added support for the g77 compiler under Linux
METIS 3.0.5, 12/22/97
-------------------------------------------------------------------------------
- Fixed problems on 64-bit architectures (eg., -64 option on SGIs).
- Added some options in Makefile.in
METIS 3.0.4, 12/1/97
-------------------------------------------------------------------------------
Fixed a memory leak in the ordering code.
METIS 3.0.3, 11/5/97
-------------------------------------------------------------------------------
This is mostly a bug-fix release with just a few additions
Added functionality
- Added support for quadrilateral elements.
- Added a routine METIS_EstimateMemory that estimates the amount of
memory that will be allocated by METIS. This is useful in determining
if a problem can run on your system.
- Added hooks to allow PARMETIS to use the orderings produced by METIS.
This is hidden from the user but it will be used in the next release
of PARMETIS.
Bug-fixes
- Fixed a bug related to memory allocation. This should somewhat reduce the
overall memory used by METIS.
- Fixed some bugs in the 'graphchk' program in the case of weighted graphs.
- Removed some code corresponding to unused options.
- Fixed some minor bugs in the node-refinement code
-------------------------------------------------------------------------------
METIS 3.0 contains a number of changes over METIS 2.0.
The major changes are the following:
General Changes
---------------
1. Added code to directly partition finite element meshes.
2. Added code to convert finite element meshes into graphs so they
can be used by METIS.
1. The names, calling sequences, and options of the routines in
METISlib have been changed.
2. Better support has been added for Fortran programs.
3. Eliminated the 'metis' program. The only way to tune METIS's
behavior is to use METISlib.
4. Improved memory management. METIS should now only abort if truly
there is no more memory left in the system.
Graph Partitioning
------------------
1. Added partitioning routines that can be used to compute a partition
with prescribed partition weights. For example, they can be used to
compute a 3-way partition such that partition 1 has 50% of the weight,
partition 2 has 20% of the way, and partition 3 has 30% of the weight.
2. Improved the speed of the k-way partitioning algorithm (kmetis). The
new code has better cache locality which dramatically improves the
speed for large graphs. A factor of 4 speedup can be obtained for
certain graphs. METIS can now partition a 4 million node graph
in well under a minute on a MIPS R10000.
3. Eliminated some of the options that were seldom used.
Fill-Reducing Orderings
----------------------
1. Added a node based ordering code `onmetis' that greatly improves
ordering quality.
2. Improved the quality of the orderings produced by the original
edge-based ordering code (it is now called 'oemetis').
3. METIS can now analyze the graph and try to compress together
nodes with identical sparsity pattern. For some problems, this
significantly reduces ordering time
4. METIS can now prune dense columns prior to ordering. This can be
helpful for LP matrices.
Mesh Partitioning
-----------------
1. METIS can now directly partition the element node array of finite
element meshes. It produces two partitioning vectors. One for the
elements and one for the nodes. METIS supports the following
elements: triangles, tetrahedra, hexahedra
Mesh-To-Graph Conversion Routines
---------------------------------
1. METIS now includes a number of mesh conversion functions that can
be used to create the dual and nodal graphs directly from the
element connectivity arrays. These are highly optimized routines.
metis-5.0pre2
------------------------------------------------------------------------
r1437 | karypis | 2007-04-07 23:16:16 -0500 (Sat, 07 Apr 2007) | 3 lines
- Added installation instructions and change-logs.
- Tested 32bit & 64bit on 64bit architectures and passed tests.
- Tested 32bit on 32bit architectures and passed tests.
- strtoidx() addition for portable input file parsing
- Restructured the internal memory allocation schemes for graph and
refinement data. This should enhance portability and make the code
easier to maintain.
- Fixed some bad memory allocation calls (i.e., sizeof(x)/sizeof(idxtype).
However, there are tons of those and need to be corrected once and for
all by eliminating workspace and the associated mallocs.
- Added mprint/mscanf family of functions for portable formated I/O
of the idxtype datatype. The specifier for this datatype is %D.
All library routines use this function for printing.
The implementation of these routines is not very efficient, but
that should do for now (in principle these routines should not be
used unless debugging).
- Incorporated GKlib into METIS, which replaced many of its internal
functions. GKlib's malloc interface will enable graceful and clean
aborts (i.e., free all internally allocated memory) on fatal errors.
This will probably be available in the next pre-release.
- Fixed the problems associated with metis.h that were identified by
David (flyspray Issue #9).
trunk/b64.c
trunk/blas.c
trunk/dfkvkselect.c
trunk/dlmalloc.c
trunk/error.c
trunk/fs.c
trunk/getopt.c
trunk/htable.c
trunk/io.c
trunk/memory.c
trunk/omp.c
trunk/pdb.c
trunk/pqueue.c
trunk/seq.c
trunk/sort.c
trunk/string.c
trunk/timers.c
trunk/tokenizer.c
trunk/util.c
LIB = $(FOAM_LIBBIN)/libGKlib
/*
* GKlib.h
*
* George's library of most frequently used routines
*
* $Id: GKlib.h 1430 2007-04-07 17:53:07Z karypis $
*
*/
#ifndef _GKLIB_H_
#define _GKLIB_H_ 1
#define GKMSPACE
#if defined(_MSC_VER)
#define __MSC__
#endif
#if defined(__ICC)
#define __ICC__
#endif
#include <gk_arch.h> /*!< This should be here, prior to the includes */
/*************************************************************************
* Header file inclusion section
**************************************************************************/
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include <time.h>
#include <string.h>
#include <limits.h>
#include <signal.h>
#include <setjmp.h>
#include <assert.h>
#include <sys/stat.h>
#if defined(__WITHPCRE__)
#include <pcreposix.h>
#else
#include <regex.h>
#endif
#if defined(__OPENMP__)
#include <omp.h>
#endif
#include <gk_dlmalloc.h>
#include <gk_types.h>
#include <gk_struct.h>
#include <gk_externs.h>
#include <gk_defs.h>
#include <gk_macros.h>
#include <gk_getopt.h>
#include <gk_sort.h>
#include <gk_blas.h>
#include <gk_memory.h>
#include <gk_proto.h>
#endif /* GKlib.h */
#*************************************************************************
# Global flags
#*************************************************************************
gdb = yes
debug = no
memdbg = no
openmp = no
pcre = no
x86compiler = gcc
#*************************************************************************
# System-specific compilation flags
#*************************************************************************
# Get some basic information about the system that you are working on
cputype = $(shell uname -m | sed "s/\\ /_/g")
systype = $(shell uname)
ifeq ($(findstring CYGWIN, $(systype)),CYGWIN)
systype = MSWIN
# systype = CYGWIN
cputype = x86
endif
ifeq ($(systype),MSWIN)
#-------------------------------------------------------------------
# These defs are very much Visual Studio Specific
#-------------------------------------------------------------------
#Compiler information
CC = cl
OPTFLAGS = /Ox
COPTIONS = -DWIN32 -DMSC -D_CRT_SECURE_NO_DEPRECATE
#Linker information
LDOPTIONS =
LD = /cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/BIN/link
#Library creation information
AR = lib /NODEFAULTLIB:LIBC /OUT:$@
RANLIB =
ifeq ($(openmp),yes)
COPTIONS += -D__OPENMP__ /openmp
LDOPTIONS += /openmp
endif
#Compile input/output file specification
SOURCEFILE = /c $<
OUTPUTFILE = /Fo$@
# Standard file extensions
OBJEXT = .obj
LIBEXT = .lib
EXEEXT = .exe
else
ifeq ($(systype),Linux)
ifeq ($(x86compiler),gcc)
#Compiler information
CC = gcc
OPTFLAGS = -O6
COPTIONS = -DLINUX -D_FILE_OFFSET_BITS=64 -Wall -std=c99 -pedantic
#Linker information
LDOPTIONS =
LD = gcc
else
#Compiler information
CC = icc
OPTFLAGS = -O3
COPTIONS = -DLINUX -D_FILE_OFFSET_BITS=64 -std=c99
#Linker information
LDOPTIONS =
LD = icc
ifeq ($(openmp),yes)
COPTIONS += -D__OPENMP__ -openmp -openmp-report2
LDOPTIONS += -openmp
endif
endif
endif
ifeq ($(systype),Darwin)
#Compiler information
CC = gcc
OPTFLAGS = -O6
COPTIONS = -DDARWIN -D_FILE_OFFSET_BITS=64 -Wall -std=c99 -pedantic
#Linker information
LDOPTIONS =
LD = gcc
#Linker information
LDOPTIONS =
LD = gcc
endif
ifeq ($(systype),SunOS)
#Compiler information
CC = /opt/SUNWspro/bin/cc
OPTFLAGS = -xO4
COPTIONS = -DSUNOS
#Linker information
LDOPTIONS =
LD = /opt/SUNWspro/bin/cc
endif
ifeq ($(systype),CYGWIN)
#Compiler information
CC = gcc
OPTFLAGS = -O6
COPTIONS = -DCYGWIN -DWIN32 -D_FILE_OFFSET_BITS=64 -Wall -std=c99 -pedantic -mno-cygwin
#Linker information
LDOPTIONS = -mno-cygwin
LD = gcc
endif
#-------------------------------------------------------------------
# These defs are common among the GNU/GCC based systems
#-------------------------------------------------------------------
#Library creation information
AR = ar crv $@
RANLIB = ar -ts $@
#Compile input/output file specification
SOURCEFILE = -c $<
OUTPUTFILE = -o $@
# Standard file extensions
OBJEXT = .o
LIBEXT = .a
EXEEXT =
endif
#**************************************************************************
DMALLOCINC =
DMALLOCFLAGS =
DEBUGFLAGS =
XTRAFLAGS =
ifeq ($(dmalloc),yes)
DMALLOCINC = -I$(HOME)/local/include
DMALLOCFLAGS = -DDMALLOC
OPTFLAGS = -g
endif
ifeq ($(debug),yes)
DEBUGFLAGS = -DDEBUG
OPTFLAGS = -g
endif
ifeq ($(gdb),yes)
OPTFLAGS += -g
endif
ifeq ($(pcre),yes)
XTRAFLAGS += -D__WITHPCRE__
endif
#**************************************************************************
#**************************************************************************
INCLUDES = -I./ $(INCDIR) $(DMALLOCINC)
CFLAGS = $(COPTIONS) $(OPTFLAGS) $(XTRAFLAGS) $(DMALLOCFLAGS) $(DEBUGFLAGS) $(INCLUDES)
#**************************************************************************
#**************************************************************************
# Create the build directory if it does not exist
#**************************************************************************
BUILDDIR = ../builds/$(systype)-$(cputype)
$(shell mkdir -p $(BUILDDIR))
OBJS = $(patsubst %.c, $(BUILDDIR)/%$(OBJEXT), $(wildcard *.c))
HEADERS = $(wildcard *.h) Makefile
$(BUILDDIR)/libGKlib$(LIBEXT): $(OBJS)
$(AR) $(OBJS)
$(RANLIB)
doc:
doxygen ../doxygen/Doxyfile
pubdoc:
doxygen ../doxygen/Doxyfile
scp -r ../doxygen/html/* dminers.dtc.umn.edu:/var/www/wwwroot/dminers/files/doxy/GKlib
ssh dminers.dtc.umn.edu "chmod -R a+rX /var/www/wwwroot/dminers/files/doxy/GKlib"
clean:
rm -f $(OBJS)
realclean:
rm -f $(OBJS) ; rm -f $(BUILDDIR)/libGKlib$(LIBEXT)
$(OBJS) : $(HEADERS) Makefile
$(BUILDDIR)/%$(OBJEXT) : %.c
$(CC) $(CFLAGS) $(SOURCEFILE) $(OUTPUTFILE)
/*!
\file b64.c
\brief This file contains some simple 8bit-to-6bit encoding/deconding routines
Most of these routines are outdated and should be converted using glibc's equivalent
routines.
\date Started 2/22/05
\author George
\version\verbatim $Id: b64.c 1421 2007-04-06 14:37:41Z karypis $ \endverbatim
*/
#include <GKlib.h>
#define B64OFFSET 48 /* This is the '0' number */
/******************************************************************************
* Encode 3 '8-bit' binary bytes as 4 '6-bit' characters
*******************************************************************************/
void encodeblock(unsigned char *in, unsigned char *out)
{
out[0] = (in[0] >> 2);
out[1] = (((in[0] & 0x03) << 4) | (in[1] >> 4));
out[2] = (((in[1] & 0x0f) << 2) | (in[2] >> 6));
out[3] = (in[2] & 0x3f);
out[0] += B64OFFSET;
out[1] += B64OFFSET;
out[2] += B64OFFSET;
out[3] += B64OFFSET;
// printf("%c %c %c %c %2x %2x %2x %2x %2x %2x %2x\n", out[0], out[1], out[2], out[3], out[0], out[1], out[2], out[3], in[0], in[1], in[2]);
}
/******************************************************************************
* Decode 4 '6-bit' characters into 3 '8-bit' binary bytes
*******************************************************************************/
void decodeblock(unsigned char *in, unsigned char *out)
{