Guidelines for Developers
Using the Git Repository
Check out the Gitlab repository to a directory quantics.- git clone https://gitlab.com/quantics/quantics.git quantics
- git branch -a
- git checkout branch
- git branch newbranch
- git checkout newbranch
- git status
- git add .
- git commit -a
- git add routine
- git commit
- git push branch
- git push --set-upstream origin branch
- git pull
- git merge master
Altering the Program
When developing the package further, the following rules should be obeyed.
- Make additions so as to change the existing code as little as
possible. When changing the program, always keep in mind that
others also need to use and understand your new code. This means
for instance:
- Split larger problems into smaller ones and write an individual subroutine for each.
- Try to be as general as possible.
- Use self-explanatory variable and routine names.
- Comments in the code are welcome. The Doxygen mark-up language can be used to allow comments to be extracted and documented.
- Test the new code with the Automatic Program Test. Add any new test cases that are necessary for your new options. If changes had to be made that set the Automatic Program Test out of order (e.g. a new output format), immediately update the test files. Check your code on different platforms.
- If everything works correctly, update your code and documentation with the latest repository version, as it might have changed during your work. Finally, commit your code and documentation to the repository, including a version log which describes the main changes.
Debugging the Program
In order to debug the code set the option -d of the compile shell script when compiling the program. By this, the compiler produces additional symbol table information for full symbolic debugging instead of optimising the code. Note that a "d" is added to the name of the executable, e.g. quanticsd. A debugger (e.g dbx or gdb) can then aid you in detecting a bug. It may also be helpful to compile and run your code on another platform, since different compilers often perform different checks of the code and produce differently rigorous compiler and run-time warning messages.
Known bugs that have not been fixed yet are compiled in the To Be Done documentation.
Version and Release Numbers.
The Quantics project version number is stored in the module Versions.F90. This number has the form V.r, where V is the version number and r the release number. Thus 12.01 denotes the first release of version 12. This number relates to the original Heidelberg MCTDH package and for the Quantics package the version given is V.r - 11 so that 12.01 equates to version 1 release 1.
If the project is changed in such a way that it should be differentiated from previous revisions, then the revision number should be incremented by 1. Such changes are the removal of bugs, minor changes in file formats, major re-writing of code etc. A more major change may then lead to a change in the release, or even version, number.
This information is written, e.g., to the log file and can be used to help narrow down problems if they arise after revisions.