Skip to content

Commit f369a21

Browse files
Serguei PatchkovskiiSerguei Patchkovskii
authored andcommitted
Cleanup of warning messages and version tags, update of the build configuration files.
Cleaned up to reduce warning messages from Intel ifx and gfortran 15. Documented some spurious warnings (hi gfortran!), or warnings fixing which would break the source code for other compilers (hi ifx!). Updated the compiled-in source version strings, which were accidentally left at the previous revisions in a few cases. Added new configuration files for the Intel ifx compiler (using the old ifort options was leading to a broken binary). Updated the test run script (-mca mpi_show_mca_params all was causing a segfault in OpenMPI4).
1 parent 3e2623f commit f369a21

24 files changed

+177
-101
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ ACT2 = -e 's/^!\*nm/ /' # Disable MPI statements
2828
# include configs/zen-gfortran-13_opt.mak
2929
# include configs/zen-gfortran-13_dbg.mak
3030
# include configs/zen-oneapi_opt.mak
31+
# include configs/zen-oneapi-ifx_opt.mak
3132
# include configs/zen-oneapi-i8_opt.mak
3233
# include configs/zen-oneapi_opt_mpi.mak
34+
# include configs/zen-oneapi-ifx_opt_mpi.mak
3335
# include configs/zen-aocc-1.1_opt.mak # VERY SLOW CODE. DO NOT USE.
3436
# include configs/oink-gfortran_opt.mak
3537
# include configs/macos_m1-gfortran_opt.mak

accuracy.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module accuracy
5555
integer, parameter :: clen = 255 ! Standard character length; enough for most
5656
! keywords and file names
5757
!
58-
character(len=clen), save :: rcsid_accuracy = "$Id: accuracy.f90,v 1.46 2023/06/09 14:10:24 ps Exp $"
58+
character(len=clen), save :: rcsid_accuracy = "$Id: accuracy.f90,v 1.47 2024/04/23 14:29:50 ps Exp $"
5959
!
6060
! System kinds; should only be used where we interface to external libraries
6161
!

bicg_tools.f90

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module bicg_tools
3434
public bicg_failure_count
3535
public rcsid_bicg_tools
3636
!
37-
character(len=clen) :: rcsid_bicg_tools = "$Id: bicg_tools.f90,v 1.11 2021/04/26 15:44:44 ps Exp $"
37+
character(len=clen) :: rcsid_bicg_tools = "$Id: bicg_tools.f90,v 1.12 2025/07/11 15:08:35 ps Exp $"
3838
!
3939
logical, save :: bicg_failtrace = .true. ! Produce a verbose report when solution fails;
4040
! May increase the runtime if vectors are traced
@@ -196,21 +196,21 @@ end subroutine matvec
196196
!$omp end critical
197197
end if
198198
!
199-
contains
200-
subroutine ft_dump_vectors(tag,vec)
201-
character(len=*), intent(in) :: tag
202-
complex(rk), intent(in) :: vec(:,:,:) ! Trace of a vector to dump
203-
!
204-
integer(ik) :: irest, iter
205-
!
206-
write (out,"(/t5,a/)") trim(tag)
207-
ftdv_restarts: do irest=1,bicg_maxiter
208-
ftdv_iterations: do iter=1,trace_niter(irest)
209-
write (out,"(1x,i3,1x,i3,(t10,5(g14.7,1x,g14.7,2x)))") irest, iter, vec(:,iter,irest)
210-
end do ftdv_iterations
211-
end do ftdv_restarts
212-
write (out,"()")
213-
end subroutine ft_dump_vectors
199+
! contains
200+
! subroutine ft_dump_vectors(tag,vec)
201+
! character(len=*), intent(in) :: tag
202+
! complex(rk), intent(in) :: vec(:,:,:) ! Trace of a vector to dump
203+
! !
204+
! integer(ik) :: irest, iter
205+
! !
206+
! write (out,"(/t5,a/)") trim(tag)
207+
! ftdv_restarts: do irest=1,bicg_maxiter
208+
! ftdv_iterations: do iter=1,trace_niter(irest)
209+
! write (out,"(1x,i3,1x,i3,(t10,5(g14.7,1x,g14.7,2x)))") irest, iter, vec(:,iter,irest)
210+
! end do ftdv_iterations
211+
! end do ftdv_restarts
212+
! write (out,"()")
213+
! end subroutine ft_dump_vectors
214214
end subroutine bicg_solve
215215
!
216216
end module bicg_tools

composition_analysis.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module composition_analysis
3737
public ca_maxram
3838
public rcsid_composition_analysis
3939
!
40-
character(len=clen) :: rcsid_composition_analysis = "$Id: composition_analysis.f90,v 1.19 2023/06/17 13:45:36 ps Exp $"
40+
character(len=clen) :: rcsid_composition_analysis = "$Id: composition_analysis.f90,v 1.20 2025/07/11 15:08:35 ps Exp $"
4141
!
4242
real(rk), save :: ca_maxram = 0._rk ! Maximum amount of memory which can be used during the analysis step
4343
! This limit does NOT include the memory needed to compute atomic
@@ -127,7 +127,7 @@ subroutine ca_analyze(verbose,threshold,emax,wfn_l,wfn_r,tsurf)
127127
end if
128128
write (out,"(/t5,'Analyzing the final wavefunction in terms of field-free eigenstates'/)")
129129
!
130-
call sts_atend_prepare(tsurf,wfn_l,wfn_r)
130+
call sts_atend_prepare(tsurf)
131131
!
132132
ram_global = ((2._rk)*rk_bytes()/1024._rk**2) * sd_nradial*(sd_lmax+1)*(1+2*sd_nspin*(sd_mmax-sd_mmin+1))
133133
ram_thread = ((2._rk)*rk_bytes()/1024._rk**2) * 2*real(sd_nradial,kind=rk)**2
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BUILD_ID :="Optimized gfortran with OpenMPI, built on $(shell hostname) at $(shell date)"
22
ACT = sed -e 's/^!\*qd/ /' # Enable quad-math statements
33
ACT2 = -e 's/^!\*mp/ /' # Enable MPI statements
4-
F90 = /usr/lib64/mpi/gcc/openmpi3/bin/mpif90 -I. \
4+
F90 = /usr/lib64/mpi/gcc/openmpi4/bin/mpif90 -I. \
55
-m64 -mavx -O3 -fprotect-parens -march=native -mtune=native -fopenmp \
66
-ffast-math -fcx-fortran-rules -mrecip \
77
-fexternal-blas -fblas-matmul-limit=50 \
@@ -10,4 +10,4 @@ F90 = /usr/lib64/mpi/gcc/openmpi3/bin/mpif90 -I. \
1010
-cpp -D__BUILD_ID__='$(BUILD_ID)' -ffree-line-length-none
1111
F90L = $(F90)
1212
LAPACK = /home/ps/lib64/liblapack_gfortran.a -lopenblas_openmp # -lquadlapack_gfortran
13-
LIBEXTRA = -B/usr/share/libhugetlbfs -lhugetlbfs -Wl,--hugetlbfs-align -Wl,-rpath,/usr/lib64/mpi/gcc/openmpi3/lib64/
13+
LIBEXTRA = -B/usr/share/libhugetlbfs -lhugetlbfs -Wl,--hugetlbfs-align -Wl,-rpath,/usr/lib64/mpi/gcc/openmpi4/lib64/

configs/zen-oneapi-ifx_opt.mak

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
BUILD_ID :="Optimized Intel oneAPI(ifx), built on $(shell hostname) at $(shell date)"
2+
ACT = sed -e 's/^!\*qd/ /' # Enable quad-math statements
3+
#ACT2 = -e 's/^!\*mp/ /' # Enable MPI statements
4+
# -axMIC-AVX512 is not supported by recent oneapi
5+
F90 = ifx \
6+
-nogen-interfaces \
7+
-qopenmp -O3 -ipo -xAVX2 -qmkl=sequential -align all -falign-functions \
8+
-assume buffered_io -assume nobuffered_stdout -assume protect_parens -heap-arrays 32 \
9+
-warn -debug full -debug extended -traceback -qopt-report=5 \
10+
-cpp -D__BUILD_ID__='$(BUILD_ID)'
11+
F90L = $(F90)
12+
LAPACK = # Lapack is in Intel MKL,
13+
LIBEXTRA = \
14+
-static-intel -qopenmp-link=static \
15+
-lhugetlbfs -Wl,-z,common-page-size=2097152 -Wl,-z,max-page-size=2097152 \
16+
-lpthread -lm
17+
# -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm

configs/zen-oneapi-ifx_opt_mpi.mak

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
BUILD_ID :="Optimized Intel oneAPI(ifx,MPI), built on $(shell hostname) at $(shell date)"
2+
ACT = sed -e 's/^!\*qd/ /' # Enable quad-math statements
3+
ACT2 = -e 's/^!\*mp/ /' # Enable MPI statements
4+
# -axMIC-AVX512 is not supported by recent oneapi
5+
F90 = mpiifx \
6+
-nogen-interfaces \
7+
-qopenmp -O3 -ipo -xAVX2 -qmkl=sequential -align all -falign-functions \
8+
-assume buffered_io -assume nobuffered_stdout -assume protect_parens -heap-arrays 32 \
9+
-warn -debug full -debug extended -traceback -qopt-report=5 \
10+
-cpp -D__BUILD_ID__='$(BUILD_ID)'
11+
F90L = $(F90)
12+
LAPACK = # Lapack is in Intel MKL,
13+
LIBEXTRA = \
14+
-static-intel -qopenmp-link=static \
15+
-lhugetlbfs -Wl,-z,common-page-size=2097152 -Wl,-z,max-page-size=2097152 \
16+
-lpthread -lm
17+
# -static-intel -Wl,-z,muldefs -static_mpi -qopenmp-link=static
18+
# -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_core.a $(MKLROOT)/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm

coulomb_functions.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module coulomb_functions
7272
public coulombFG, coulombF, coulombBound
7373
public rcsid_coulomb_functions
7474
!
75-
character(len=clen), save :: rcsid_coulomb_functions = "$Id: coulomb_functions.f90,v 1.15 2023/06/09 14:10:24 ps Exp $"
75+
character(len=clen), save :: rcsid_coulomb_functions = "$Id: coulomb_functions.f90,v 1.16 2024/04/23 14:30:15 ps Exp $"
7676
!
7777
! integer, parameter :: out = 6
7878
! integer, parameter :: ik = selected_int_kind(15)

examples/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ clean:
99
single:
1010
./run-all.sh single hydrogen_1S_2P0_uniform.inp
1111

12+
mpi:
13+
./run-all.sh mpi
14+
1215
cheap:
1316
./run-all.sh cheap
1417

examples/run-all.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ function run_test () {
4646
# Intel MPI
4747
# mpirun -genvall -np 2 -s all $(pwd)/../spherical_tdse.x < "${inp}" > "${out}" 2>&1
4848
# OpenMPI
49+
# -mca mpi_show_mca_params all <- Using this option causes OpenMPI4 to segfault. Classy.
4950
# /usr/lib64/mpi/gcc/openmpi/bin/mpirun \
5051
# -mca btl ^tcp \
51-
# -mca mpi_show_mca_params all \
5252
# -bind-to none -np 2 $(pwd)/../spherical_tdse.x --scid-stdin "${inp}" > "${out}" 2>&1
5353
fi
5454
chk="$(echo "${inp}" | sed -e 's/\.inp/.chk/')"
@@ -77,6 +77,13 @@ if [ "$mode" == "single" ] ; then
7777
exit 0
7878
fi
7979
#
80+
if [ "$mode" == "mpi" ] ; then
81+
run_test "argon_3P1m_ell_ckpt_mpi.inp"
82+
run_test "argon_3P1m_ell_rstrt_mpi.inp"
83+
summary "Minimal MPI tests"
84+
exit 0
85+
fi
86+
#
8087
echo "Cheap tests (expected runtime < 1 minute each)"
8188
for inp in hydrogen_1S_2P0_uniform.inp hydrogen_1S_2P0_uniform_restart.inp hydrogen_1S_2P0.inp \
8289
hydrogen_2P0_ion.inp hydrogen_2P0_ion_restart.inp helium_GJG75.inp \

0 commit comments

Comments
 (0)