Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates #809

Merged
merged 6 commits into from
Jun 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions QA/runtests.mpi.unix
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ do
echo " copying input and verified output files"

OUTPUTFILE=${STUB}.out
ERRORFILE=${STUB}.err
INPUTFILE=${STUB}.nw

#
Expand Down Expand Up @@ -354,17 +355,17 @@ sync
if [ $NPROC -gt 0 ]; then
if [ $NONSTD_MPI -ne 0 ]; then
if [ -z $USE_SLEEPLOOP ]; then
${MPIRUN} ${NWCHEM} ${INPUTFILE} >& ${OUTPUTFILE}
${MPIRUN} ${NWCHEM} ${INPUTFILE} 2> ${ERRORFILE} 1> ${OUTPUTFILE}
else
${NWCHEM_TOP}/QA/sleep_loopqa.sh $MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE $OUTPUTFILE
${NWCHEM_TOP}/QA/sleep_loopqa.sh $MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE 2> $ERRORFILE 1> $OUTPUTFILE
fi
runstatus=$?
else
$MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE >& $OUTPUTFILE
$MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE 2> $ERRORFILE 1> $OUTPUTFILE
runstatus=$?
fi
else
$NWCHEM $INPUTFILE >& $OUTPUTFILE
$NWCHEM $INPUTFILE 2> $ERRORFILE 1> $OUTPUTFILE
runstatus=$?
fi
[ -f $OUTPUTFILE ] && cp $OUTPUTFILE $TESTOUTPUTS/$OUTPUTFILE
Expand Down Expand Up @@ -393,19 +394,19 @@ sync
# know what we are doing (i.e. above this script) and simply use that
# verbatim. Set MPIRUN_PATH for this purpose, its value is transfered
# to MPIRUN at some point in this script.
$MPIRUN $NWCHEM $INPUTFILE >& $TESTOUTPUTS/$OUTPUTFILE
$MPIRUN $NWCHEM $INPUTFILE 2> $TESTOUTPUTS/$ERRORFILE 1> $TESTOUTPUTS/$OUTPUTFILE
runstatus=$?
else
# In the case of standard MPI we construct the appropriate command here.
if [ -z $USE_SLEEPLOOP ]; then
$MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE >& ${TESTOUTPUTS}/${OUTPUTFILE}
$MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE 2> ${TESTOUTPUTS}/${ERRORFILE} 1> ${TESTOUTPUTS}/${OUTPUTFILE}
else
${NWCHEM_TOP}/QA/sleep_loopqa.sh $MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE $OUTPUTFILE
${NWCHEM_TOP}/QA/sleep_loopqa.sh $MPIRUN $NPOPT $NPROC $NWCHEM $INPUTFILE 2> $ERRORFILE 1> $OUTPUTFILE
fi
runstatus=$?
fi
else
$NWCHEM $INPUTFILE >& $TESTOUTPUTS/$OUTPUTFILE
$NWCHEM $INPUTFILE 2> $TESTOUTPUTS/$ERRORFILE 1> $TESTOUTPUTS/$OUTPUTFILE
runstatus=$?
fi
#
Expand Down Expand Up @@ -465,6 +466,7 @@ sync
fi

diff -w ${STUB}.ok.out.nwparse ${STUB}.out.nwparse >& /dev/null
cat ${ERRORFILE}
diff1status=$?
#
fi
Expand Down
48 changes: 47 additions & 1 deletion src/ddscf/int_1e_ga.F
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ subroutine int_1e_ga(ibas, jbas, g, integ_type, oskel)
#include "cscfps.fh"
#include "sym.fh"
#include "geom.fh"
#include "util.fh"
c
c Compute the desired type of integrals (kinetic, potential, overlap)
c and ADD them into the given global array.
Expand All @@ -68,13 +69,16 @@ subroutine int_1e_ga(ibas, jbas, g, integ_type, oskel)
c local variables
c
integer type
logical dobq
integer bad_ovl,adrs,lds,i0,i1,j0,j1
logical dobq,oprint_s,oprint_check_s
character*255 integ_type1
c
call ga_sync()
c
dobq = geom_extbq_on()
integ_type1 = integ_type
oprint_check_s = util_print('check_s',print_high)
oprint_s = util_print('ao overlap',print_debug)
c
if (inp_compare(.false., integ_type1, 'potential0')) then
integ_type1='potential'
Expand Down Expand Up @@ -157,6 +161,23 @@ subroutine int_1e_ga(ibas, jbas, g, integ_type, oskel)
call int_1e_oldga(ibas, jbas, g, integ_type1, oskel)
end if
c
c overlap: check if offdiagonal elements are 1 -> same basis
if(type.eq.3.and.oprint_s) call ga_print(g)
if(type.eq.3.and.oprint_check_s) then
bad_ovl=0
call ga_distribution(g,
. ga_nodeid(), i0, i1, j0, j1)
if (i0.gt.0 .and. i0.le.i1) then
call ga_access(g, i0, i1, j0, j1, adrs, lds)
call int_checks(i0, i1, j0, j1,dbl_mb(adrs),
A bad_ovl)
endif
call ga_igop(2023,bad_ovl,1, '+')
if(bad_ovl.gt.0) then
call errquit('int_1e_ga: same basis from S matrix',
A bad_ovl, BASIS_ERR)
endif
endif
end
c
subroutine int_1e_ooldga(ibas, jbas, g, integ_type, oskel)
Expand Down Expand Up @@ -715,3 +736,28 @@ subroutine int_1e_oldga0(ibas, g, type, oskel,
if (oscfps) call pstat_off(ps_int_1e)
c
end
subroutine int_checks(i0, i1, j0, j1, s, sing_vals)
implicit none
#include "stdio.fh"
integer i0, i1, j0, j1
double precision s(i0:i1,j0:j1)
integer sing_vals
c
integer i,j
double precision eps
parameter(eps=1d-8)
c
if(i0.lt.j0) return
do j=j0,j1
do i=i0,min(i1,j1)
if(i.gt.j) then
if (abs(s(i,j)-1d0).lt.eps) then
write(luout,1) i,j
sing_vals=sing_vals+1
endif
endif
enddo
enddo
1 format(' basis ',i5,' and ',i5,' are the same')
return
end
14 changes: 12 additions & 2 deletions src/libext/elpa/build_elpa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ else
else
MPIF90=mpif90
MPICC=mpicc
MPICXX=mpicxx
#fix include path
# FCFLAGS+="-I`${NWCHEM_TOP}/src/tools/guess-mpidefs --mpi_include`"
# CFLAGS+="-I`${NWCHEM_TOP}/src/tools/guess-mpidefs --mpi_include`"
Expand All @@ -84,6 +85,9 @@ fi
if [[ -z "${CC}" ]]; then
CC=cc
fi
if [[ -z "${CXX}" ]]; then
CXX=c++
fi
if [[ ${FC} == flang ]] || [[ ${PE_ENV} == AOCC ]]; then
GOTCLANG=1
else
Expand Down Expand Up @@ -140,13 +144,19 @@ if [[ -z "$MPICH_CC" ]] ; then
export MPICH_CC="$CC"
fi
echo MPICH_CC is "$MPICH_CC"
if [[ -z "$MPICH_CXX" ]] ; then
export MPICH_CXX="$CXX"
fi
#Intel MPI
if [[ -z "$I_MPI_F90" ]] ; then
export I_MPI_F90="$FC"
fi
if [[ -z "$I_MPI_CC" ]] ; then
export I_MPI_CC="$CC"
fi
if [[ -z "$I_MPI_CXX" ]] ; then
export I_MPI_CXX="$CXX"
fi
echo I_MPI_F90 is "$I_MPI_F90"

if [[ -z "${FORCETARGET}" ]]; then
Expand Down Expand Up @@ -232,7 +242,7 @@ export SCALAPACK_FCFLAGS+="${MYLINK}"
export LIBS="${MYLINK}"
export FC=$MPIF90
export CC=$MPICC
FC=$MPIF90 CC=$MPICC ../configure \
FC=$MPIF90 CC=$MPICC CXX=$MPICXX ../configure \
$sixty4_int \
CFLAGS="$MYCFLAGS" \
FCFLAGS="$MYFCFLAGS" \
Expand All @@ -254,7 +264,7 @@ if [[ "$USE_MANUALCPP" == 1 ]]; then
echo @@@@ MANUALCPP @@@
make FC="$SRCDIR/remove_xcompiler $SRCDIR/manual_cpp mpif90" -j5
else
make FC=$MPIF90 CC=$MPICC -j5
make FC=$MPIF90 CC=$MPICC CXX=$MPICXX -j5
# make V=1 FC=$MPIF90 CC=$MPICC -j5
fi

Expand Down
6 changes: 5 additions & 1 deletion src/libext/libext_utils/cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ get_cmake_release(){
else
curl -L ${CMAKE_URL} -o cmake-${CMAKE_VER}.tar.gz
tar xzf cmake-${CMAKE_VER}.tar.gz
CMAKE=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin/cmake
if [[ ${UNAME_S} == "Darwin" ]] ; then
CMAKE=`pwd`/cmake-${CMAKE_VER}-macos-universal/CMake.app/Contents/bin/cmake
else
CMAKE=`pwd`/cmake-${CMAKE_VER}-linux-${CMAKE_CPU}/bin/cmake
fi
fi
cd $orgdir

Expand Down