First off, thank you for considering contributing to this project! It's people like you that make the open-source community such an amazing place to learn, inspire, and create.
This section guides you through submitting a bug report.
- Check the Issues: Ensure the bug hasn't already been reported.
- Open a New Issue: comprehensive bug reports are the key to fixing problems.
- Include Details:
- Your OS (e.g., Ubuntu 20.04, macOS Big Sur).
- MPI Version (e.g., OpenMPI 4.1.0).
- Compiler Version (e.g., GCC 9.3).
- Steps to reproduce the bug.
This section guides you through submitting an enhancement suggestion.
- Open a New Issue: Describe the enhancement and why it is useful.
- Provide Context: Explain how this enhancement fits into the current architecture (e.g., "Adding OpenMP support to the inner loop").
The process for submitting a Pull Request (PR) is straightforward:
- Fork the Repo and create your branch from
main. - Clone the Repo to your local machine.
- Create a Branch:
git checkout -b feature/AmazingFeature
- Make your changes.
- Test your changes: Ensure the code compiles and runs the scaling test without errors.
make clean && make ./scripts/scaling_test.sh - Commit your changes (Write clear, concise commit messages).
- Push to the branch:
git push origin feature/AmazingFeature
- Open a Pull Request.
To maintain the quality of this HPC project, please adhere to the following guidelines:
- Standard: Use C99 or later.
- MPI: Use standard MPI calls (e.g.,
MPI_Send,MPI_Recv). Avoid proprietary extensions. - Memory Safety: Always free allocated memory (
malloc/free). Usevalgrindif possible to check for leaks. - Error Handling: Check return values for file I/O and MPI calls.
- Indentation: Use 4 spaces for indentation. No tabs.
- Naming:
- Variables:
snake_case(e.g.,best_distance,city_count) - Functions:
snake_case(e.g.,calculate_energy,swap_replicas) - Constants/Macros:
UPPER_CASE(e.g.,MAX_REPLICAS)
- Variables:
- Comments: Comment complex logic, especially the MPI synchronization blocks.
- Avoid: Excessive I/O in the main simulation loop.
- Prefer:
static inlinefor small helper functions like distance calculations to encourage inlining.
By contributing, you agree that your contributions will be licensed under its MIT License.