Skip to content
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

Add BB downloading for OpenBLAS #30497

Merged
merged 4 commits into from
Dec 29, 2018
Merged

Add BB downloading for OpenBLAS #30497

merged 4 commits into from
Dec 29, 2018

Conversation

staticfloat
Copy link
Member

Also make it easier to use BinaryBuilder tarballs for dependencies.

Copy link
Member

@vchuravy vchuravy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! That looks good.

Makefile Outdated
@@ -184,7 +184,7 @@ COMPILER_SRCS += $(shell find $(JULIAHOME)/base/compiler -name \*.jl)
# sort these to remove duplicates
BASE_SRCS := $(sort $(shell find $(JULIAHOME)/base -name \*.jl -and -not -name sysimg.jl) \
$(shell find $(BUILDROOT)/base -name \*.jl -and -not -name sysimg.jl))
STDLIB_SRCS := $(JULIAHOME)/base/sysimg.jl $(shell find $(build_datarootdir)/julia/stdlib/$(VERSDIR)/*/src -name \*.jl)
STDLIB_SRCS := $(JULIAHOME)/base/sysimg.jl $(shell find $(JULIAHOME)/stdlib/*/src -name \*.jl)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this with an out-of-tree build? It also seems orthogonal got this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is a question I had for Jameson that I posted as a comment on the commit it was introduced in. Hopefully when @vtjnash reads this, he can explain to me why this is wrong. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've put this in a separate PR: #30518

@staticfloat staticfloat changed the title [WIP] Add BB downloading for OpenBLAS Add BB downloading for OpenBLAS Dec 27, 2018
@staticfloat staticfloat force-pushed the sf/openblas_bb branch 2 times, most recently from c136b32 to d85cb84 Compare December 27, 2018 10:17
@@ -1,2 +1,4 @@
OPENBLAS_BRANCH=v0.3.3
OPENBLAS_SHA1=fd8d1868a126bb9f12bbc43b36ee30d1ba943fbb
OPENBLAS_VER=0.3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this 0.3.0 or 0.3.3

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch; I'll build v0.3.3 in Yggdrasil, update this PR, then also submit a PR to bump to v0.3.4, since that looks like it has some important fixes.

@staticfloat staticfloat changed the title Add BB downloading for OpenBLAS [WIP] Add BB downloading for OpenBLAS Dec 28, 2018
Also make it easier to add more BB-cached versions of dependencies in the future
@staticfloat staticfloat changed the title [WIP] Add BB downloading for OpenBLAS Add BB downloading for OpenBLAS Dec 28, 2018
@staticfloat
Copy link
Member Author

Alright I think this is good to go, as long as it passes green on our CI.

contrib/fixup-libgfortran.sh Outdated Show resolved Hide resolved
contrib/normalize_triplet.py Show resolved Hide resolved
# only get something like `@rpath/libgfortran.5.dylib` when inspecting the
# libraries. We can, as a last resort, ask `$FC` directly what the full
# filepath for this library is, but only if we don't have a direct path to it:
if [ $(dirname "$1") == "@rpath" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't == also a Bash thing? And what about ${FC:-gfortran}?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${FC:-gfortran} should be fine, according to this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, cool. As for the conditional, you could make it if [ "$(dirname "$1")" = "@rpath" ].

@staticfloat staticfloat merged commit 87c18d8 into master Dec 29, 2018
@ararslan ararslan deleted the sf/openblas_bb branch December 29, 2018 07:57
configure-$(1):
compile-$(1):
fastcheck-$(1):
check-$(1):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these targets are incorrect and/or should not be here, they should not be empty

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're here to ensure that if someone uses bb-install within an ifeq/else statement, you don't run into a target fastcheck-openblas undefined error. If the target is already defined, this won't do anything.

$$(JLDOWNLOAD) $$@ $$($(2)_BB_URL)

$$(BUILDDIR)/$(1)-$$($(2)_BB_NAME)/build-compiled: | $$(BUILDDIR)/$(1)-$$($(2)_BB_NAME)/$(2).$$($(2)_BB_TRIPLET).tar.gz
echo 1 > $$@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the checksum verification should happen here before the echo 1 step

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right; we haven't been verifying checksums for the BB install tarballs. Whoopsies.

staticfloat added a commit that referenced this pull request Dec 30, 2018
* Auto-detect binarybuilder triplet

* Add OpenBLAS BinaryBuilder installation scaffolding

Also make it easier to add more BB-cached versions of dependencies in the future

* Enable `fixup-libgfortran.sh` to directly ask `$FC` for paths

* Tell Appveyor and Travis to use BinaryBuilder OpenBLAS

Also allow the build system to auto-guess the triplet
Keno added a commit that referenced this pull request Dec 30, 2018
ararslan added a commit that referenced this pull request Dec 31, 2018
@@ -198,6 +196,7 @@ if [ -n "$USEMSVC" ]; then
else
# Use BinaryBuilder
echo 'USE_BINARYBUILDER_LLVM = 1' >> Make.user
echo 'USE_BINARYBUILDER_OPENBLAS = 1' >> Make.user
echo 'BINARYBUILDER_LLVM_ASSERTS = 1' >> Make.user
echo 'override DEP_LIBS += llvm openlibm' >> Make.user
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blas needs to be added here. Right now we are still pulling it from latest

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean pulling it from latest?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$curlflags -O https://julialangnightlies-s3.julialang.org/bin/winnt/x$archsuffix/$f

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see; so this is like a hacky way of working around USE_SYSTEM_OPENBLAS?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... we pull in dependencies from the nightly build, then pretend that they are system libraries, but for the binarybuilder we then need too add those back... Don't ask me why I just work here... ;)

staticfloat added a commit that referenced this pull request Jan 4, 2019
* Auto-detect binarybuilder triplet

* Add OpenBLAS BinaryBuilder installation scaffolding

Also make it easier to add more BB-cached versions of dependencies in the future

* Enable `fixup-libgfortran.sh` to directly ask `$FC` for paths

* Tell Appveyor and Travis to use BinaryBuilder OpenBLAS

Also allow the build system to auto-guess the triplet
KristofferC pushed a commit that referenced this pull request Jan 11, 2019
* Auto-detect binarybuilder triplet

* Add OpenBLAS BinaryBuilder installation scaffolding

Also make it easier to add more BB-cached versions of dependencies in the future

* Enable `fixup-libgfortran.sh` to directly ask `$FC` for paths

* Tell Appveyor and Travis to use BinaryBuilder OpenBLAS

Also allow the build system to auto-guess the triplet

(cherry picked from commit 87c18d8)
This was referenced Jan 11, 2019
@StefanKarpinski StefanKarpinski added triage This should be discussed on a triage call backport 1.0 and removed backport 1.0 triage This should be discussed on a triage call labels Jan 31, 2019
@JeffBezanson
Copy link
Member

Is this needed for 1.0 releases?

@staticfloat
Copy link
Member Author

I don’t think so. Let’s not backport build fixes unless someone needs them.

@KristofferC KristofferC removed backport 1.0 triage This should be discussed on a triage call labels Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants