Skip to content

Commit

Permalink
Forcing CPU fallback for v_of_rho with Cray systems due to compiler i…
Browse files Browse the repository at this point in the history
…ssues.
  • Loading branch information
romerojosh authored and maxcuda committed Jul 29, 2017
1 parent a3cd8fd commit b86a695
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PW/src/electrons.f90
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ SUBROUTINE electrons_scf ( printout, exxen )
!CALL v_of_rho( rhoin, rho_core, rhog_core, &
! ehart, etxc, vtxc, eth, etotefield, charge, v)
#else
#ifdef USE_CUDA
#if defined (USE_CUDA) && !defined (CRAY)
iexch = get_iexch
icorr = get_icorr
igcx = get_igcx
Expand Down
7 changes: 7 additions & 0 deletions PW/src/force_cc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ subroutine force_cc_gpu (forcecc)
igcc = get_igcc

! If calling PBE functional configuration, use GPU path
#ifndef CRAY
if (iexch .eq. 1 .and. icorr .eq. 4 .and. (igcx .eq. 2 .or. igcx .eq. 3) .and. (igcc .eq. 2 .or. igcc .eq. 4)) then
!TODO Might be able to remove some of these copies
rho_core_d = rho_core
Expand All @@ -204,6 +205,12 @@ subroutine force_cc_gpu (forcecc)
vxc_d = vxc
deallocate(vxc)
endif
#else
allocate ( vxc(dfftp%nnr,nspin) )
CALL v_xc( rho, rho_core, rhog_core, etxc, vtxc, vxc)
vxc_d = vxc
deallocate(vxc)
#endif
!
psic_d=cmplx(0, 0, DP)
if (nspin == 1 .or. nspin == 4) then
Expand Down
2 changes: 1 addition & 1 deletion install/make.inc_CRAY_PizDaint
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

TOPDIR = $(dir $(abspath $(filter %make.inc,$(MAKEFILE_LIST))))

DFLAGS = -D__PGI -DUSE_CUDA -D__FFTW -D__MPI
DFLAGS = -D__PGI -DUSE_CUDA -D__FFTW -D__MPI -DCRAY
FDFLAGS = $(DFLAGS) $(MANUAL_DFLAGS)

IFLAGS = -I$(TOPDIR)/include -I../include/ -I$(TOPDIR)/Eigensolver_gpu-0.2/lib_eigsolve
Expand Down

0 comments on commit b86a695

Please sign in to comment.