-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ParMETIS third party software (#132)
* Add gklib and copy over new code. * Set int and real widths to 32, setting to 64 does not work. * Add some READMEs.
- Loading branch information
Showing
201 changed files
with
47,395 additions
and
27,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
This directory contains the source for external applications used by svFSIplus. The applications are compiled and liked with svFSIplus. | ||
|
||
Each application has its own license agreement. | ||
|
||
Applications | ||
|
||
eigen - A header-only application for matrix objects. | ||
|
||
gklib_svfsi - A library used by METIS and ParMETIS applications. | ||
|
||
metis_svfsi - The METIS mesh partitioning application used by ParMETIS. | ||
|
||
parmetis_svfsi - The ParMETIS parallel mesh partitioning application. | ||
|
||
tetgen - A mesh generatin application. | ||
|
||
tinyxml - A header-only application used to read and write XML files. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
simvascular_third_party(gklib_svfsi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
The GKlib library contains various helper routines used by METIS and ParMETIS. | ||
|
||
The METIS-v5.1.1-DistDGL-0.5 version of the source was downloaded from https://github.com/KarypisLab/GKlib. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*========================================================================= | ||
* | ||
* Copyright (c) 2014-2015 The Regents of the University of California. | ||
* All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
* "Software"), to deal in the Software without restriction, including | ||
* without limitation the rights to use, copy, modify, merge, publish, | ||
* distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so, subject | ||
* to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | ||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
* | ||
*=========================================================================*/ | ||
|
||
#ifndef __simvascular_GKlib_svfsi_svfsi_h | ||
#define __simvascular_GKlib_svfsi_svfsi_h | ||
|
||
# hardcoded to build, update if want to allow system version | ||
#include <simvascular_GKlib_svfsi/METISLib/metis.h> | ||
|
||
#endif |
41 changes: 41 additions & 0 deletions
41
Code/ThirdParty/gklib_svfsi/simvascular_gklib_svfsi/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
cmake_minimum_required(VERSION 2.8.8) | ||
|
||
project(GKLIB_SVFSI) | ||
|
||
#set default build type to relwithdebinfo, also sets flags O2 on linux | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") | ||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE) | ||
mark_as_advanced(CMAKE_BUILD_TYPE) | ||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
if(WIN32) | ||
add_definitions("/Zi") | ||
add_definitions("-DWINDOWS") | ||
endif() | ||
|
||
include_directories(./) | ||
include_directories(${MPI_C_INCLUDE_PATH}) | ||
|
||
set(CSRCS b64.c blas.c cache.c csr.c error.c evaluate.c | ||
fkvkselect.c fs.c getopt.c gk_util.c gkregex.c graph.c | ||
htable.c io.c itemsets.c mcore.c memory.c pqueue.c | ||
random.c rw.c seq.c sort.c string.c timers.c tokenizer.c | ||
) | ||
|
||
if(SV_USE_THIRDPARTY_SHARED_LIBRARIES) | ||
add_library(${GKLIB_SVFSI_LIBRARY_NAME} SHARED ${CSRCS}) | ||
else() | ||
add_library(${GKLIB_SVFSI_LIBRARY_NAME} STATIC ${CSRCS}) | ||
endif() | ||
|
||
if(SV_INSTALL_LIBS) | ||
install(TARGETS ${GKLIB_SVFSI_LIBRARY_NAME} | ||
RUNTIME DESTINATION ${SV_INSTALL_RUNTIME_DIR} COMPONENT ThirdPartyExecutables | ||
LIBRARY DESTINATION ${SV_INSTALL_LIBRARY_DIR} COMPONENT ThirdPartyLibraries | ||
ARCHIVE DESTINATION ${SV_INSTALL_ARCHIVE_DIR} COMPONENT ThirdPartyLibraries) | ||
endif() | ||
|
85 changes: 85 additions & 0 deletions
85
Code/ThirdParty/gklib_svfsi/simvascular_gklib_svfsi/GKlib.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* GKlib.h | ||
* | ||
* George's library of most frequently used routines | ||
* | ||
* $Id: GKlib.h 14866 2013-08-03 16:40:04Z 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 <memory.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 | ||
#if defined(USE_GKREGEX) | ||
#include "gkregex.h" | ||
#else | ||
#include <regex.h> | ||
#endif /* defined(USE_GKREGEX) */ | ||
#endif /* defined(__WITHPCRE__) */ | ||
|
||
|
||
|
||
#if defined(__OPENMP__) | ||
#include <omp.h> | ||
#endif | ||
|
||
|
||
|
||
|
||
#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_mksort.h> | ||
#include <gk_mkblas.h> | ||
#include <gk_mkmemory.h> | ||
#include <gk_mkpqueue.h> | ||
#include <gk_mkpqueue2.h> | ||
#include <gk_mkrandom.h> | ||
#include <gk_mkutils.h> | ||
|
||
#include <gk_proto.h> | ||
|
||
|
||
#endif /* GKlib.h */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/*! | ||
\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 10711 2011-08-31 22:23:04Z karypis $ \endverbatim | ||
\verbatim | ||
$Copyright$ | ||
$License$ | ||
\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) | ||
{ | ||
in[0] -= B64OFFSET; | ||
in[1] -= B64OFFSET; | ||
in[2] -= B64OFFSET; | ||
in[3] -= B64OFFSET; | ||
|
||
out[0] = (in[0] << 2 | in[1] >> 4); | ||
out[1] = (in[1] << 4 | in[2] >> 2); | ||
out[2] = (in[2] << 6 | in[3]); | ||
} | ||
|
||
|
||
/****************************************************************************** | ||
* This function encodes an input array of bytes into a base64 encoding. Memory | ||
* for the output array is assumed to have been allocated by the calling program | ||
* and be sufficiently large. The output string is NULL terminated. | ||
*******************************************************************************/ | ||
void GKEncodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer) | ||
{ | ||
int i, j; | ||
|
||
if (nbytes%3 != 0) | ||
gk_errexit(SIGERR, "GKEncodeBase64: Input buffer size should be a multiple of 3! (%d)\n", nbytes); | ||
|
||
for (j=0, i=0; i<nbytes; i+=3, j+=4) | ||
encodeblock(inbuffer+i, outbuffer+j); | ||
|
||
//printf("%d %d\n", nbytes, j); | ||
outbuffer[j] = '\0'; | ||
} | ||
|
||
|
||
|
||
/****************************************************************************** | ||
* This function decodes an input array of base64 characters into their actual | ||
* 8-bit codes. Memory * for the output array is assumed to have been allocated | ||
* by the calling program and be sufficiently large. The padding is discarded. | ||
*******************************************************************************/ | ||
void GKDecodeBase64(int nbytes, unsigned char *inbuffer, unsigned char *outbuffer) | ||
{ | ||
int i, j; | ||
|
||
if (nbytes%4 != 0) | ||
gk_errexit(SIGERR, "GKDecodeBase64: Input buffer size should be a multiple of 4! (%d)\n", nbytes); | ||
|
||
for (j=0, i=0; i<nbytes; i+=4, j+=3) | ||
decodeblock(inbuffer+i, outbuffer+j); | ||
} | ||
|
Oops, something went wrong.