Skip to content

Commit a517cb9

Browse files
authored
Update the Julia interface to support both Int32 and Int64 (#358)
* Update the Julia interface to support both Int32 and Int64 * Add Julia wrappers for the support of Int64 * Improve rewriter.jl * Test the Julia interface with Int32 and Int64 * Fix the header of LHS * Regenerate the Julia wrappers * Update GALAHAD.jl/gen/README.md * Update the linear solver in test_sbls.jl * Use SSIDS in test_sbls.jl * Update test_sbls.jl * Set control.print_level = 1 * Update test_sbls.jl * Update again test_sbls.jl
1 parent c3d1e13 commit a517cb9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+20383
-9009
lines changed

.github/meson/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ runs:
2929
- name: Install Meson and Ninja
3030
shell: bash
3131
run: |
32-
pip install meson==1.4.1
32+
pip install meson==1.6.1
3333
pip install ninja numpy
3434
3535
- name: Set the environment variables
@@ -310,10 +310,10 @@ runs:
310310
path: builddir/meson-logs/testlog.txt
311311

312312
- name: Install Julia
313-
if: (inputs.int == '32') && !(inputs.os == 'windows-latest' && inputs.compiler == 'intel')
313+
if: (inputs.os != 'windows-latest' || inputs.compiler != 'intel')
314314
uses: julia-actions/setup-julia@v2
315315

316316
- name: Test GALAHAD.jl
317-
if: (inputs.int == '32') && !(inputs.os == 'windows-latest' && inputs.compiler == 'intel')
317+
if: (inputs.os != 'windows-latest' || inputs.compiler != 'intel')
318318
shell: bash
319319
run: julia --color=yes -e 'using Pkg; Pkg.develop(path="GALAHAD.jl"); Pkg.test("GALAHAD")'

GALAHAD.jl/gen/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ package is named `abcd`, insert the following line in `wrapper.jl`:
9999
(name == "all" || name == "abcd") && wrapper("abcd", ["$galahad/galahad_abcd.h"], optimized)
100100
```
101101

102-
Please also check the variable `nonparametric_structures` in `rewriter.jl`
103-
to specify if a structure should be parameterized or not to work in single
104-
and double precision (`Float32` and `Float64`).
102+
Please also check the variables `nonparametric_structures_float` and
103+
`nonparametric_structures_int` in `rewriter.jl` to specify whether a structure should be
104+
parameterized to support various precisions (`Float32` / `Float64` / `Float128`)
105+
or integer types (`Int32`, `Int64`).
105106

106107
The final step involves updating `GALAHAD.jl/src/GALAHAD.jl` by
107108
appending the following two lines at the end of the file:

GALAHAD.jl/gen/rewriter.jl

+134-46
Large diffs are not rendered by default.

GALAHAD.jl/src/GALAHAD.jl

+11-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,20 @@ if haskey(ENV, "JULIA_GALAHAD_LIBRARY_PATH")
99
const libgalahad_single = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_single.$dlext")
1010
const libgalahad_double = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_double.$dlext")
1111
const libgalahad_quadruple = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_quadruple.$dlext")
12+
const libgalahad_single_64 = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_single_64.$dlext")
13+
const libgalahad_double_64 = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_double_64.$dlext")
14+
const libgalahad_quadruple_64 = joinpath(ENV["JULIA_GALAHAD_LIBRARY_PATH"], "libgalahad_quadruple_64.$dlext")
1215
const GALAHAD_INSTALLATION = "CUSTOM"
1316
else
14-
using OpenBLAS32_jll
15-
using GALAHAD_jll
17+
import OpenBLAS32_jll
18+
import GALAHAD_jll
1619
const GALAHAD_INSTALLATION = "YGGDRASIL"
20+
const libgalahad_single = GALAHAD_jll.libgalahad_single
21+
const libgalahad_double = GALAHAD_jll.libgalahad_double
22+
const libgalahad_quadruple = ""
23+
const libgalahad_single_64 = GALAHAD_jll.libgalahad_single_64
24+
const libgalahad_double_64 = GALAHAD_jll.libgalahad_double_64
25+
const libgalahad_quadruple_64 = ""
1726
end
1827

1928
function __init__()

GALAHAD.jl/src/wrappers/arc.jl

+442-161
Large diffs are not rendered by default.

GALAHAD.jl/src/wrappers/bgo.jl

+464-157
Large diffs are not rendered by default.

GALAHAD.jl/src/wrappers/blls.jl

+440-149
Large diffs are not rendered by default.

GALAHAD.jl/src/wrappers/bllsb.jl

+308-116
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)