Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

FCHL19 with periodic boundary conditions and OpenMP. #137

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions qml/kernels/fgradient_kernels.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
! MIT License
!
! Copyright (c) 2018-2019 Anders Steen Christensen
! Copyright (c) 2018-2021 Anders Steen Christensen, Konstantin Karandashev
!
! Permission is hereby granted, free of charge, to any person obtaining a copy
! of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -591,6 +591,7 @@ subroutine fatomic_local_gradient_kernel(x1, x2, dx2, q1, q2, n1, n2, nm1, nm2,
sorted_derivs = 0.0d0

! Presort the representation derivatives
!$OMP PARALLEL DO PRIVATE(idx2) schedule(dynamic)
do b = 1, nm2
do i2 = 1, n2(b)
idx2 = 0
Expand All @@ -606,10 +607,11 @@ subroutine fatomic_local_gradient_kernel(x1, x2, dx2, q1, q2, n1, n2, nm1, nm2,
enddo
enddo
enddo
!$OMP END PARALLEL DO

kernel = 0.0d0

!$OMP PARALLEL DO PRIVATE(idx2_end,idx2_start,d,expd,idx1_start,idx1) schedule(dynamic)
!$OMP PARALLEL DO PRIVATE(idx2_end,idx2_start,d,expd,idx1_start,idx1) schedule(dynamic)
do a = 1, nm1

idx1_start = sum(n1(:a)) - n1(a) + 1
Expand Down Expand Up @@ -642,7 +644,7 @@ subroutine fatomic_local_gradient_kernel(x1, x2, dx2, q1, q2, n1, n2, nm1, nm2,
enddo
enddo
enddo
!$OMP END PARALLEL do
!$OMP END PARALLEL do

deallocate(sorted_derivs)
deallocate(d)
Expand Down
Loading