Skip to content

Commit

Permalink
Merge pull request nwchemgit#952 from edoapra/flaccid-fraction
Browse files Browse the repository at this point in the history
updates
  • Loading branch information
nwchemgit authored Feb 23, 2024
2 parents d3bbacb + 1944725 commit 1539d43
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 72 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ jobs:
fc: gfortran-10
cc: gcc
use_libxc: 1
- os: macos-14
experimental: true
mpi_impl: openmpi
armci_network: MPI-TS
nwchem_modules: "tinyqmpw python"
fc: gfortran-13
use_libxc: 1
xcode_version: 15.2
- os: ubuntu-20.04
experimental: true
mpi_impl: mpich
Expand Down Expand Up @@ -286,7 +294,7 @@ jobs:
fc: gfortran-10
cc: gcc-10
use_libxc: 1
- os: macos-13
- os: macos-14
experimental: true
mpi_impl: openmpi
armci_network: MPI-PR
Expand Down Expand Up @@ -398,7 +406,7 @@ jobs:
cc: gcc
blas: "brew_openblas"
blas_size: 4
- os: macos-13
- os: macos-14
experimental: true
mpi_impl: openmpi
armci_network: MPI-TS
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![NWChem_CI](https://img.shields.io/github/actions/workflow/status/nwchemgit/nwchem/github_actions.yml?style=plastic)](https://github.com/nwchemgit/nwchem/actions)
<!---[![Build Travis-CI Status](https://img.shields.io/travis/nwchemgit/nwchem.svg)](https://travis-ci.org/nwchemgit/nwchem/builds)--->
[![License](https://img.shields.io/badge/license-ECL2-blue.svg)](https://raw.githubusercontent.com/nwchemgit/nwchem/master/LICENSE.md)
![GitHub top language](https://img.shields.io/github/languages/top/nwchemgit/nwchem)
![Github Downloads All Releases](https://img.shields.io/github/downloads/nwchemgit/nwchem/total)
![Homebrew Downloads](https://img.shields.io/homebrew/installs/dy/nwchem?label=Homebrew%20downloads)![Conda-Forge Downloads](https://img.shields.io/conda/dn/conda-forge/nwchem?label=Conda-forge%20downloads)![Docker Pulls](https://img.shields.io/docker/pulls/nwchemorg/nwchem-700.fedora.sockets?label=Docker%20pulls)
![Github Downloads Release 6.8](https://img.shields.io/github/downloads/nwchemgit/nwchem/v6.8-release/total)
Expand All @@ -13,7 +14,8 @@
![Github Downloads Release 7.2.2](https://img.shields.io/github/downloads/nwchemgit/nwchem/v7.2.2-release/total)


[![All Releases tags](https://img.shields.io/github/release/nwchemgit/nwchem/all.svg)](https://github.com/nwchemgit/nwchem/releases)
[![All Releases tags](https://img.shields.io/github/release/nwchemgit/nwchem/all.svg)](https://github.com/nwchemgit/nwchem/releases)
![GitHub Release Date](https://img.shields.io/github/release-date/nwchemgit/nwchem)
[![EMSL](https://rawgit.com/nwchemgit/nwchem/master/contrib/git.nwchem/emsl_logo2.svg)](https://www.emsl.pnl.gov)

## NWChem: Open Source High-Performance Computational Chemistry
Expand Down
15 changes: 9 additions & 6 deletions src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ endif
libraries:
@for dir in $(SUBDIRS); do \
echo Making $@ in $$dir; \
$(MAKE) -C $$dir || exit 1 ; \
if [ $@ == "include_stamp" ] || [ $@ == "dependencies" ]; then \
$(MAKE) SKIP_COMPILERS=1 -C $$dir || exit 1 ; \
else \
$(MAKE) -C $$dir || exit 1 ; \
fi \
done

showdir:
Expand All @@ -129,7 +133,8 @@ realclean:
-$(RM) $(LIBDIR)/*.a $(BINDIR)/*
-$(RM) *.db movecs fort.41 fort.44
-$(RM) util/util_version.F
@# -$(RM) 64_to_32 32_to_64 deps_stamp mpi_include.txt # This conversion is such a hassle that realclean should not force it.
-$(RM) mpi_include.txt ga_cppflags.txt ga_ldflags.txt ga_use_scalapack.txt oblas_ompcheck_done.txt
@# -$(RM) 64_to_32 32_to_64 deps_stamp # This conversion is such a hassle that realclean should not force it.

.PHONY: cleanF
cleanF:
Expand Down Expand Up @@ -159,13 +164,11 @@ sngl_to_dbl dbl_to_sngl 64_to_32 32_to_64:
$(MAKE) -C $$dir $@ || exit 1 ; \
done
touch $@
ifndef QUICK_BUILD
deps_stamp:
for dir in $(SUBDIRS); do \
$(MAKE) -i -C $$dir dependencies include_stamp ; \
$(MAKE) -i SKIP_COMPILERS=1 -C $$dir dependencies include_stamp ; \
done
touch $@
endif
clear_64_to_32:
-$(RM) 32_to_64

Expand Down Expand Up @@ -245,7 +248,7 @@ source:
cat stubs.F nwchem.F > source
ifdef SUBDIRS
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@ || exit 1 ; \
echo TARGET is $@ ; $(MAKE) -C $$dir $@ || exit 1 ; \
done
endif

Expand Down
7 changes: 4 additions & 3 deletions src/config/makefile.h
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ ifeq ($(TARGET),MACX64)
_FC=gfortran
USE_FLANG=1
endif
FLANG_NEW=false
ifeq ($(USE_FLANG),1)
FLANG_NEW = $(shell [ $(shell $(FC) --help |head -1| cut -d " " -f 2 ) == flang ] && echo true || echo false)
endif
Expand Down Expand Up @@ -2037,7 +2038,7 @@ ifneq ($(TARGET),LINUX)
_FC=gfortran
USE_FLANG=1
endif

FLANG_NEW=false
ifeq ($(USE_FLANG),1)
FLANG_NEW = $(shell [ $(shell $(FC) --help |head -1| cut -d " " -f 2 ) == flang ] && echo true || echo false)
endif
Expand Down Expand Up @@ -2155,7 +2156,7 @@ ifneq ($(TARGET),LINUX)
endif
ifeq ($(V),-1)
ifeq ($(FLANG_NEW),false)
FOPTIONS += -w
FOPTIONS += -w
endif
COPTIONS += -w
else
Expand Down Expand Up @@ -3945,7 +3946,7 @@ LIBS = $(NW_MODULE_LIBS) $(CORE_LIBS)
#
V = 0
ACTUAL_FC := $(FC)
NWFC_-1 = @echo "Compiling $<..."; $(ACTUAL_FC) 2> >(grep -v warning|grep -v '\^\^' |grep -v previous\ ref >&2)
NWFC_-1 = @echo "Compiling $<..."; $(ACTUAL_FC) 2> >(grep -iv warning|grep -v '\^\^' |grep -v previous\ ref >&2)
NWFC_0 = @echo "Compiling $<..."; $(ACTUAL_FC)
NWFC_1 = $(ACTUAL_FC)
NWFC = $(NWFC_$(V))
Expand Down
32 changes: 24 additions & 8 deletions src/config/makelib.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,10 @@ ifdef OBJ_OPTIMIZE
endif

dummy:

else

LIBOBJ := $(patsubst %,$(LIBRARY_PATH)(%),$(OBJ_OPTIMIZE))
$(LIBRARY_PATH): $(LIBOBJ)

# Previous line must contain tab for empty command
endif

Expand Down Expand Up @@ -189,7 +187,7 @@ endif
if [ "$$list" ] ; then \
$(CNFDIR)/lockfile -steal $(LOCKFILE) || exit 1 ; \
echo $(AR) $(ARFLAGS) $(LIBRARY_PATH) $$list ; \
echo $$list|grep -v truncated | xargs -n 300 $(AR) $(ARFLAGS) $(LIBRARY_PATH) 2>&1 ; \
echo $$list|grep -v truncated | xargs -n 300 $(AR) $(ARFLAGS) $(LIBRARY_PATH) 2>&1 ; \
/bin/rm -f $$list ; \
echo $(RANLIB) $(LIBRARY_PATH) ; $(RANLIB) $(LIBRARY_PATH) ; \
/bin/rm -f $(LOCKFILE) ; \
Expand All @@ -212,7 +210,7 @@ endif

MAKESUBDIRS = +@for dir in $(SUBDIRS); do \
echo Making $@ in $$dir; \
$(MAKE) -C $$dir $@ || exit 1 ; done
$(MAKE) SKIP_COMPILERS=1 -C $$dir $@ || exit 1 ; done

ifdef SUBDIRS
ifndef OPTIMIZE
Expand All @@ -223,7 +221,12 @@ ifndef OPTIMIZE
subdirs:
@for dir in $(SUBDIRS); do \
echo Making all in $$dir; \
if [ $@ == "include_stamp" ] || [ $@ == "dependencies" ]; then \
echo skipping ; \
$(MAKE) SKIP_COMPILERS=1 -C $$dir || exit 1 ; \
else \
$(MAKE) -C $$dir || exit 1 ; \
fi \
done
endif
endif
Expand Down Expand Up @@ -254,7 +257,7 @@ ifdef SUBDIRS
endif
touch include_stamp
endif
endif
endif # QUICKBUILD
ifdef CONVERT_ALL
64_to_32:
$(CNFDIR)/64_to_32 *.F *.f *.c *.f90
Expand Down Expand Up @@ -309,7 +312,7 @@ ifdef SUBDIRS
endif
-$(RM) -f *.o *.a *.mod *__genmod.f90 *core *stamp *trace mputil.mp* *events* *ipo *optrpt $(LIB_TARGETS)
if [ -f $(LIBRARY_PATH) ] ; then \
echo $(OBJ) $(OBJ_OPTIMIZE)| xargs -n 300 $(AR) d $(LIBRARY_PATH) ; \
echo $(OBJ) $(OBJ_OPTIMIZE)| xargs -n 300 $(AR) d $(LIBRARY_PATH) ; \
if [ `$(AR) t $(LIBRARY_PATH) | wc | awk ' {print $$1;}'` -eq 0 ] ; then \
$(RM) -f $(LIBRARY_PATH) ; \
fi ; \
Expand All @@ -327,7 +330,7 @@ endif
.PHONY: tags_clean
tags_clean:
find . -name TAGS -print -exec rm -f "{}" ";"

.PHONY: cleanF
cleanF:
ifdef SUBDIRS
Expand Down Expand Up @@ -392,7 +395,20 @@ endif

dependencies: $(wildcard *.c) $(wildcard *.F) $(BINDIR)/depend.x
ifndef QUICK_BUILD
$(BINDIR)/depend.x $(LIB_INCLUDES) $(INCPATH) > dependencies
# if [ $V == '-1' ]; then \
# $$MYSTDERR = " 2> /dev/null" \
# fi \
# echo MYSTDERROR $$MYSTDERR \
# ifeq ($(V),-1)
# MYSTDERR = " 2> /dev/null"
# else
# MYSTDERR = " "
# endif
ifeq ($(V),-1)
@$(BINDIR)/depend.x $(LIB_INCLUDES) $(INCPATH) > dependencies
else
$(BINDIR)/depend.x $(LIB_INCLUDES) $(INCPATH) > dependencies
endif
endif

-include dependencies
Expand Down
2 changes: 1 addition & 1 deletion src/include/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ifndef QUICK_BUILD
includes:
for dir in $(SUBDIRS); do \
echo Making include_stamp in $(SRCDIR)/$$dir ; \
(cd $(SRCDIR)/$$dir; $(MAKE) include_stamp) ; \
(cd $(SRCDIR)/$$dir; $(MAKE) SKIP_COMPILERS=1 include_stamp) ; \
done

include_stamp sngl_to_dbl dbl_to_sngl 64_to_32 32_to_64:
Expand Down
43 changes: 9 additions & 34 deletions src/nwdft/scf_dft/dft_scf.F
Original file line number Diff line number Diff line change
Expand Up @@ -827,40 +827,15 @@ logical function dft_scf(rtdb, Etold, Enuc, iVcoul_opt, iVxc_opt,
do i=1,ipol
call ga_copy(g_rel(i),g_zora_Kinetic(i))
enddo
end if ! do_zora
c
c -------------------------------------------------
c set up an exact decoupling Hamiltonian (optional)
c -------------------------------------------------

if (do_x2c) then
if (me.eq.0) write (luout,*) 'allocating g_x2c',nbf_ao

if(.not.ga_duplicate(g_vxc(1),g_rel(1),'x2c 1'))
& call errquit('dft_scf: ga_duplicate failed',666, GA_ERR)
call ga_zero(g_rel(1))

if (me.eq.0) write (luout,*) 'calling calc_x2c_1e_scalar'

c note: g_vxc is used as temp array in the numerical
c integration routines.
c g_x2c_u2c is created in the x2c routine and survives
c if keepU=.T. Same for the transformation matrices g_xc_u(:).
c optionally, g_x2c_c2u is also allocated and kept.

call calc_x2c_1e_scalar_ga(rtdb,
& nexc, g_dens_at, g_vxc, g_rel(1), g_x2c_u,
& g_x2c_u2c, g_x2c_c2u, toll_s)


if (ipol.gt.1) then
if(.not.ga_duplicate(g_vxc(2),g_rel(2),'x2c 2'))
& call errquit('dft_scf: ga_duplicate failed',1, GA_ERR)
call ga_copy(g_rel(1),g_rel(2))
end if


end if ! do_x2c
end if ! do_zora
call x2c_guess(rtdb,nexc,ipol,
t toll_s,
d do_x2c,
g g_vxc,g_rel,g_dens_at,
g g_x2c_u,g_x2c_u2c,
N nbf_ao)

c
c
c == determine guess ==
if(.not.rtdb_get(rtdb,'back_to_atguess',mt_int,1,
Expand Down
1 change: 1 addition & 0 deletions src/nwdft/x2c/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
calc_x2c_hfc_scalar.o \
write_x2c_pc_dip.o \
read_x2c_pc_dip.o \
x2c_utils.o \
x2c_scf.o


Expand Down
57 changes: 57 additions & 0 deletions src/nwdft/x2c/x2c_utils.F
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
subroutine x2c_guess(rtdb,nexc,ipol,
t toll_s,
d do_x2c,
g g_vxc,g_rel,g_dens_at,
g g_x2c_u,g_x2c_u2c,
N nbf_ao)
implicit none
#include "rtdb.fh"
#include "global.fh"
#include "stdio.fh"
#include "errquit.fh"
integer rtdb,nexc,ipol
double precision toll_s
logical do_x2c
integer g_vxc(*) ! [input]
integer g_rel(*) ! [output]
integer g_dens_at(*)
integer g_x2c_u(*),g_x2c_u2c,g_x2c_c2u
integer nbf_ao
c
integer me
c
c -------------------------------------------------
c set up an exact decoupling Hamiltonian (optional)
c -------------------------------------------------
me=ga_nodeid()
if (do_x2c) then
if (me.eq.0) write (luout,*) 'allocating g_x2c',nbf_ao

if(.not.ga_duplicate(g_vxc(1),g_rel(1),'x2c 1'))
& call errquit('dft_scf: ga_duplicate failed',666, GA_ERR)
call ga_zero(g_rel(1))

if (me.eq.0) write (luout,*) 'calling calc_x2c_1e_scalar'

c note: g_vxc is used as temp array in the numerical
c integration routines.
c g_x2c_u2c is created in the x2c routine and survives
c if keepU=.T. Same for the transformation matrices g_xc_u(:).
c optionally, g_x2c_c2u is also allocated and kept.

call calc_x2c_1e_scalar_ga(rtdb,
& nexc, g_dens_at, g_vxc, g_rel(1), g_x2c_u,
& g_x2c_u2c, g_x2c_c2u, toll_s)


if (ipol.gt.1) then
if(.not.ga_duplicate(g_vxc(2),g_rel(2),'x2c 2'))
& call errquit('dft_scf: ga_duplicate failed',1, GA_ERR)
call ga_copy(g_rel(1),g_rel(2))
end if


end if ! do_x2c

return
end
19 changes: 2 additions & 17 deletions travis/compile_nwchem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,28 +108,13 @@ fi
#compilation
export MAKEFLAGS=-j3
echo "$FOPT$FDOPT"
mkdir -p ../bin/$NWCHEM_TARGET
gcc -o ../bin/$NWCHEM_TARGET/depend.x config/depend.c
make nwchem_config
cd libext && make V=-1 && cd ..
cd tools && make V=-1 && cd ..
make SKIP_COMPILERS=1 deps_stamp >& deps.log
echo tail deps.log '11@@@'
tail -10 deps.log
grep -i python deps.log || true
echo done tail deps.log '11@@@'
python3 -V || true
python3-config --ldflags || true
cd python && rm -f dependencies include_stamp ||true && make dependencies include_stamp && cd ..
cd 64to32blas && make SKIP_COMPILERS=1 dependencies include_stamp && cd ..
make directories
export QUICK_BUILD=1
if [[ -z "$FOPT" ]]; then
make V=0 -j3
make V=-1 -j3
else
make V=0 FOPTIMIZE="$FOPT" -j3
make V=-1 FOPTIMIZE="$FOPT" -j3
fi
unset QUICK_BUILD
cd $TRAVIS_BUILD_DIR/src/64to32blas
make
cd $TRAVIS_BUILD_DIR/src
Expand Down
2 changes: 2 additions & 0 deletions travis/nwchem.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,5 @@ if [[ "$USE_LIBXC" == "-1" ]]; then
export LIBXC_LIB=/usr/lib/x86_64-linux-gnu
export LIBXC_INCLUDE=/usr/include
fi

export PYTHONVERSION=$(python -V| cut -d ' ' -f 2 |cut -d . -f 1-2)

0 comments on commit 1539d43

Please sign in to comment.