Skip to content

Commit

Permalink
Merge pull request #32 from fspiga/devel-gpu
Browse files Browse the repository at this point in the history
Releasing QE-GPU v1.0
  • Loading branch information
fspiga authored Nov 3, 2017
2 parents 81184d1 + 27b6e68 commit e3436aa
Show file tree
Hide file tree
Showing 249 changed files with 22,248 additions and 20,573 deletions.
4 changes: 4 additions & 0 deletions .gitattribute
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.github/ISSUE_TEMPLATE.md export-ignore
.github/PULL_REQUEST_TEMPLATE.md export-ignore
*.github export-ignore
.gitignore export-ignore
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Version of QE-GPU

Write here (refer to git TAG or git hash)

### Expected behavior/result

Write here...

### Actual behavior/result

Write here...

### Steps to reproduce behavior/result

Together with instructions how to reproduce the problem and where input files and pseudo-potentials are located), please report:
* architecture of your machine (e.g. x86, POWER, CRAY)
* type of GPU you are using (remember, Tesla P100 are recommended)
* version and flavor of MPI (e.g. Open MPI 1.x.y, 2.x.y, 3.x.y, MVAPICH2, MVAPICH2-GDR, Spectrum MPI)
* PGI compiler (both major and minor version, e.g. 17.4, specify also if it is the _Community_ version)
* the full ``DFLAGS`` line as specified in the make.inc
* how you run the code (number of MPI/GPU, number of threads)

20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Thank you for creating a pull request to contribute to QE-GPU code! Before you open the request please review the following guidelines and tips to help it be more easily integrated:
* Describe the scope of your change -- i.e. what the change does and what parts of the code were modified. This will help us understand any risks of integrating the code.
* Describe any known limitations with your change. For example if the change doesn't apply to a supported platform of the library please mention it.
* Please run any tests or examples that can exercise your modified code. We strive to not break users of the code and running tests/examples helps with this process.

Thank you again for contributing! Testing and integration of any change will occur as soon as possible, but be aware it is impossible to immediately respond to every request. There is no need to bump or check in on a pull request (it will clutter the discussion of the request).

After reviewing the guidelines above you can delete this text from the pull request and proceed further


### Description of the Pull Request (PR)

Write your description of the PR here. Be sure to include as much background,
and details necessary for the reviewers to understand exactly what this is
fixing or enhancing.


### This fixes or addresses the following GitHub issues

- Ref: #
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.a
*.o
*.mod
*_tmp.f90
*.x
*.so
*.pyc
.github/ISSUE_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
*.github
109 changes: 109 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Contributing

When contributing to QE-GPU, it is important to properly communicate the
gist of the contribution. If it is a simple code or editorial fix, simply
explaining this within the GitHub Pull Request (PR) will suffice. But if this
is a larger fix or Enhancement, it should be first discussed with the project
leader or developers.

Please note we have a code of conduct, described below. Please follow it in
all your interactions with the project members and users.

## Pull Request Process

1. Bug fix and feature enhancements PRs should be sent to only to be submitted
against devel-gpu or other developmen branches.
2. Follow the existing code style precedent. This does not need to be strictly
defined as there are many thousands of lines of examples. Note the lack
of tabs anywhere in the project, parentheses and spacing, curly bracket
locations, source code layout, variable scoping, etc. and follow the
project's standards.
3. Ensure any install or build dependencies are removed before doing a build
to test your PR locally.
4. The project's default copyright and header have been included in any new
source files.
5. All (major) changes to QE-GPU must be documented somewhere. If your PR
changes a core functionality, please include clear description of the
changes in your PR so that the docs can be updated, or better, submit a
sister PR to update the docs directly.
6. Is the code human understandable? This can be accomplished via a clear code
style as well as documentation and/or comments.
7. The pull request will be reviewed by others, and the final merge must be
done by the QE-GPU project lead, @fspiga (or approved by him).


# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project leader ([email protected]. All
complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. The project
team is obligated to maintain confidentiality with regard to the reporter of
an incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers, contributors and users who do not follow or enforce the
Code of Conduct in good faith may face temporary or permanent repercussions
with their involvement in the project as determined by the project's leader(s).

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion CPV/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ QELA=../../LAXlib/libqela.a

TLDEPS= bindir mods libs libiotk

all : tldeps libcp.a manycp.x cp.x cppp.x wfdd.x
all : tldeps libcp.a cp.x

manycp.x : manycp.o libcp.a $(QEMODS) $(QEFFT) $(QELA) $(LIBOBJS)
$(LD) $(LDFLAGS) -o manycp.x manycp.o \
Expand Down
16 changes: 8 additions & 8 deletions CPV/src/chargedensity.f90
Original file line number Diff line number Diff line change
Expand Up @@ -873,13 +873,13 @@ SUBROUTINE drhov(irb,eigrb,rhovan,drhovan,rhog,rhor,drhog,drhor)
COMPLEX(DP), ALLOCATABLE :: qv(:)
!
INTEGER :: itid, mytid, ntids
#if defined(__OPENMP)
#if defined(_OPENMP)
INTEGER :: omp_get_thread_num, omp_get_num_threads
EXTERNAL :: omp_get_thread_num, omp_get_num_threads
#endif
!
!$omp parallel default(none), private(i,j,iss,ir,ig,mytid,ntids,itid), shared(nspin,dfftp,drhor,drhog,rhor,rhog,ainv,ngm)
#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = omp_get_thread_num() ! take the thread ID
ntids = omp_get_num_threads() ! take the number of threads
#else
Expand Down Expand Up @@ -928,7 +928,7 @@ SUBROUTINE drhov(irb,eigrb,rhovan,drhovan,rhog,rhor,drhog,drhor)
ALLOCATE( qv( dfftb%nnr ) )
ALLOCATE( dqgbt( ngb, 2 ) )

#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = omp_get_thread_num() ! take the thread ID
ntids = omp_get_num_threads() ! take the number of threads
itid = 0
Expand All @@ -954,7 +954,7 @@ SUBROUTINE drhov(irb,eigrb,rhovan,drhovan,rhog,rhor,drhog,drhor)
IF (ia.EQ.na(is)) nfft=1
#endif

#if defined(__OPENMP)
#if defined(_OPENMP)
IF ( mytid /= itid ) THEN
isa = isa + nfft
itid = MOD( itid + 1, ntids )
Expand Down Expand Up @@ -1175,7 +1175,7 @@ SUBROUTINE rhov(irb,eigrb,rhovan,rhog,rhor)
COMPLEX(DP), ALLOCATABLE :: v(:)
COMPLEX(DP), ALLOCATABLE :: qv(:)

#if defined(__OPENMP)
#if defined(_OPENMP)
INTEGER :: itid, mytid, ntids
INTEGER :: omp_get_thread_num, omp_get_num_threads
EXTERNAL :: omp_get_thread_num, omp_get_num_threads
Expand All @@ -1194,7 +1194,7 @@ SUBROUTINE rhov(irb,eigrb,rhovan,rhog,rhor)
! private variable need to be initialized, otherwise
! outside the parallel region they have an undetermined value
!
#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = 0
ntids = 1
itid = 0
Expand All @@ -1220,7 +1220,7 @@ SUBROUTINE rhov(irb,eigrb,rhovan,rhog,rhor)
v (:) = (0.d0, 0.d0)
!$omp end workshare

#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = omp_get_thread_num() ! take the thread ID
ntids = omp_get_num_threads() ! take the number of threads
itid = 0
Expand Down Expand Up @@ -1251,7 +1251,7 @@ SUBROUTINE rhov(irb,eigrb,rhovan,rhog,rhor)
IF( ia .EQ. na(is) ) nfft = 1
#endif

#if defined(__OPENMP)
#if defined(_OPENMP)
IF ( mytid /= itid ) THEN
isa = isa + nfft
itid = MOD( itid + 1, ntids )
Expand Down
4 changes: 2 additions & 2 deletions CPV/src/exx_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ MODULE exx_module
REAL(DP), PUBLIC :: dexx_dh(3,3) ! dexx/dhab for vofrho.f90
REAL(DP), PUBLIC :: exxalfa ! fraction of exx mixing (locally used in CP)
!
#if defined(__OPENMP)
#if defined(_OPENMP)
INTEGER, EXTERNAL :: omp_get_max_threads
#endif
!==========================================================================
Expand Down Expand Up @@ -164,7 +164,7 @@ SUBROUTINE exx_initialize()
WRITE(stdout,'(/,3X,"Parallelization info :")')
WRITE(stdout,'(5X,"electronic states ",3X,I7)') nbsp
WRITE(stdout,'(5X,"MPI tasks ",3X,I7)') nproc_image
#if defined(__OPENMP)
#if defined(_OPENMP)
WRITE(stdout,'(5X,"OpenMP threads/MPI task",3X,I4)') omp_get_max_threads()
#endif
WRITE(stdout,'(5X,"Taskgroups ",3X,I7)') dtgs%nogrp
Expand Down
2 changes: 1 addition & 1 deletion CPV/src/init.f90
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ subroutine init_dimensions( )
!
CALL ggenb ( ecutrho, iverbosity )
!
#if defined __OPENMP
#if defined _OPENMP
CALL cft_b_omp_init( dfftb%nr1, dfftb%nr2, dfftb%nr3 )
#endif
ELSE IF( okvan .OR. nlcc_any ) THEN
Expand Down
10 changes: 5 additions & 5 deletions CPV/src/newd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ SUBROUTINE newd(vr,irb,eigrb,rhovan,fion)
INTEGER :: na_bgrp, ia_bgrp
EXTERNAL boxdotgrid

#if defined(__OPENMP)
#if defined(_OPENMP)
INTEGER :: itid, mytid, ntids, omp_get_thread_num, omp_get_num_threads
EXTERNAL :: omp_get_thread_num, omp_get_num_threads
#endif
Expand All @@ -69,7 +69,7 @@ SUBROUTINE newd(vr,irb,eigrb,rhovan,fion)

isa = 1

#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = omp_get_thread_num() ! take the thread ID
ntids = omp_get_num_threads() ! take the number of threads
itid = 0
Expand All @@ -96,7 +96,7 @@ SUBROUTINE newd(vr,irb,eigrb,rhovan,fion)
nfft=2
#endif

#if defined(__OPENMP)
#if defined(_OPENMP)
IF ( mytid /= itid ) THEN
isa = isa + nfft
itid = MOD( itid + 1, ntids )
Expand Down Expand Up @@ -181,7 +181,7 @@ SUBROUTINE newd(vr,irb,eigrb,rhovan,fion)
iss=1
isa=1

#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = omp_get_thread_num() ! take the thread ID
ntids = omp_get_num_threads() ! take the number of threads
itid = 0
Expand All @@ -201,7 +201,7 @@ SUBROUTINE newd(vr,irb,eigrb,rhovan,fion)
nfft=2
#endif

#if defined(__OPENMP)
#if defined(_OPENMP)
IF ( mytid /= itid ) THEN
isa = isa + nfft
itid = MOD( itid + 1, ntids )
Expand Down
6 changes: 3 additions & 3 deletions CPV/src/nl_base.f90
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ subroutine nlfq_bgrp_x( c_bgrp, eigr, bec_bgrp, becdr_bgrp, fion )
!
real(DP), allocatable :: tmpbec(:,:), tmpdr(:,:)
real(DP), allocatable :: fion_loc(:,:)
#if defined(__OPENMP)
#if defined(_OPENMP)
INTEGER :: mytid, ntids, omp_get_thread_num, omp_get_num_threads
#endif
!
Expand All @@ -734,7 +734,7 @@ subroutine nlfq_bgrp_x( c_bgrp, eigr, bec_bgrp, becdr_bgrp, fion )
!$omp shared(becdr_bgrp,bec_bgrp,fion_loc,k,f_bgrp,deeq,dvan,nbsp_bgrp,ish,nh,na,nsp,nhm,nbspx_bgrp,ispin_bgrp), &
!$omp private(tmpbec,tmpdr,isa,is,ia,iv,jv,inl,temp,i,mytid,ntids,sum_tmpdr)

#if defined(__OPENMP)
#if defined(_OPENMP)
mytid = omp_get_thread_num() ! take the thread ID
ntids = omp_get_num_threads() ! take the number of threads
#endif
Expand All @@ -748,7 +748,7 @@ subroutine nlfq_bgrp_x( c_bgrp, eigr, bec_bgrp, becdr_bgrp, fion )

isa=isa+1

#if defined(__OPENMP)
#if defined(_OPENMP)
! distribute atoms round robin to threads
!
IF( MOD( isa, ntids ) /= mytid ) CYCLE
Expand Down
Loading

0 comments on commit e3436aa

Please sign in to comment.