-
Notifications
You must be signed in to change notification settings - Fork 235
Best Practices
- Use issues to discuss intended modifications
- Document your code
- Coding style
- Please do NOT use MPI BARRIERS unless you know exactly what you are doing
- External tools and libraries
- MPI wrappers
- Unit testing and regression testing
- Wiki usage
GitHub provides a system to track issues. It should be a central place to monitor SPECFEM3D evolution. In particular:
-
report bug as they occur
-
plan modifications.
The issue tracker interface lets us track bugs being fixed and enhancements being made by assigning labels. We will reserve the labels
-
bug for issue fixing
-
enhancement for feature development.
Any new code should be fully Doxygen commented. If you have some free time, feel free to comment any code you modify.
When modifying an existing file, try to maintain consistency with its original style. If the code you add looks drastically different from the original code, it may be difficult for readers to follow. Try to avoid this.
In the past we sometimes got deadlocking in the code because of MPI_BARRIERS that were added recently inside "if" statements. This is pretty dangerous because if the "if" statement is true on some processors but not others the code deadlocks and the simulation becomes idle (forever).
Thus, please do not add MPI_BARRIERs unless you know exactly what you are doing (in 99% of the cases they are useless anyway).
In particular, never put them in "if" statements.
Important note for all developers: we should never use Release Candidate (rc) versions of any external package used by the SPECFEM codes, only stable versions. For instance, regarding SCOTCH, please do not use e.g. scotch_6.0.1rc2
but rather a stable version such as scotch_5.1.12b
.
When programming new features or routines for SPECFEM3D or SPECFEM3D_GLOBE, if you need to use MPI, please do not call MPI directly but rather use the wrapper routines that you will find in file src/shared/parallel.f90
.
This section is just a stub.
The Wiki is meant to be used as a developer reference, not a replacement for the user manual. In general, the Wiki should only contain entries on software engineering and computer science aspects of SPECFEM development.
Anyone with pull access to the central repository is allowed to make changes to the Wiki. Note that the Wiki is itself a Git repository that you can clone locally, modify with your favourite Markdown editor and push your changes to the remote server.
Development wiki for SPECFEM3D
Development wiki
- Home
- Development plan
- Best Practices
- Using Git for SPECFEM
- Advanced Git Topics
- Versioning Conventions
- Merging Development Branches into Master
User manual
- 01_introduction
- 02_getting_started
- 03_mesh_generation
- 04_creating_databases
- 05_running_the_solver
- 06_fault_sources
- 07_adjoint_simulations
- 08_doing_tomography
- 08b_performing_full_waveform_inversion_FWI_or_source_inversions
- 09_noise_simulations
- 10_gravity_calculations
- 11_graphics
- 12_running_scheduler
- 13_changing_the_model
- 14_post_processing
- 15_informations_for_developers
- A_reference_frame
- B_channel_codes
- C_troubleshooting
- D_license
- authors
- bug_reports
- copyright_and_version
- features
- manual_SPECFEM3D_Cartesian
- notes_and_acknowledgement
- sponsors