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

Julia Build - Linux on Power (LoP) #35801

Closed
IBMRK opened this issue May 8, 2020 · 6 comments
Closed

Julia Build - Linux on Power (LoP) #35801

IBMRK opened this issue May 8, 2020 · 6 comments
Labels

Comments

@IBMRK
Copy link

IBMRK commented May 8, 2020

Hi

I would like to offer my experience of building Julia on Linux on Power (LoP - RHEL 7) on Docker - first background (which will hopefully help others), then I'll share my ask/question or request for some assistance from the Julia team at the end - apologies in advance for the long post, and if I'm being less than Julianic (made that up from the Python people) since I'm a bit (very) new to this.

Finally, (if the Julia team is open to it) I'm willing to offer some help or collaboration to (maybe?) get a precompiled version of Julia going for Linux on Power (LoP)? All best-effort basis, of course. Others should not have to suffer the same blood and sweat.

Background

I've just finished building Julia 1.41 from source on Linux on Power (LoP).

My whole purpose for getting Julia working was to run Eirene for topological calculations.

I've managed (after too much effort) to build Julia within a Docker container (Ubuntu 18.04) running on RHEL 7 on (LoP). BTW, I was able to do this on Docker (also Ubuntu 18.04) relatively easily first on my Mac which runs INTEL of course. Took time, but worked well.

After countless searches for the last 4 weeks (LoP build) ... I managed to etch out this.

I used the following compilation flags in the Make.inc, and compile was successful:
USE_BINARYBUILDER:=0
USE_BINARYBUILDER_LLVM:=1
JULIA_PRECOMPILE:=0 <---- without this precompilation crashed on LLVM, darn!

Then real trouble set in, as HDF5 would NOT work. Spent a few weeks on this.

Eventually, a found an obscure post of someone (bless him/her building on ARM) where they recommended downgrading HDF5 to 0.11 from the original 0.13.2 (which was not working at all):

  1. Pkg.add("HDF5") <--- adds the 0.13.2 version, which is bust (see 2. below)
  2. using HDF5 <--- generates error "ERROR: LoadError: UndefVarError: libhdf5 not defined"
  3. apt-get install -y libhdf5-serial-dev hdf5-tools <--- does not help, even when used with LD_LIBRARY_PATH or LIBRARY_PATH for julia run or compilation (I compiled run after run, no luck)
  4. conda install hdf5 <--- neither does this help on the Miniconda/Anaconda installation, then compile and try ... no luck

Finally, this works:
5. Pkg.rm("HDF5") <--- "removes HDF5", best I know
6. ]
7. add [email protected] <--- apparently downgrades HDF5. Installs other stuff too ... no idea of the details (Homebrew, WinRPM) ... bizarre for an inexperienced Julia builder

After that, my Eirene installs and runs!

Questions/Request/Issues - All in the context of (LoP, Docker on LoP)

  1. Is it possible to get the current version of HDF5 working without the elaborate workaround and downgrade to 0.11 that worked for me? I'm open to exploring how ...

  2. I don't know for sure (just reading between the lines), but it seems that the "standard" HDF5 is not as fast as a native OS library version (I think, based on posts). Is it possible to get a faster version working on (LoP)? I'm open to exploring how ...

  3. Is it possible to get precompilation completed successfully during the compile without using "JULIA_PRECOMPILE:=0"? I'm open to exploring how ... does this even matter much is probably a better question?

Happy to open these questions/issue separately as best ...

Naturally, I'll be very embarrassed if all this is done and known, available in a place I didnt know to look at first ;)

@vchuravy
Copy link
Member

vchuravy commented May 8, 2020

Hello @IBMRK, there is a #power channel on the Julia slack and you you can contact me directly on Slack as well.

  1. The just tagged Julia 1.5 should be a much better target, since we fixed the build-system issue and it should build without any changes to your Make.user
  2. Can you post the LLVM crash? That looks like an issue I might want to look into.
  3. HDF5 should work once we provide binaries for it through Build HDF5 for Power JuliaPackaging/Yggdrasil#1009
    You can use a Overrides.toml in the meantime, but I would rather fix it properly.

Naturally, I'll be very embarrassed if all this is done and known, available in a place I didnt know to look at first ;)
Well there is "some" information that I collected on https://github.com/JuliaLabs/julia-on-summit, but generally our PPC support isn't as stable as it should be.
Things are getting better though, and 1.5 should be improved in that regard.

Thank you for plowing on, despite the less than ideal user-experience. There are some IBM'lers (cc: @shirodkara, and @gerrith3) here and I am hoping to make Julia on Power are much better experience over the next months.

@vchuravy vchuravy added the system:powerpc PowerPC label May 8, 2020
@IBMRK
Copy link
Author

IBMRK commented May 11, 2020

Thanks Valentin, I'll reach out my fellow IBMers and connect to share our experiences, plus will keep you in the loop.

Please tell me what you need regarding the LLVM crash. I can send you a log of the make as a start. Does that help?

@vchuravy
Copy link
Member

Yes please post the log, which commit you used, what compiler version was used.

@IBMRK
Copy link
Author

IBMRK commented May 13, 2020

Hi Valentin,

Please find the info requested within an archive file:

  1. Make.inc <-- excluded JULIA_PRECOMPILE:=0, which is the reason the LLVM crashes on precompile

  2. nohup.out <--- bottom of file shows the crash on precompile. "make -j 12" was used as input

  3. OS Info <-- includes output of "apt list", "uname -a" and "gcc --version"

Let me know if you need anything else. You're welcome to reach me on my company address directly as well, as best.

Kind Regards
Build-Info.zip

@IBMRK
Copy link
Author

IBMRK commented May 13, 2020

Hi Valentin,

Just remembered that I didn't provide you with which "build" of 1.41 I used.

I attached the tar ball - apologies since I honestly can't figure out which link I used (I did try to find it) at the time because of the desperation to get things working and trying so many until something 'worked'. Luckily this is a small file, but sorry for the sloppiness.

Kind Regards
K
julia-1.4.1-source.tar.gz

@vchuravy
Copy link
Member

Closing this since Julia 1.6 compiles on PPC. Please let me know if you run into any other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants