minicern fixes#20556
Conversation
couet
commented
Nov 27, 2025
- Put PAWC and QUEST common blocks to have a unique centralised definition
- In kernlib.f: enlarge the size of the input string MT to be compatible with some calls.
- In zebra.f: use pawc.inc and quest.inc
- In hbook.f: use pawc.inc and quest.inc, fixes the output character strings called from C++
There was a problem hiding this comment.
Thanks a lot, I think this goes in the right direction,
but with these changes I still get crash on alma9 arm64 and mac14 if I remove the -O0 flag, which is a sign that there is something still fishy with the memory mapping C vs Fortran
See failure here: https://github.com/root-project/root/actions/runs/19748615052/job/56587668201?pr=20538
as well as https://github.com/root-project/root/actions/runs/19748615052/job/56587668122?pr=20538
*** Break *** segmentation violation
Generating stack trace...
0x000000000040a7ec in hrfile_ at /github/home/ROOT-CI/src/misc/minicern/src/hbook.f:343 from h2root
0x000000000040feb8 in hropen_ at /github/home/ROOT-CI/src/misc/minicern/src/hbook.f:268 from h2root
0x0000000000404d70 in main at /github/home/ROOT-CI/src/main/src/h2root.cxx:333 from h2root
0x0000ffff94cf8540 in <unknown> from /lib64/libc.so.6
0x0000ffff94cf8618 in __libc_start_main at :? from /lib64/libc.so.6
0x00000000004050b0 in _start + 0x30 from h2root
-- BEGIN TEST OUTPUT --
RZIODO. Error at record = 2 LUN = 10 IOSTAT = 5001
>>>>>> CALL RZEND(CHDIR)
Cannot open fileHROPEN 0
Error on hropen was 101
Error cannot open input file: mb4i1.hbook
If you turn on address sanitizer on minicern/CMakeLists.txt it will show some warnings
Test Results3 687 tests 3 677 ✅ 3h 55m 50s ⏱️ For more details on these failures, see this check. Results for commit 1c52712. ♻️ This comment has been updated with latest results. |
|
I can reproduce the crash on macphsft19. |
|
Maybe using https://cmake.org/cmake/help/latest/module/FortranCInterface.html, https://fortran-lang.discourse.group/t/cmake-fortrancinterface/7573 could help in simplifying the connection C - Fortran |
|
If I turn on Wall Wextra warnings via several warnings of the type: |
- Remove some unused labels - Initialize some un-initialized variables - Fix some rank mismatches
|
let's see what happens on mac beta after rebasing. |
|
Unfortunately these fixes have no effect on the current issue on macbeta. |
| @@ -1829,14 +1591,7 @@ FUNCTION HIE(IDD,I) | |||
| +LSLIY,LBANX,LBANY,LPRX,LPRY,LFIX,LLID,LR1,LR2,LNAME,LCHAR,LINT, | |||
| +LREAL,LBLOK,LLBLK,LBUFM,LBUF,LTMPM,LTMP,LTMP1,LHPLIP,LHDUM(9), | |||
| +LHFIT,LFUNC,LHFCO,LHFNA,LCIDN | |||
There was a problem hiding this comment.
| INCLUDE 'param3.inc' |
There are 39 repetitions of this same block in this file. Moving it to param3.inc would improve readability and shorten code.
There was a problem hiding this comment.
| INCLUDE 'param4.inc' |
There are 11 repetitions of this pattern
| @@ -2427,7 +2103,7 @@ SUBROUTINE HFIND(IDD,CHROUT) | |||
| + NH ,MSTEP ,NOENT ,NOLD ,IDOLAR,IBLANC,KBINSZ,INO , | |||
| + KSQUEZ,NCOLMA,NCOLPA,NLINPA,BIGP ,ICBLAC,ICSTAR,ICFUNC, | |||
| + IDG ,MAXBIT,IDENT | |||
There was a problem hiding this comment.
| INCLUDE 'param5.inc' |
4 repetitions of this pattern
INTEGER IFW ,NW ,NB ,IH ,NHT ,ICN ,IPONCE,
+ NH ,MSTEP ,NOENT ,NOLD ,IDOLAR,IBLANC,KBINSZ,INO ,
+ KSQUEZ,NCOLMA,NCOLPA,NLINPA, ICBLAC,ICSTAR,ICFUNC,
+ IDG(42),MAXBIT(30),IDENT(9)
REAL BIGP
COMMON/HCPRIN/IFW ,NW ,NB ,IH ,NHT ,ICN ,IPONCE,
+ NH ,MSTEP ,NOENT ,NOLD ,IDOLAR,IBLANC,KBINSZ,INO ,
+ KSQUEZ,NCOLMA,NCOLPA,NLINPA,BIGP ,ICBLAC,ICSTAR,ICFUNC,
+ IDG ,MAXBIT,IDENT