Skip to content

Support s390x #29637

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

Open
Kaiden42 opened this issue Oct 14, 2018 · 8 comments
Open

Support s390x #29637

Kaiden42 opened this issue Oct 14, 2018 · 8 comments
Labels
feature Indicates new feature / enhancement requests help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@Kaiden42
Copy link

Hello,
I'm referring to Issue #21474. I've been working in programming for a few years at one of the largest German insurance companies (R+V Versicherung) and I'm very interested in Julia.
Since our company strategically relies on the mainframe alongside other platforms, I asked our management if we could provide community access to our s390x machines.
The management is also very interested that we gain experience with Julia because there are many mathematical operations in the company that need to be processed.
So I talked to our z/OS and zLinux groups and we have some questions for you:

  • is there still any interest in a port for the s390x?
  • do you need access to zLinux or zOS?
  • what parameters do you need for a z guest roughly (mem, disk, IO bandwidth, #cpu, ...)?

We would be happy to support the community.

@cdluminate
Copy link
Contributor

cdluminate commented Oct 16, 2018

Let me add a hint: s390x architecture lacks libunwind support. After disabling libunwind, the buildlog suggests that some work is needed in LLVM.
https://launchpad.net/~lumin0/+archive/ubuntu/ppa/+sourcepub/9482958/+listing-archive-extra
https://launchpadlibrarian.net/393051331/buildlog_ubuntu-cosmic-s390x.julia_1.0.1-2~u1_BUILDING.txt.gz

@ViralBShah
Copy link
Member

I think it would be best to approaching ibm to support this commercially. In the past ibm has given small sums of money for a ppc port as a one off but not at a sustainable way.

@ViralBShah
Copy link
Member

Also isn't it big endian? That would be a considerable porting effort, quite likely.

@cdluminate
Copy link
Contributor

Also isn't it big endian? That would be a considerable porting effort, quite likely.

s390x is Big Endian.

@ViralBShah
Copy link
Member

I think at this time the best thing would be to go with one of the 1.0 supported architectures. If supporting s390x is essential, it would be best to start a joint dialogue with IBM.

@cfilleke
Copy link

cfilleke commented Dec 29, 2019

  • Julia full 1.0.5 (tarball download) compiles cleanly with make debug USE_SYSTEM_PCRE=1 USE_SYSTEM_LIBM=1 DISABLE_LIBUNWIND=1 CFLAGS=-DNDEBUG on a z/VM running RHEL 8.1
  • all prerequisite tools installed and dependencies resolved out of the official @redhat repositories.
  • it bails on bootstrap so looking at the debug compile through the eyes of gdb
  • compiles with same bootstrap error with and without debug flags
$make debug  USE_SYSTEM_PCRE=1 USE_SYSTEM_LIBM=1 DISABLE_LIBUNWIND=1 CFLAGS=-DNDEBUG
...
    JULIA usr/lib/julia/corecompiler.ji
LLVM ERROR: Cannot select: 0x6dee280: i64 = addrspacecast[0 -> 10] 0x6dee218
  0x6dee218: i64,ch = load<LD8[@"jl_global#16"](tbaa=<0x6d125b8>)(dereferenceable)(invariant)> 0x6ded100:1, 0x6ddee50, undef:i64
    0x6ddee50: i64,ch = load<LD8[GOT]> 0x6d79fe0, 0x6dee5c0, undef:i64
      0x6dee5c0: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64<%jl_value_t** @"jl_global#16"> 0 [TF=1]
        0x6dee968: i64 = TargetGlobalAddress<%jl_value_t** @"jl_global#16"> 0 [TF=1]
      0x6ddecb0: i64 = undef
    0x6ddecb0: i64 = undef
In function: japi1_top-level scope_0
make[1]: *** [Makefile:188: /root/julia-1.0.5/usr/lib/julia/corecompiler.ji] Error 1
make: *** [Makefile:75: julia-sysimg] Error 2
  • Not too familiar with the code base, but it looks like the PCRE wrapper and ABI code would be the first place to start looking at architectural mods that would need to be made
  • Any further hints as to where in the julia code a high concentration of little endian assumptions are made would be useful
  • Looking at seeing if IBM's libunwind mods for Z can be used
  • Julia on Z is essential imho @edelsohn

@alfasst
Copy link

alfasst commented Jun 30, 2021

Some update. Tried to build the latest version of Julia - v1.6.1 on an IBM Cloud Hyper Protect Virtual Server-iz. Got this error.

make[2]: *** No rule to make target 'trampolines/trampolines_s390x.S', needed by 'build/trampolines/trampolines_s390x.o'.  Stop.
/root/julia/deps/blastrampoline.mk:14: recipe for target 'scratch/blastrampoline-23de7a09bf354fe6f655c457bab5bf47fdd2486d/build-compiled' failed
make[1]: *** [scratch/blastrampoline-23de7a09bf354fe6f655c457bab5bf47fdd2486d/build-compiled] Error 2
Makefile:60: recipe for target 'julia-deps' failed
make: *** [julia-deps] Error 2

@StefanKarpinski
Copy link
Member

That's a new feature where some simple assembly code is needed on each platform to allow dynamically swapping out BLAS libraries, which is a common request since many people want to use MKL on Intel. The trampoline code for s390x will need to be provided.

@nsajko nsajko added help wanted Indicates that a maintainer wants help on an issue or pull request feature Indicates new feature / enhancement requests labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates new feature / enhancement requests help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

7 participants