NWChem is being developed by a consortium of scientists ([[Development_Team |Current developers list can be found here]]), and maintained at the EMSL at PNNL. This page provides information for current and new developers.

NWChem is being developed by a consortium of scientists ([[Development_Team |Current developers list can be found here]]), and maintained at the EMSL at PNNL. This page provides information for current and new developers.

-

=Developer Access Policy (Become a Developer)=

+

===Downloading and committing to the NWChem source tree===

-

Developer access to the NWChem source tree branches in svn has been divided into four tiers:

+

The NWChem source is maintained with [http://subversion.apache.org/ subversion], an open-source version control system. To download NWChem you must have [http://subversion.apache.org/ subversion] installed on your development platform. For an extensive descriptio of the SVN functionality and commands, please check the svn documentation.

-

#NWChem Core Developer: Developer has full svn access to release and development branches of the NWChem source tree. Owns and is responsible for one or more modules.

+

Direct access to the source tree is password restricted. To gain access to the NWChem SVN tree see the section on [[Obtaining Read/Write access to NWChem source tree|Obtaining Read/Write access to NWChem source tree]].

-

#Trusted Developer: Developer may be internal or external to PNNL but has full svn access to release and development branches of the NWChem source tree. May own or be responsible for one or more modules.

+

-

#Developer: Developer may be internal or external to PNNL and has selected svn access to the development branch of the NWChem source tree. Each Developer closely coordinates code contributions with the assigned Point of Contact (POC) from the NWChem Core Developer Team, primarily the Core Developer owning the module in which the contributions will reside. If the development leads to a new module, the NWChem Core Developer Team will assign a POC with responsibility for the new module.

+

-

#Contributor: Contributor may be internal or external to PNNL and has no access to the development branch of the NWChem source tree. Contributor’s code will be incorporated by the Point of Contact from the NWChem Core Developer Team. This is the main mechanism for external users to contribute developments or enhancements to NWChem.

+

-

New potential developers can contact members of the NWChem Core Developer Team directly or “apply” through the NWChem web site. Prospective developers will be discussed and assigned developer access by the NWChem Core Developer Team, Before contributions from this new developer can be incorporated into NWChem, this person will have to provide written feedback that the contributions can be released within NWChem under a [http://www.opensource.org/licenses/ecl2.php ECL 2.0 open-source license]. A (Trusted) Developer will receive the appropriate access to svn. If a Developer consistently incorporates code changes that negatively affect the development tree, access to svn can be revoked.

+

* Downloading

-

===Downloading and committing to the NWChem source tree===

+

The development version of NWChem can be downloaded using the command

-

The NWChem source is maintained with [http://subversion.apache.org/ subversion], an open-source version control system. To download NWChem you must have [http://subversion.apache.org/ subversion] installed on your development platform

+

% svn checkout https://svn.pnl.gov/svn/nwchem/trunk nwchem

-

Note: Access to the is closed to the public, so in order to gain access to the code, you must be added to the list of developers authorized to work on the project.

+

* Committing changes adding new files

-

Getting the Code ¶

+

-

Once Subversion is installed, you download NWChem as follows:

+

Committing changes to existing source files can be done using the command

-

% svn checkout https://svn.pnl.gov/svn/nwchem/trunk nwchem

+

% svn commit --message "information about the changes made"

-

The checkout command makes a local copy of the entire NWChem source tree into your current working directory as a subdirectory called app-nwchem. By requesting .../nwchem/svn/trunk, you get the main development trunk, which should have the latest stable code.

+

New files and directories can be added using the commands

-

Making Changes ¶

+

-

Once you've downloaded the code, you can make whatever changes you like. For example, you might edit a file to fix a bug or add some code. To make your changes permanent, you must commit them to the repository as follows:

+

% svn add ''<files or directories to add>''

+

% svn commit --message ''<information about the changes made>''

-

% cd nwchem

+

Notes:

-

% svn commit --message "fixed my first bug!"

+

-

You don't have to include the optional --message argument. If you just say svn commit, Subversion will prompt you for comments in your favorite editor, and you can type much more.

+

# Before committing any changes or additions, make sure the NWChem tree compiles properly

+

# When adding new files, make sure to properly update the GNUMakefile in the directory you are working in, so that the new file gets compiled

-

It's best to commit at the top of the source tree--that's why we said "cd nwchem" in the example above. When you commit at the top of the tree, Subversion will search everything below, find all files that have changed, and commit them all at once. Committing a change makes it permanent. Once committed, other developers will see the change. If for some reason, you want to throw away your changes and start fresh, you can simply remove your source tree and check it out all over again. Or, you may want to remove just a few files that you've modified, and then update (as we'll see below) to replace the missing files with their previous version.

+

==Obtaining Read/Write access to NWChem source tree==

+

+

Developer access to the NWChem source tree branches in svn has been divided into four tiers:

+

+

#NWChem Core Developer: Developer has full svn access to release and development branches of the NWChem source tree. Owns and is responsible for one or more modules.

+

#Trusted Developer: Developer may be internal or external to PNNL but has full svn access to release and development branches of the NWChem source tree. May own or be responsible for one or more modules.

+

#Developer: Developer may be internal or external to PNNL and has selected svn access to the development branch of the NWChem source tree. Each Developer closely coordinates code contributions with the assigned Point of Contact (POC) from the NWChem Core Developer Team, primarily the Core Developer owning the module in which the contributions will reside. If the development leads to a new module, the NWChem Core Developer Team will assign a POC with responsibility for the new module.

+

#Contributor: Contributor may be internal or external to PNNL and has no access to the development branch of the NWChem source tree. Contributor’s code will be incorporated by the Point of Contact from the NWChem Core Developer Team. This is the main mechanism for external users to contribute developments or enhancements to NWChem.

+

+

New potential developers can contact members of the NWChem Core Developer Team directly or “apply” through the NWChem web site. Prospective developers will be discussed and assigned developer access by the NWChem Core Developer Team, Before contributions from this new developer can be incorporated into NWChem, this person will have to provide written feedback that the contributions can be released within NWChem under a [http://www.opensource.org/licenses/ecl2.php ECL 2.0 open-source license]. A (Trusted) Developer will receive the appropriate access to svn. If a Developer consistently incorporates code changes that negatively affect the development tree, access to svn can be revoked.

-

From time to time, you and another developer will modify the same file at the same time. Suppose the other developer checks in his changes first. When you try to commit, you'll get an error saying that your file is out-of-date. In that case, you need to update before committing. You can do that as follows:

+

===Compiling NWChem from source===

-

% cd nwchem

+

A detailed step-by-step description of the build process and necessary and optional environment variables is outlined on the [[Compiling_NWChem |Compiling NWChem]] page.

-

% svn update

+

-

It's best to update at the top of the source tree--just like commit. That's why we said "cd nwchem" in the example above. When you update at the top of the tree, Subversion will search everything below, adding any new files, replacing any missing files, and integrating changes made by other developers. Once all files are properly updated, you can commit your changes again, and this time, it will work.

===Development Contribution Requirements===

===Development Contribution Requirements===

Line 59:

Line 62:

The programming model in is based on modular APIs. NWChem consists of the programming languages:

The programming model in is based on modular APIs. NWChem consists of the programming languages:

-

#FORTRAN77 and FORTRAN90. For FORTRAN90, please avoid using allocates and deallocates. Dynamic memory access should be performed using the memory access (MA) layer.

+

#FORTRAN77 and FORTRAN90. For FORTRAN90, avoid using allocates and deallocates. Dynamic memory access should be performed using the memory access (MA) layer.

#C and C++. Only simple constructs should be used in C++.

#C and C++. Only simple constructs should be used in C++.

#Memory Allocation will be done through the MA and GA memory infrastructure.

#Memory Allocation will be done through the MA and GA memory infrastructure.

Line 65:

Line 68:

#OpenMP directives and CUDA/OpenCL.

#OpenMP directives and CUDA/OpenCL.

#Python scripts can be uploaded into the contrib directory. Bindings to additional functionality require QA and documentation.

#Python scripts can be uploaded into the contrib directory. Bindings to additional functionality require QA and documentation.

NWChem Development

Downloading and committing to the NWChem source tree

The NWChem source is maintained with subversion, an open-source version control system. To download NWChem you must have subversion installed on your development platform. For an extensive descriptio of the SVN functionality and commands, please check the svn documentation.

Before committing any changes or additions, make sure the NWChem tree compiles properly

When adding new files, make sure to properly update the GNUMakefile in the directory you are working in, so that the new file gets compiled

Obtaining Read/Write access to NWChem source tree

Developer access to the NWChem source tree branches in svn has been divided into four tiers:

NWChem Core Developer: Developer has full svn access to release and development branches of the NWChem source tree. Owns and is responsible for one or more modules.

Trusted Developer: Developer may be internal or external to PNNL but has full svn access to release and development branches of the NWChem source tree. May own or be responsible for one or more modules.

Developer: Developer may be internal or external to PNNL and has selected svn access to the development branch of the NWChem source tree. Each Developer closely coordinates code contributions with the assigned Point of Contact (POC) from the NWChem Core Developer Team, primarily the Core Developer owning the module in which the contributions will reside. If the development leads to a new module, the NWChem Core Developer Team will assign a POC with responsibility for the new module.

Contributor: Contributor may be internal or external to PNNL and has no access to the development branch of the NWChem source tree. Contributor’s code will be incorporated by the Point of Contact from the NWChem Core Developer Team. This is the main mechanism for external users to contribute developments or enhancements to NWChem.

New potential developers can contact members of the NWChem Core Developer Team directly or “apply” through the NWChem web site. Prospective developers will be discussed and assigned developer access by the NWChem Core Developer Team, Before contributions from this new developer can be incorporated into NWChem, this person will have to provide written feedback that the contributions can be released within NWChem under a ECL 2.0 open-source license. A (Trusted) Developer will receive the appropriate access to svn. If a Developer consistently incorporates code changes that negatively affect the development tree, access to svn can be revoked.

Compiling NWChem from source

A detailed step-by-step description of the build process and necessary and optional environment variables is outlined on the Compiling NWChem page.

Development Contribution Requirements

All new functionality or capability contributions require:

Proper documentation in the user manual

QA Test Cases that adequately test the added functionality

Proposed new modules and tasks, and their impact on existing modules and functionality need to be documented for review. New modules or tasks will require agreement from the full team before they can be added.

Programming Model

The programming model in is based on modular APIs. NWChem consists of the programming languages:

FORTRAN77 and FORTRAN90. For FORTRAN90, avoid using allocates and deallocates. Dynamic memory access should be performed using the memory access (MA) layer.

C and C++. Only simple constructs should be used in C++.

Memory Allocation will be done through the MA and GA memory infrastructure.

Global Arrays Toolkit and MPI for parallel programming.

OpenMP directives and CUDA/OpenCL.

Python scripts can be uploaded into the contrib directory. Bindings to additional functionality require QA and documentation.

All routines should start with "explicit

Testing of development version

Code will be build nightly on a Redhat Linux64 Platform using gfortran and gcc.

Code will be tested nightly against QA suite.

Exhaustive coverage analysis of the QA suite will be performed twice a year.