-
Notifications
You must be signed in to change notification settings - Fork 55
Mpi for heat eqn #215
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
base: master
Are you sure you want to change the base?
Mpi for heat eqn #215
Conversation
CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0) | ||
|
||
FIND_PACKAGE(deal.II 9.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0) | |
FIND_PACKAGE(deal.II 9.4.0 | |
CMAKE_MINIMUM_REQUIRED(VERSION 3.13.4) | |
FIND_PACKAGE(deal.II 9.5.0 |
See #216.
I did not have time to look at the program yet. Just a comment about your CMakeLists.txt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WasimNiyazMunshi Here are some comments. I think the rest looks good. If you know step-26 and step-40, it should not be difficult to understand the program.
CMAKE_MINIMUM_REQUIRED(VERSION 3.3.0) | ||
|
||
FIND_PACKAGE(deal.II 9.4.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still relevant.
) | ||
ENDIF() | ||
|
||
DEAL_II_INITIALIZE_CACHED_VARIABLES() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this line, you will want to put a block of code that ensures that deal.II was configured with MPI and PETSc. The following is copied from examples/step-40/CMakeLists.txt
, and you may want to adjust as necessary:
#
# Are all dependencies fulfilled?
#
if(NOT ((DEAL_II_WITH_PETSC AND NOT DEAL_II_PETSC_WITH_COMPLEX) OR DEAL_II_WITH_TRILINOS) OR NOT DEAL_II_WITH_P4EST)
message(FATAL_ERROR "
Error! This tutorial requires a deal.II library that was configured with the following options:
DEAL_II_WITH_PETSC = ON
DEAL_II_PETSC_WITH_COMPLEX = OFF
DEAL_II_WITH_P4EST = ON
or
DEAL_II_WITH_TRILINOS = ON
DEAL_II_WITH_P4EST = ON
However, the deal.II library found at ${DEAL_II_PATH} was configured with these options:
DEAL_II_WITH_PETSC = ${DEAL_II_WITH_PETSC}
DEAL_II_PETSC_WITH_COMPLEX = ${DEAL_II_PETSC_WITH_COMPLEX}
DEAL_II_WITH_P4EST = ${DEAL_II_WITH_P4EST}
DEAL_II_WITH_TRILINOS = ${DEAL_II_WITH_TRILINOS}
This conflicts with the requirements.
One or both of the aforementioned combinations of prerequisites are not met by your installation, but at least one is required for this tutorial step."
)
endif()
(Note that step-40 can use either PETSc or Trilinos. I don't know whether that's true for your program, so you may have to change the snippet here a bit.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For another example, see Distributed_LDG_Method/CMakeLists.txt
in the code gallery repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the executable from the patch.
## Motivation | ||
This program solves the transient heat equation in deal.II using MPI. A parallel solver for the transient heat equation is highly valuable in numerous fields where efficient, large-scale simulations of heat transfer are required. In engineering, it models heat dissipation in electronics, engines, and industrial systems, while in climate science, it simulates heat flow in the atmosphere and oceans. Geophysical applications use it to study heat transfer in the Earth's crust, and coupled systems like conjugate heat transfer in fluids or thermoelasticity in structures rely on it for accurate, high-resolution solutions. Parallel solvers are essential for handling fine meshes, small time steps, and real-time applications, leveraging modern high-performance computing hardware to reduce computation time. | ||
|
||
The heat equation is already solved in serial in step-26 of the deal.II tutorials. Here, we extend the same program and explore the use of parallel computing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add that the program draws from step-40 regarding parallel computing?
Mpi solver for heat eqn