Skip to content

Commit

Permalink
Fixing minor bugs revealed while writing conda recipe (#5)
Browse files Browse the repository at this point in the history
This PR contains several minor bugfixes that were revealed in the process of writing a recipe for building `koopmans-kcp` with `conda`:
- removing `!$$` strings from fortran source
- removing the local copy of `lapack`
- bugfix to `make install`
  • Loading branch information
elinscott authored Sep 28, 2022
1 parent b60e30a commit b33bcf9
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 72,866 deletions.
6 changes: 0 additions & 6 deletions CPV/input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ SUBROUTINE set_control_flags()
tbeg_ => tbeg
USE control_flags, ONLY: ekin_conv_thr_ => ekin_conv_thr, &
etot_conv_thr_ => etot_conv_thr, &
!$$
esic_conv_thr_ => esic_conv_thr, &
!$$
forc_conv_thr_ => forc_conv_thr, &
ekin_maxiter_ => ekin_maxiter
USE control_flags, ONLY: force_pairing_ => force_pairing
Expand Down Expand Up @@ -298,9 +296,7 @@ SUBROUTINE set_control_flags()
USE input_parameters, ONLY: &
electron_dynamics, electron_damping, electron_temperature, &
ion_dynamics, ekin_conv_thr, etot_conv_thr, forc_conv_thr, &
!$$
esic_conv_thr, &
!$$
electron_maxstep, ion_damping, ion_temperature, ion_velocities, tranp, &
amprp, ion_nstepe, cell_nstepe, cell_dynamics, cell_damping, &
cell_parameters, cell_velocities, cell_temperature, force_pairing, &
Expand Down Expand Up @@ -336,9 +332,7 @@ SUBROUTINE set_control_flags()
tchi2_ = tchi2_inp
ekin_conv_thr_ = ekin_conv_thr
etot_conv_thr_ = etot_conv_thr
!$$
esic_conv_thr_ = esic_conv_thr
!$$
hartree_only_sic_ = hartree_only_sic
iprint_manifold_overlap_ = iprint_manifold_overlap !added:giovanni spreads and manifold overlap
iprint_spreads_ = iprint_spreads
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ distclean veryclean : clean
config.log configure.msg config.status autom4te.cache \
espresso.tar.gz CPV/version.h ChangeLog* \
intel.pcl */intel.pcl
- cd examples ; ./make_clean
- cd atomic_doc ; ./make_clean
- if test -d GUI ; then \
( cd GUI ; if test "$(MAKE)" = "" ; then make $(MFLAGS) TLDEPS= veryclean ; \
else $(MAKE) $(MFLAGS) TLDEPS= veryclean ; fi ) \
Expand Down Expand Up @@ -88,7 +86,7 @@ depend:

install:
mkdir -p $(PREFIX)/bin ; \
for x in `find -name *.x -type f` ; do \
for x in `find . -name *.x -type f` ; do \
cp -v $$x $(PREFIX)/bin/ ; done
@echo -e '\nkoopmans-kcp binaries are installed in $(PREFIX)/bin\n'

Expand Down
7 changes: 0 additions & 7 deletions Modules/control_flags.f90
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ MODULE control_flags
draw_pot, pot_number, & !added:linh draw vsic potentials
iprint_spreads, iprint_manifold_overlap, innerloop_until, &
hartree_only_sic !added:giovanni print spreads and manifold overlaps, and hartree-only sic
!$$
PUBLIC :: do_innerloop, do_innerloop_empty, do_innerloop_cg, innerloop_dd_nstep,&
innerloop_cg_nsd, innerloop_cg_nreset, innerloop_nmax, &
innerloop_init_n, innerloop_cg_ratio, innerloop_atleast, l_comp_cmplxfctn_index
!$$
!
PUBLIC :: fix_dependencies, check_flags
PUBLIC :: tksw, evc_restart, trhor, thdyn, iprsta, trhow
Expand Down Expand Up @@ -96,10 +94,8 @@ MODULE control_flags
LOGICAL :: force_pairing = .FALSE. ! Force pairing
LOGICAL :: tchi2 = .FALSE. ! Compute Chi^2
LOGICAL :: do_ee = .FALSE. ! Compute periodi-image correction
!$$
LOGICAL :: draw_pot = .FALSE. ! added:linh draw vsic potentials
INTEGER :: pot_number = 1 ! added:linh draw vsic potentials
!$$
INTEGER :: iprint_spreads=-1
INTEGER :: iprint_manifold_overlap=-1
LOGICAL :: hartree_only_sic=.false.
Expand All @@ -117,7 +113,6 @@ MODULE control_flags
INTEGER :: innerloop_init_n = 10000 ! Innerloop iterations with fixed threshold
INTEGER :: innerloop_atleast = 0 ! Minimum number of innerloop iterations performed
REAL(DP) :: innerloop_cg_ratio = 1.d-3 ! Innerloop ratio between the CG outerloop step and the innerloop threshold
!$$
!
TYPE (convergence_criteria) :: tconvthrs
! thresholds used to check GS convergence
Expand Down Expand Up @@ -198,9 +193,7 @@ MODULE control_flags
REAL(DP), PUBLIC :: &
ekin_conv_thr = 0.0_DP, &! conv. threshold for fictitious e. kinetic energy
etot_conv_thr = 0.0_DP, &! conv. threshold for DFT energy
!$$
esic_conv_thr = 0.0_DP, &! conv. threshold for SIC energy
!$$
forc_conv_thr = 0.0_DP ! conv. threshold for atomic forces
INTEGER, PUBLIC :: &
ekin_maxiter = 100, &! max number of iter. for ekin convergence
Expand Down
16 changes: 1 addition & 15 deletions flib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,12 @@ gridsetup.o \
localdim.o \
localindex.o

all: blas.a flib.a lapack_atlas.a lapack.a ptools.a
all: flib.a ptools.a

flib.a : $(OBJS)
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@

blas.a : blas.o
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@

lapack_atlas.a : lapack_atlas.o dlamch.o
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@

lapack.a : lapack_atlas.o lapack_all.o dlamch.o
$(AR) $(ARFLAGS) $@ $?

dlamch.o : dlamch.f
$(F77) $(FFLAGS_NOOPT) -c $<

ptools.a : $(POBJS)
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@
Expand Down
Loading

0 comments on commit b33bcf9

Please sign in to comment.