Skip to content

[CI] Improve the tests for the linear solvers - #319

Open
amontoison wants to merge 2 commits into
masterfrom
pastix_ci
Open

[CI] Improve the tests for the linear solvers#319
amontoison wants to merge 2 commits into
masterfrom
pastix_ci

Conversation

@amontoison

Copy link
Copy Markdown
Collaborator

No description provided.

@amontoison

Copy link
Copy Markdown
Collaborator Author

@nimgould
I added CI tests with MUMPS v5.7.2 in #318 and all tests passed with Int32 and Int64. 👍
However I added CI tests with PASTIX v6.3.0 in this PR (only for Int32) and the tests failed. 👎

@nimgould

Copy link
Copy Markdown
Contributor

OK, I'll have a look. I think my pastix is out of date, so I'll install the latest first

@nimgould

Copy link
Copy Markdown
Contributor

The makefile double precision tests (both standalone via pastixt.F90 and as part of sls/sbls)
all work fine with pastix 6.3.2. However, the single precision ones don't get started; the spmGetArray function doesn't allocate the values array to the correct length. I will investigate further, but I have no idea why the meson double tests are failing

@amontoison

Copy link
Copy Markdown
Collaborator Author

I will upgrade the version installed with CI (6.3.0 -> 6.3.2) to check if the tests passed with this version.

@amontoison

Copy link
Copy Markdown
Collaborator Author

@nimgould I updated PaStiX to use the version 6.3.2 but single and double precision tests of PaStiX are still failing:

=================================== 74/460 ===================================
test:         GALAHAD:pastix+single+fortran / pastixt_single
start time:   17:16:18
duration:     0.15s
result:       killed by signal 11 SIGSEGV
command:      ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=88 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 LD_LIBRARY_PATH=/home/runner/work/GALAHAD/GALAHAD/builddir/:/opt/hostedtoolcache/Python/3.12.4/x64/lib:/home/runner/work/GALAHAD/GALAHAD/galahad/lib:/home/runner/work/GALAHAD/GALAHAD/../deps/lib:/home/runner/work/GALAHAD/GALAHAD/../CUTEst/lib /home/runner/work/GALAHAD/GALAHAD/builddir/pastixt_single
----------------------------------- stdout -----------------------------------
  eps    1.0000000474974513E-003
single
  size of row, col, val =            7           7           7
----------------------------------- stderr -----------------------------------
ischedInit: The thread number has been automatically set to 2

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fca35823970 in ???
#1  0x7fca35822ad5 in ???
#2  0x7fca3544251f in ???
#3  0x7fca354a53fe in ???
#4  0x7fca352f8d5f in ???
#5  0x7fca353e2fba in ???
#6  0x7fca35384b0d in ???
#7  0x7fca35394c6b in ???
#8  0x7fca35b68018 in ???
#9  0x55d624ceec3c in test_pastix
	at ../src/external/pastix/pastixt.F90:226
#10  0x55d624cef47b in main
	at ../src/external/pastix/pastixt.F90:7
==============================================================================

=================================== 75/460 ===================================
test:         GALAHAD:pastix+double+fortran / pastixt_double
start time:   17:16:18
duration:     0.15s
result:       killed by signal 11 SIGSEGV
command:      ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MALLOC_PERTURB_=104 LD_LIBRARY_PATH=/home/runner/work/GALAHAD/GALAHAD/builddir/:/opt/hostedtoolcache/Python/3.12.4/x64/lib:/home/runner/work/GALAHAD/GALAHAD/galahad/lib:/home/runner/work/GALAHAD/GALAHAD/../deps/lib:/home/runner/work/GALAHAD/GALAHAD/../CUTEst/lib /home/runner/work/GALAHAD/GALAHAD/builddir/pastixt_double
----------------------------------- stdout -----------------------------------
  eps    9.9999999999999998E-013
double
  size of row, col, val =            7           7           7
----------------------------------- stderr -----------------------------------
ischedInit: The thread number has been automatically set to 2

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f4f19423970 in ???
#1  0x7f4f19422ad5 in ???
#2  0x7f4f1904251f in ???
#3  0x7f4f190a53fe in ???
#4  0x7f4f18ef8d5f in ???
#5  0x7f4f18fe2fba in ???
#6  0x7f4f18f84b0d in ???
#7  0x7f4f18f94c6b in ???
#8  0x7f4f1976a018 in ???
#9  0x561ca02f7c36 in test_pastix
	at ../src/external/pastix/pastixt.F90:226
#10  0x561ca02f8475 in main
	at ../src/external/pastix/pastixt.F90:7
==============================================================================

Comment thread .github/meson/action.yml Outdated
@amontoison

amontoison commented Jul 11, 2024

Copy link
Copy Markdown
Collaborator Author

If I compile PASTIX without SCOTCH, the test pastixt in double precision works. 🤔

@nimgould

Copy link
Copy Markdown
Contributor

Oh, I should say that I took the advice from the Pastix page to set scotch on and metis off. This works for me. I suppose that it might well be a metis version clash (again!)

Comment thread .github/meson/action.yml Outdated
Comment thread .github/meson/action.yml Outdated
@amontoison

amontoison commented Jan 27, 2025

Copy link
Copy Markdown
Collaborator Author

@nimgould
I have this compilation error, I don't understand how a .mod can be broken?!

 [2842/4669] Compiling Fortran object pastixt_quadruple.p/src_external_pastix_pastixt.F90.o
FAILED: pastixt_quadruple.p/src_external_pastix_pastixt.F90.o 
gfortran -Ipastixt_quadruple.p -I. -I.. -Iinclude -I../include -I../src/dum/include -I../src/metis/include -Isrc/ampl -I../src/ampl -I../../deps/modules -I../../CUTEst/modules -I../../deps/include/spm -I../../deps/include/pastix -Ilibgalahad_quadruple.so.p -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -O0 -g -fopenmp -DLANCELOT_USE_MA57 -cpp -DREAL_128 -DGALAHAD_BLAS -DGALAHAD_LAPACK -DDUMMY_QMUMPS -DDUMMY_MKL_PARDISO -DDUMMY_PARDISO -DDUMMY_WSMP -DDUMMY_MPI -Jpastixt_quadruple.p -o pastixt_quadruple.p/src_external_pastix_pastixt.F90.o -c ../src/external/pastix/pastixt.F90
f951: Fatal Error: Reading module ‘libgalahad_quadruple.so.p/spmf_interfaces_quadruple.mod’ at line 304 column 51: Expected left parenthesis

I would like to test GALAHAD with PaStiX v6.4.0.
I was able to cross-compile this version, which means that all Julia users can use it in the next release of GALAHAD_jll.jl / GALAHAD.jl if we want.

@codecov-commenter

codecov-commenter commented Jan 27, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.92%. Comparing base (0103718) to head (dcc0966).

Files with missing lines Patch % Lines
include/galahad_sls_defaults_ls.h 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #319   +/-   ##
=======================================
  Coverage   26.92%   26.92%           
=======================================
  Files         164      165    +1     
  Lines       29202    29208    +6     
  Branches     8804     8806    +2     
=======================================
+ Hits         7863     7865    +2     
- Misses      18767    18769    +2     
- Partials     2572     2574    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nimgould

Copy link
Copy Markdown
Contributor

I have no idea. As you say, a bug in a mod file is unusual, I have never seen one before. Certainly there is no issue here with the quad test using the dummy pastix (but then I don't know if the real one supports 128 bit reals)

@amontoison

Copy link
Copy Markdown
Collaborator Author

We need to support PASTIX 6.4.0 if we want to use / test it. The interface in GALAHAD is for an older version and they changed the API...

@nimgould

Copy link
Copy Markdown
Contributor

Sigh ... do these people not understand how much it annoys their users if every minor version is different. This will be the third change in a year.

I'll have a look when I get a chance, do you know what changed?

@amontoison

Copy link
Copy Markdown
Collaborator Author

Nick, I have an issue when we deallocate the vectors in pastixt.
Do you have any idea why?
https://github.com/ralna/GALAHAD/blob/master/src/external/pastix/pastixt.F90#L234

@nimgould

Copy link
Copy Markdown
Contributor

It is not obvious to me. I'll try using a STAT = status for each allocate/deallocate

@amontoison
amontoison force-pushed the master branch 2 times, most recently from 9f9944b to e4dad0f Compare May 29, 2025 01:59
@amontoison
amontoison force-pushed the master branch 3 times, most recently from 4a8f5ce to 77ff109 Compare June 13, 2026 10:47
Comment thread .github/meson/action.yml Outdated
Comment thread .github/meson/action.yml Outdated
@amontoison
amontoison force-pushed the pastix_ci branch 2 times, most recently from 48fff85 to 95d97fc Compare July 8, 2026 22:01
@amontoison
amontoison requested a review from nimgould July 8, 2026 23:26
@nimgould

nimgould commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I am happy with this, both single and double precision stand-alone and sls tests pass. Thank you, Alexis!

@nimgould

nimgould commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Alas, it doesn't work with in64, but this is actually a pastix error as compiling with the -DPASTIX_INT64=ON flag fails as it requires 64-bit Scotch ... which is available as part of the scotch package. Seemingly Cmake just doesn't find it

@nimgould

nimgould commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Update: adding
-DSCOTCH_INCLUDE_DIRS="/usr/include/scotch-int64"
-DSCOTCH_DIR="/usr/lib/x86_64-linux-gnu/scotch-int64"
-DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/scotch-int64"

to the pastix Cmake built the 64-bit version. But now,

at line 4443 of file sls.F90
Fortran runtime error: Index '6' of dimension 1 of array 'data' outside of expected range (1:1)

which seems to be a result of some data misalignment following
CALL spmAlloc( data%spm )
...
CALL spmGetArray( ...

Inserting

write(6,*) SIZE( data%PTR ), SIZE( data%matrix%PTR )

before the failing line, I see

1 6

while for the 32-bit integer it is

6 6

Thus it looks like spmGetArray is not allocating the correct size

@amontoison

amontoison commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

Alas, it doesn't work with in64, but this is actually a pastix error as compiling with the -DPASTIX_INT64=ON flag fails as it requires 64-bit Scotch ... which is available as part of the scotch package. Seemingly Cmake just doesn't find it

I compile PaStiX with only METIS for the CI and it works (-DPASTIX_ORDERING_SCOTCH=OFF and -DPASTIX_ORDERING_METIS=ON).
I also got errors locally with SCOTCH but I am 99% sure that the issue is not in GALAHAD.

The build that failed for the CI was on Mac and I compile PaStiX only on linux (unrelated to this PR).
The failure was related to rqst_c_quadruple and it is just because it reached the time-out.

We should send the bug to Mathieu for SCOTCH + PaStiX.

@amontoison amontoison closed this Jul 10, 2026
@amontoison amontoison reopened this Jul 10, 2026
@amontoison amontoison changed the title Test GALAHAD with PASTIX Test GALAHAD with PaStiX Jul 11, 2026
@amontoison
amontoison force-pushed the pastix_ci branch 3 times, most recently from da3e711 to d9dec06 Compare July 12, 2026 20:33
@amontoison amontoison changed the title Test GALAHAD with PaStiX [CI] Improve the tests for the linear solvers Jul 12, 2026
@amontoison
amontoison force-pushed the pastix_ci branch 2 times, most recently from 42cb2f4 to 8fd1a26 Compare July 12, 2026 22:58
@nimgould

Copy link
Copy Markdown
Contributor

This works with the makefile build. I am not sure I understand the "conflicts" message above, the version I get from a pull on pastix_ci seems fine

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.

3 participants