Skip to content

Commit

Permalink
Merge branch 'hackathon' of https://github.com/tan2/geoflac into hack…
Browse files Browse the repository at this point in the history
…athon
  • Loading branch information
fyilee committed Oct 6, 2020
2 parents 0d1d420 + e35a08b commit 05f15c6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ifeq ($(F90), gfortran)
LDFLAGS += -fopenmp
endif
ifeq ($(debug), 0)
CFLAGS += -O3 -ffast-math
CFLAGS += -O2
else
CFLAGS += -O0 -Wall -fbounds-check -ftrapv -fbacktrace -fdump-core \
-Waliasing -Walign-commons -Wampersand -Wintrinsic-shadow \
Expand Down Expand Up @@ -105,7 +105,7 @@ ifeq ($(F90), pgf90)
LDFLAGS += -acc -ta=tesla:cc70,managed -Mcuda -lnvToolsExt
endif
ifeq ($(debug), 0)
CFLAGS += -O3 -fast
CFLAGS += -O2
else
CFLAGS += -O0 -Mbounds -Mchkstk -traceback
LDFLAGS +=
Expand All @@ -125,7 +125,7 @@ ifeq ($(F90), f90)
# -fpover=yes: Provide run-time overflow check during READ
# -xcheck=%all: Enable all run-time check
ifeq ($(debug), 0)
CFLAGS += -O3 -r8const -fast -xloopinfo -s -xipo
CFLAGS += -O2 -r8const -xloopinfo -s -xipo
else
CFLAGS += -w3 -r8const -C -fpover=yes -xcheck=%all
endif
Expand Down
2 changes: 1 addition & 1 deletion src/dt_mass.f90
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ subroutine dt_mass
enddo

dt = min(dt_elastic, dt_maxwell)
!$ACC update device(dt)
!$ACC update device(dt, dt_elastic, dt_maxwell, dtmax_therm)
return
end

Expand Down
6 changes: 4 additions & 2 deletions src/fl_move.f90
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ end subroutine resurface


subroutine add_marker_at_top(i, dz_ratio, time, kph, nmarkers)
use myrandom_mod
use marker_data
use arrays
include 'precision.inc'

iseed = nloop
do while(.true.)
call random_number(r1)
call random_number(r2)
call myrandom(iseed, r1)
call myrandom(iseed, r2)
j = 1

! (x1, y1) and (x2, y2)
Expand Down
5 changes: 4 additions & 1 deletion src/fl_therm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
! Calculate thermal field in explict form

subroutine fl_therm
!$ACC routine(Eff_cp) seq
!$ACC routine(Eff_conduct) seq
use arrays
use params
include 'precision.inc'
Expand All @@ -25,7 +27,7 @@ subroutine fl_therm
! | / / |
! 2 2---3


!$ACC kernels
! saving old temperature
if (istress_therm.gt.0) temp0(:,:) = temp(:,:)

Expand Down Expand Up @@ -244,6 +246,7 @@ subroutine fl_therm
end do
!$OMP end do
!$OMP end parallel
!$ACC end kernels

return
end

0 comments on commit 05f15c6

Please sign in to comment.