-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTSCOTCH: Large refactor #16
Closed
Closed
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
working_directory: ~/test | ||
machine: true | ||
steps: | ||
- checkout | ||
- run: | ||
name: Fast finish outdated PRs and merge PRs | ||
command: | | ||
./ci_support/fast_finish_ci_pr_build.sh | ||
./ci_support/checkout_merge_commit.sh | ||
- run: | ||
command: docker pull condaforge/linux-anvil | ||
- run: | ||
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. | ||
command: ./ci_support/run_docker_build.sh | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- build |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
* text=auto | ||
|
||
*.patch binary | ||
*.diff binary | ||
meta.yaml text eol=lf | ||
build.sh text eol=lf | ||
bld.bat text eol=crlf |
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,63 @@ | ||
# -*- mode: makefile-gmake -*- | ||
|
||
EXE = | ||
LIB = .a | ||
OBJ = .o | ||
|
||
AR = ar | ||
ARFLAGS = -ruv | ||
CAT = cat | ||
CCS = ${CC} | ||
CCP = ${CCS} | ||
CCD = ${CCP} | ||
CFLAGS := ${CFLAGS} | ||
CLIBFLAGS = -fPIC | ||
LDFLAGS := $(filter-out -lc++,${LDFLAGS}) | ||
CP = cp | ||
LEX = flex -Pscotchyy -olex.yy.c | ||
LN = ln | ||
MKDIR = mkdir | ||
MV = mv | ||
RANLIB = ranlib | ||
YACC = bison -pscotchyy -y -b y | ||
|
||
ifeq (${PKG_NAME},ptscotch) | ||
CCP = mpicc | ||
endif | ||
|
||
ifeq (${MAKELEVEL},0) | ||
|
||
pthread ?= 1 | ||
UNAME_S ?= $(shell uname -s) | ||
|
||
CFLAGS += -O3 | ||
CFLAGS += -I${PREFIX}/include | ||
CFLAGS += -DIDXSIZE64 | ||
CFLAGS += -DSCOTCH_RENAME | ||
CFLAGS += -Drestrict=__restrict | ||
CFLAGS += -DCOMMON_FILE_COMPRESS_GZ | ||
CFLAGS += -DCOMMON_RANDOM_FIXED_SEED | ||
LDFLAGS += -L${PREFIX}/lib -lz -lm | ||
|
||
ifeq (${pthread},1) | ||
CFLAGS += -pthread | ||
CFLAGS += -DCOMMON_PTHREAD | ||
#CFLAGS += -DSCOTCH_PTHREAD | ||
ifeq ($(UNAME_S),Darwin) | ||
CFLAGS += -DCOMMON_PTHREAD_BARRIER | ||
endif | ||
LDFLAGS += -pthread | ||
endif | ||
|
||
ifeq ($(UNAME_S),Darwin) | ||
CFLAGS += -DCOMMON_TIMING_OLD | ||
endif | ||
|
||
ifeq ($(UNAME_S),Linux) | ||
LDFLAGS += -lrt | ||
endif | ||
|
||
export CFLAGS | ||
export LDFLAGS | ||
|
||
endif #(${MAKELEVEL},0) |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,49 @@ | ||
#!/bin/sh | ||
|
||
cd src/ | ||
|
||
if [ `uname` == "Darwin" ]; then | ||
cp $RECIPE_DIR/Makefile.inc.i686_mac_darwin10 Makefile.inc | ||
else | ||
cp $RECIPE_DIR/Makefile.inc.x86-64_pc_linux2 Makefile.inc | ||
sed -i 's#-l$(SCOTCHLIB)errexit#-l$(SCOTCHLIB)errexit -lm#g' esmumps/Makefile | ||
fi | ||
cp $RECIPE_DIR/Makefile.inc src/Makefile.inc | ||
|
||
make ptesmumps | tee make.log 2>&1 | ||
# build | ||
cd src/ | ||
make esmumps 2>&1 | tee -a make.log | ||
make check | ||
cd .. | ||
|
||
# install. | ||
# install | ||
mkdir -p $PREFIX/lib/ | ||
cp lib/* $PREFIX/lib/ | ||
mkdir -p $PREFIX/bin/ | ||
cp bin/* $PREFIX/bin/ | ||
mkdir -p $PREFIX/include/ | ||
cp include/* $PREFIX/include/ | ||
|
||
if [ "$PKG_NAME" == "ptscotch" ] | ||
then | ||
|
||
export HYDRA_LAUNCHER=fork | ||
export MPIEXEC=mpiexec | ||
if [[ "$(uname)" == "Linux" ]]; then | ||
# skip mpiexec tests on Linux due to conda-forge bug: | ||
# https://github.com/conda-forge/conda-smithy/pull/337 | ||
export MPIEXEC="echo SKIPPING $MPIEXEC" | ||
fi | ||
if [[ "$(uname)" == "Darwin" ]]; then | ||
# the following test fails with "write error" | ||
# on Travis-CI during 'make ptcheck' | ||
# $ mpiexec -n 4 ./test_scotch_dgraph_redist data/bump.grf | ||
export MPIEXEC="echo SKIPPING $MPIEXEC" | ||
fi | ||
|
||
# build | ||
cd src/ | ||
make ptesmumps 2>&1 | tee -a make.log | ||
make ptcheck EXECP="$MPIEXEC -n 4" | ||
cd .. | ||
# install. | ||
mkdir -p $PREFIX/lib/ | ||
cp lib/libpt* $PREFIX/lib/ | ||
mkdir -p $PREFIX/bin/ | ||
cp bin/dg* $PREFIX/bin/ | ||
mkdir -p $PREFIX/include/ | ||
cp include/ptscotch*.h $PREFIX/include/ | ||
cp include/parmetis.h $PREFIX/include/ | ||
|
||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -up a/src/libscotch/library.h b/src/libscotch/library.h | ||
--- a/src/libscotch/library.h 2015-03-01 12:14:02.000000000 +0300 | ||
+++ b/src/libscotch/library.h 2017-10-08 14:39:38.439477780 +0300 | ||
@@ -268,6 +268,7 @@ SCOTCH_Ordering * SCOTCH_order | ||
|
||
void SCOTCH_randomReset (void); | ||
void SCOTCH_randomSeed (SCOTCH_Num); | ||
+void SCOTCH_randomProc (int); | ||
|
||
SCOTCH_Strat * SCOTCH_stratAlloc (void); | ||
int SCOTCH_stratInit (SCOTCH_Strat * const); |
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,29 @@ | ||
From 841877aa173c1bf79e8b667b862d1bce12fe1d6b Mon Sep 17 00:00:00 2001 | ||
From: Satish Balay <balay@mcs.anl.gov> | ||
Date: Wed, 17 Aug 2016 10:06:14 -0500 | ||
Subject: [PATCH] compile fix - when -DCOMMON_PTHREAD is not used | ||
|
||
https://bitbucket.org/petsc/petsc/issues/141/ | ||
http://gforge.inria.fr/tracker/index.php?func=detail&aid=19407&group_id=248&atid=1079 | ||
--- | ||
src/libscotch/common.h | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/libscotch/common.h b/src/libscotch/common.h | ||
index 7b50a59..ac8b79a 100644 | ||
--- a/src/libscotch/common.h | ||
+++ b/src/libscotch/common.h | ||
@@ -306,7 +306,9 @@ typedef struct ThreadGroupHeader_ { | ||
ThreadLaunchStartFunc stafptr; /*+ Pointer to start routine +*/ | ||
ThreadLaunchJoinFunc joifptr; /*+ Pointer to join routine +*/ | ||
ThreadBarrier barrdat; /*+ Barrier data structure +*/ | ||
-#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */ | ||
+#else /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */ | ||
+ int thrdnbr; /*+ Number of threads +*/ | ||
+#endif | ||
} ThreadGroupHeader; | ||
|
||
/** The thread header block. **/ | ||
-- | ||
2.7.4.1.g5468f9e | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it would be easier to set CFLAGS, etc. in
build.sh
instead ofMakefile
, and just haveCFLAGS = ${CFLAGS}
here. Makefiles aren't very good at logic.