INMCM60_sfx
This project a good one ...
Usage
Users are encouraged to participate in development, writing issues
References
Dependencies
The project has no dependencies
How to download and run code
Here we will show how to compile the code on your local PC. You must have git, make, Fortran compiler on your system path. The code allows easy to use compilation on different clusters and supercomputers, as well as installing without the MPI library dependency, see Documentation for details.
- Download the projects with git (username -- is your login on tesla.parallel.ru):
git clone http://username@tesla.parallel.ru/inmcm60_pbl/inmcm60_sfx/inmcm60_sfx.git
- Run Makefile.
make -B COMPILER=gnu
Option COMPILER
enables set of compiler-specific options. Most common are gnu
(GNU C/C++ compiler) and intel
(Intel C/C++ compiler, version above 16.0).
- If everything runs smoothly executable sfx.exe will be created.
## run the executable
./sfx.exe
Developing and working with issues
Suppose you were assigned to an issue introduce a feature
for one of the projects mentioned above and you need to make some changes in nse-diurnal-les project. Your typical workflow will be like this:
- first make sure you use proper credentials in your git environment that match that on http://tesla.parallel.ru/ :
git config --global user.email alice.roberts@securemail.com
git config --global user.name Alice Roberts
- go to the project's issues tab on http://tesla.parallel.ru/
- open issue assigned to you and click the arrow near create-merge-request button, select create new branch and create it. It will be named something like
10-introduce-a-feature
- go to the folder with the project
cd ./inmcm60_sfx/
- fetch all the new content with
git fetch
- checkout to the new branch
git checkout -b 10-introduce-a-feature
- set an upstream branch on the remote
git branch --set-upstream-to=origin/10-introduce-a-feature
- do all the regular steps:
./cpall.sh ../../code
, work on adding you feature - when you are done run the copy-back script to put code back to tracked folder
./cpall_back.sh ../
- go to your projects folder and check git status:
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: config-ex.txt
modified: my-awesome-feature.cpp
modified: makefile
modified: cpall.sh
no changes added to commit (use "git add" and/or "git commit -a")
- add the necessary files to commit with
git add
and discard unnecessary changes withgit restore
- create a commit with
git commit
and a clear message of what you've done following these simple recommendations - push your changes back to the tesla server with
git push
- browse to Tesla GitLab Server, navigate to the issue you worked on and create merge request, assign one of the maintainers to it and check that the merge will be done from your feature branch to
master
or other branch you intend to merge this into - wait for the merge to be approved, your work is done at this point, you deserve a beer.
It may happen that you have done everything right, but your merge request is impossible to merge. This means someone has committed to master while you were working on your feature. In some cases you will be able to fix this easily. You will need to switch to feature branch locally, make a dump of this branch and rebase it on master. If everything is fine push it to remote with force:
git fetch
git checkout 10-introduce-a-feature
git pull 10-introduce-a-feature
git checkout -b 10-introduce-a-feature-backup
git rebase master
git push -f origin 10-introduce-a-feature
Merge button on your merge request webpage should become active.
Tips for commit messages
Informative commit message would help to keep the project's history clean. Try to follow these tips:
- Separate subject from body with a blank line.
- Limit the subject line to 50 characters.
- Capitalize the subject line.
- Do not end the subject line with a period.
- Use the imperative mood in the subject line.
- Wrap the body at 72 characters.
- Use the body to explain what and why vs. how.