We used an old version (Ver.1.0.10.5.8a6) of SAD on KEKCC for Belle II beam background simulation. Recently KEKCC upgraded servers and OS from CentOS 7 to Red Hat Enterprise Linux release 9.3. The documented compilation instruction by Andrii doesn't work any more. We're here to ask for your help to make SAD work again on KEKCC.
System info on KEKCC since September 1, 2024
- Red Hat Enterprise Linux release 9.3 (Plow)
- Linux version 5.14.0-362.8.1.el9_3.x86_64 (mockbuild@x86-vm-07.build.eng.bos.redhat.com) (gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2), GNU ld version 2.35.2-42.el9) #1 SMP PREEMPT_DYNAMIC Tue Oct 3 11:12:36 EDT 2023
- Python 3.9.18
Experience with SAD compilation and usage
SAD (Ver.1.0.10.5.8a6)
- This is the default version we used before September 2024 on CentOS7 and SL 6.
- Couldn't be compiled with default GCC 11
- Add -fallow-argument-mismatch -fallow-invalid-boz in `FOPT`
- Modify src/pmeas.f and src/tintrb.f according to the latest SAD main trunk
- Still got compilation error
-
/usr/bin/ld: sim/dynl.o:/home/belle2/qyliu/SAD_old/oldsad/src/sim/TFCODE.h:73: multiple definition of `SAD_ATTRIBUTE_FLAGS'; sim/sad_api.o:/home/belle2/qyliu/SAD_old/oldsad/src/sim/TFCODE.h:73: first defined here
Several of similar issues and finally
/usr/bin/ld: libsad.a(utils.o): in function `tftmpnam_':
/home/belle2/qyliu/SAD_old/oldsad/src/utils.c:152: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
collect2: error: ld returned 1 exit status
make[2]: [Makefile:219: sad1.exe] Error 1
make[2]: Leaving directory '/gpfs/home/belle2/qyliu/SAD_old/oldsad/obj/AMD64-Linux5'
make[1]: [Makefile:64: all] Error 2
make[1]: Leaving directory '/gpfs/home/belle2/qyliu/SAD_old/oldsad'
make: [Makefile:24: all] Error 2
-
- Could be compiled with GCC 5
- First we need to apply several GCC 5 patches manually (modification of GCC 5 source code)
- Compile GCC 5 with GCC 11
- Compile SAD with GCC 5
- This compilation works with Benchmark/bench2.sad, but not design_example.sad
-
mapalloc4: allocated chunk offset is out of range!
-
- Doesn't work with our background simulation scripts
-
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
-
SAD K64 (Ver.1.3.4.6k64)
- In short, this is the only version which works on the current KEKCC. It requires the following tricks
- Modify the default `sad.conf`:
- Remove "-floop-block" from "FOPT"
- Update X11 path:
X11_INCDIR=/usr/include/X11 X11_LIBDIR=/usr/lib64/X11
- After first try of "make", I got errors which complain missing head files, which can be fixed by:
cd ~/SAD/arch/AMD64-Linux5/include cp -av ~/SAD/oldsad/contrib/tk8.6.11/generic/tk.h . cp -av ~/SAD/oldsad/contrib/tcl8.6.11/generic/tcl.h . cp -av ~/SAD/oldsad/contrib/tcl8.6.11/generic/tclDecls.h . cp -av ~/SAD/oldsad/contrib/tcl8.6.11/generic/tclPlatDecls.h . cp -av ~/SAD/oldsad/contrib/tk8.6.11/generic/tkDecls.h . cd -
- 'Make' works now, and this version passed all important examples.
- Also works with our beam background scripts
- Is this version now recommended for Belle II background studies?
SAD main trunk (Ver.1.0.10.10.1a)
- Could be compiled with GCC 11
- Works with Benchmark/bench2.sad
-
* Matching Test: CPU time used = .04309701919555664 sec
Print["\n ***** summary of the bench mark \n",
"\tFunction Test \t",tf,"\n\tOptics Test\t",toc,
"\n\tTracking Test\t",tt, "\n\tMatching Test\t",tm,
"\n\tOverall Score (smaller is faster): ",tf/42+(toc+tt+tm)/96];******** summary of the bench mark
Function Test .6944680251181126
Optics Test .6450029611587524
Tracking Test .6637201309204102
Matching Test .04309701919555664
Overall Score (smaller is faster): .03061641247144767
Abort
Note: The following floating-point exceptions are signalling: IEEE_OVERFLOW_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
-
- Doesn't work with `design_example.sad` and `example.sad`
-
GO; ! start matching
mapalloc: allocated chunk offset is out of range!
base=0xfffffffffff05250 map=0x7f1a14a72000 unit=8 offset=0xfe34296d9b8 -
Design orbit length = 42.000000000000000
norfsw cell cal
mapalloc: allocated chunk offset is out of range!
base=0xfffffffffff05250 map=0x7fcb156c2000 unit=8 offset=0xff962af79b8
-
- Could work on at least some of our study scripts. We got similar numerical results but with additional warnings:
- When slicing the lattice in slice.n -> SliceDrift[RingID];lmalloc: allocated offset is out of range
offset=0xfe68e11f7ac(rlist(0)=0xfffffffffff032b0 heap=0x7f34707ff010)- When exiting the program after the slicing using Exit[];corrupted size vs. prev_size
Program received signal SIGABRT: Process abort signal.Backtrace for this error:#0 0x7fb0c6a257c2 in ???#1 0x7fb0c6a24995 in ???#2 0x7fb0c663e6ef in ???
-
- Is this a concern?
Many thanks!