Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MPI Usage Example to the Project #1

Open
MatthAlex opened this issue Jun 12, 2024 · 1 comment
Open

Add MPI Usage Example to the Project #1

MatthAlex opened this issue Jun 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@MatthAlex
Copy link
Owner

MatthAlex commented Jun 12, 2024

The current Fortran project template does not include an example showcasing the usage of MPI (Message Passing Interface) for parallel programming. Adding an MPI example will showcase how to migrate a project to this template.

Some ideas:

  • Create a new example directory under examples/ for MPI usage.
  • Develop a simple Fortran program that utilizes MPI for parallel processing.
  • Update the fpm.toml file to include the necessary MPI dependencies.
  • Document the MPI example in the README.md, including instructions on how to compile and run the example.
@MatthAlex MatthAlex added the enhancement New feature or request label Jun 12, 2024
@MatthAlex
Copy link
Owner Author

This is a headscratcher, mostly because of fpm limitations.

FPM

The main work to solve this issue is shown in this PR@fpm. Until it's fixed, fpm will try to build everything with MPI if the dependencies require it.

MPI project

In this repository I've outlined a simple MPI project using this template.

The main change that enables this is fpm.toml:

$ diff fortran-project-template/fpm.toml ../mpi-project-exploration/fpm.toml 
< implicit-typing = false
< implicit-external = false
---
> implicit-typing = true
> implicit-external = true
> [dependencies]
> mpi = "*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant