From 5f9656e8fa54fd614b4c42b031d859e36392fa8a Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 24 Oct 2025 11:17:26 -0700 Subject: [PATCH 1/2] fix uninitialized data to avoid segfaults on fedora 43/aarch64 --- src/solvation/gepol_lib.F | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/solvation/gepol_lib.F b/src/solvation/gepol_lib.F index 345743bc76..939832d9c5 100644 --- a/src/solvation/gepol_lib.F +++ b/src/solvation/gepol_lib.F @@ -467,7 +467,8 @@ c & ,ASS1,LPR) C C Read COOR File c CALL READCOOR(COOF,NATOM,LABEL,GHOST,LPR) -c Atom coordinates from arguments and not from file +c Atom coordinates from arguments and not from file + ghost=.false. do i=1,natom xe(i)=xyzatm(1,i) ye(i)=xyzatm(2,i) @@ -1031,7 +1032,8 @@ C ------------------------------------------------------------------ NP=0 -C begin +C begin + nejci=0 NTRIAN=4**(NDIV-1) FNDIV=60*NTRIAN @@ -1053,6 +1055,7 @@ C It determines which spheres are linked to sphere I IF(IUSE(J).GE.3) THEN IF(I.NE.J)THEN + if(j.ge.mc) call errquit('gepol: fix mc size',j,0) DIJ2=(XEI-XE(J))*(XEI-XE(J))+ & (YEI-YE(J))*(YEI-YE(J))+ @@ -1060,7 +1063,8 @@ C It determines which spheres are linked to sphere I SRE2=(REI+RE(J))*(REI+RE(J)) IF(DIJ2.LT.SRE2) THEN - IIJ=IIJ+1 + IIJ=IIJ+1 + if(iij.ge.mc) call errquit('gepol: fix mc size',iij,0) IJE(IIJ)=J NEJCI=IIJ END IF @@ -1068,7 +1072,6 @@ C It determines which spheres are linked to sphere I END IF END IF END DO - C C It selects one main triangle. NSUP=0 @@ -1093,7 +1096,7 @@ C C It fixes if the secondary triangle is inside or outside. L1=UN3 DO N3=L1,NEJCI - UN3=N3 + UN3=N3 N4=IJE(N3) DD=(XSM-XE(N4))*(XSM-XE(N4))+ & (YSM-YE(N4))*(YSM-YE(N4))+ @@ -1121,6 +1124,7 @@ c c In case we want all secondary triangles if(.not.rgrp) then NP=NP+1 + if(np.ge.mv) call errquit('gepol: fix mv size',np,0) XP(NP)=XSL+XEI YP(NP)=YSL+YEI ZP(NP)=ZSL+ZEI @@ -1201,7 +1205,7 @@ C -------------------------------------------------------------- COMMON/PUN/ITO(MV),ISO(MV),ISA(MV),XP(MV),YP(MV),ZP(MV),AP(MV) DIMENSION TIT(20) - + FDR=0e0 IF(LPR)WRITE(6,'(/A)')' ===> Start Subroutine PRIVEC ' WRITE(6,'(A/1X,A)')' Printing vectors in file:',VECF @@ -1593,7 +1597,10 @@ C --------------------------------------------------------------------- COMMON/PUN/ITO(MV),ISO(MV),ISA(MV),XP(MV),YP(MV),ZP(MV),AP(MV) IF(LPR)WRITE(6,'(/A)')' ===> Start Subroutine VOLARE ' - + REJ=0e0 + XEJ=0e0 + YEJ=0e0 + ZEJ=0e0 STOT=0.0E0 VOL=0.0E0 From 282210a5186ea775bf9d2a5a03d300d52ba2b917 Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 24 Oct 2025 11:49:17 -0700 Subject: [PATCH 2/2] cmake fix --- src/NWints/simint/libsimint_source/build_simint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NWints/simint/libsimint_source/build_simint.sh b/src/NWints/simint/libsimint_source/build_simint.sh index 9eee42a7a0..df69422fd0 100755 --- a/src/NWints/simint/libsimint_source/build_simint.sh +++ b/src/NWints/simint/libsimint_source/build_simint.sh @@ -253,7 +253,9 @@ echo if [[ ! -z ${FFLAGS_FORGA} ]]; then Fortran_FLAGS+=" ${FFLAGS_FORGA}" ; fi echo Fortran_FLAGS equal "$Fortran_FLAGS" echo C_FLAGS equal "$C_FLAGS" -FC="${FC}" CC="${CC}" CXX="${CXX}" $CMAKE \ +echo CMAKE is $CMAKE +${CMAKE} --version +FC="${FC}" CC="${CC}" CXX="${CXX}" CMAKE_POLICY_VERSION_MINIMUM=3.5 $CMAKE \ -DCMAKE_BUILD_TYPE="${SIMINT_BUILD_TYPE}" -DSIMINT_VECTOR=${VEC} \ -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_FORTRAN=ON -DSIMINT_MAXAM=${SIMINT_MAXAM} -DSIMINT_MAXDER=${DERIV} \ -DENABLE_TESTS=OFF -DSIMINT_STANDALONE=OFF \