-
-
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
single Makefile.inc and build.sh for scotch and ptscotch #15
Conversation
only include deviations from default in platform Makefiles
because we restored -DSCOTCH_PTHREAD
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Sorry about the removal of |
@minrk Either on Linux or macOS we use GNU Make. Then, why don't we just provide ifeq ($(shell uname ),Linux)
ABC = xyz
else
ABC = xyz
endif |
recipe/Makefile.inc.Darwin
Outdated
RANLIB = ranlib | ||
YACC = bison -pscotchyy -y -b y | ||
CLIBFLAGS := $(CLIBFLAGS) -fPIC | ||
LDFLAGS := $(LDFLAGS) -Wl,-headerpad_max_install_names |
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.
Maybe we are doing something wrong here? Isn't conda build
supposed to pass -Wl,-headerpad_max_install_names
in the LDFLAGS
environ var?
recipe/Makefile.inc.common
Outdated
CCD = gcc | ||
CFLAGS = -I${PREFIX}/include -O3 -DIDXSIZE64 -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DCOMMON_PTHREAD -DCOMMON_PTHREAD_BARRIER -DSCOTCH_PTHREAD | ||
CLIBFLAGS = | ||
LDFLAGS = -L${PREFIX}/lib -lz -lm -pthread |
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.
Maybe we should do LDFLAGS := ${LDFLAGS} -L${PREFIX}/lib -lz -lm -pthread
?
recipe/build.sh
Outdated
cp $RECIPE_DIR/Makefile.inc.$(uname) src/Makefile.inc | ||
|
||
cd src/ | ||
make esmumps | tee make.log 2>&1 | ||
make -j ${NUM_CPUS} esmumps | tee make.log 2>&1 |
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.
Are you sure all makefiles are properly written to support parallel builds?
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.
I've just tested and they certainly aren't! Removed.
seems to be a weird race
recipe/Makefile.inc
Outdated
AR = ar | ||
ARFLAGS = -ruv | ||
CAT = cat | ||
CCS := ${CC} |
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.
I think you hae to do it this way:
CCS = ${CC}
CCP = ${CCS}
CCD = ${CCP}
Then, in build.sh
, and only for ptscotch
, export CCP=mpicc
.
recipe/build.sh
Outdated
|
||
if [[ "$(uname)" == "Darwin" ]]; then | ||
export CFLAGS="${CFLAGS} -DCOMMON_PTHREAD_BARRIER -DCOMMON_TIMING_OLD" | ||
export CLIBFLAGS="${CLIBFLAGS} -fPIC" |
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.
We need -fPIC
both in Linux and macOS. Otherwise we may not be able to build a sharedlib PETSc.
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.
Maybe just seeting CLIBFLAGS = -fPIC
in Makefile.inc
is good enough?
@minrk Looking at your comment in #16, you are definitely right, ptscotch does not actually depend on scotch. The problem is that when you build ptscotch, you also get the scotch libraries and headers in the install tree. So I expect that some third-party libraries (that's the case of PETSc) would expect both the scotch and ptscotch variants at configure time. Making ptscotch depend on scotch would make things simpler. But of course we can just update the PETSc recipe to depend on both scotch and ptscotch. |
We also have a problem with the |
Should the ptscotch install exclude the scotch libraries? I would think that installing ptscotch and scotch would be mutually exclusive, especially since the scotch build flags should be different depending on whether it's used for ptscotch or not (e.g. |
Yes, for sure the ptscotch install exclude the scotch libraries. But our |
Just to make things clear: Right now, the ptscotch package in anaconda.org contains sequential and parallel libraries, with the exceptions of However, installing both scotch and ptscotch together in a conda environment should work, all libraries have different names, the same for headers (with the exception of |
@minrk Oh! Hold on, |
only include deviations from default in platform Makefiles
build number is bumped because -DSCOTCH_PTHREAD is restored, which had been removed.