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

Pull correct linux arch for stanc3 #1033

Merged
merged 2 commits into from
Aug 20, 2021
Merged

Pull correct linux arch for stanc3 #1033

merged 2 commits into from
Aug 20, 2021

Conversation

andrjohns
Copy link
Contributor

Submisison Checklist

  • Run tests: ./runCmdStanTests.py src/test
  • Declare copyright holder and open-source license: see below

Summary:

This PR adds the functionality for downloading the stanc3 for additional architectures on linux. The following architectures are now supported:

  • arm64
  • armel
  • armhf
  • mips64el
  • ppc64el
  • s390x

I've tested this under QEMU, and the correct stanc3 binary is downloaded and the bernoulli model compiles and runs under all architectures

Intended Effect:

Automatic support for cmdstan across more linux architectures

How to Verify:

Call make build on a non-x86 linux system

Side Effects:

N/A

Documentation:

N/A

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Andrew Johnson

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 2.88 2.97 0.97 -3.29% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.98 -2.47% slower
eight_schools/eight_schools.stan 0.1 0.1 1.02 1.79% faster
gp_regr/gp_regr.stan 0.15 0.15 0.99 -0.81% slower
irt_2pl/irt_2pl.stan 5.84 5.83 1.0 0.11% faster
performance.compilation 89.01 86.8 1.03 2.48% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.61 8.53 1.01 0.92% faster
pkpd/one_comp_mm_elim_abs.stan 30.62 29.02 1.05 5.21% faster
sir/sir.stan 141.63 124.25 1.14 12.27% faster
gp_regr/gen_gp_data.stan 0.03 0.03 1.0 -0.43% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 3.02 3.0 1.01 0.68% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.39 0.41 0.95 -5.02% slower
arK/arK.stan 2.54 1.87 1.36 26.41% faster
arma/arma.stan 0.76 0.83 0.91 -9.82% slower
garch/garch.stan 0.67 0.71 0.96 -4.68% slower
Mean result: 1.02430466089

Jenkins Console Log
Blue Ocean
Commit hash: efc8b65


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@rok-cesnovar
Copy link
Member

Will take a look a bit later. What do you think would be the best way of providing the tarballs at release time?

A separate tarball for each arch? I guess a single tarball would be huge.

And the names of the tarballs would be the same as the ARCH_TAG you use here? That would mean

cmdstan-2.28.0-linux-mips64el.tar.gz
cmdstan-2.28.0-linux-ppc64el.tar.gz
cmdstan-2.28.0-linux-s390x.tar.gz
cmdstan-2.28.0-linux-arm64.tar.gz // exists already
cmdstan-2.28.0-linux-armel.tar.gz
cmdstan-2.28.0-linux-armhf.tar.gz

Does that work for you?

@andrjohns
Copy link
Contributor Author

Yeah a separate tarball for each with the ARCH_TAG would be best (if that's not too many tarballs!). Is that build process somewhere? I can make those changes as well, if it's easier

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 2.9 2.91 1.0 -0.38% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.98 -1.74% slower
eight_schools/eight_schools.stan 0.1 0.1 1.02 2.3% faster
gp_regr/gp_regr.stan 0.16 0.16 1.0 0.29% faster
irt_2pl/irt_2pl.stan 5.89 5.83 1.01 1.01% faster
performance.compilation 89.2 86.81 1.03 2.67% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 8.73 8.58 1.02 1.66% faster
pkpd/one_comp_mm_elim_abs.stan 30.41 31.59 0.96 -3.89% slower
sir/sir.stan 139.63 123.67 1.13 11.43% faster
gp_regr/gen_gp_data.stan 0.03 0.03 0.99 -1.31% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 3.04 3.0 1.01 1.09% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.39 0.39 1.01 0.65% faster
arK/arK.stan 2.51 1.87 1.34 25.26% faster
arma/arma.stan 0.76 0.83 0.91 -9.38% slower
garch/garch.stan 0.67 0.71 0.94 -6.32% slower
Mean result: 1.02327422656

Jenkins Console Log
Blue Ocean
Commit hash: 69b7947


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@rok-cesnovar
Copy link
Member

Is that build process somewhere? I can make those changes as well, if it's easier

@serban-nicusor-toptal does the tarball packaging and can tell you more about that, but I guess that is just a bash script that lives in some other repository?

Copy link
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@rok-cesnovar rok-cesnovar merged commit beb8764 into stan-dev:develop Aug 20, 2021
@andrjohns andrjohns deleted the feature/multiarch_linux branch August 20, 2021 09:12
@serban-nicusor-toptal
Copy link
Contributor

serban-nicusor-toptal commented Aug 20, 2021

For the cmdstan tarball I have a 3 line script locally that just archives it (after release) and removes the weird files mac adds.
The original release script can be found here, hope that helps. If you need any help with this please let me know!

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.

4 participants