This is the "heart_demo" project that implements minimal functionality for a real-time 3D cardiac electrophysiology simulation. It can be launched on "host" and Intel(R) Many Integrated Core Architecture processors.
| Property | Description |
|---|---|
| What you will learn | How to build the cardiac sample and run Advisor to analyze an MPI application running on the CPU and GPU. |
| Time to complete | 30 minutes |
| Optimized for | Description |
|---|---|
| OS | Linux* Ubuntu* 18.04 |
| Hardware | Skylake and GEN9 or newer |
| Software | Intel® oneAPI DPC++/C++ Compiler, MPI, OpenMP*, Intel® Advisor |
Note: If you have not already done so, set up your CLI environment by sourcing the
setvarsscript located in the root of your oneAPI installation.Linux:
- For system wide installations:
. /opt/intel/oneapi/setvars.sh- For private installations:
. ~/intel/oneapi/setvars.shWindows:
C:\Program Files(x86)\Intel\oneAPI\setvars.batFor more information on environment variables, see Use the setvars Script for Linux or macOS, or Windows.
If running a sample in the Intel® DevCloud, you must specify the compute node (CPU, GPU, FPGA) and whether to run in batch or interactive mode. For more information, see the Intel® oneAPI Base Toolkit Get Started Guide.
Perform the following steps:
-
Build the program using the following commands.
$ mkdir build $ make -
Run the program.
$ cd .. $ mpirun -n 2 ./<executable> -m <workload size> -s <workload size> -t 100
You can change the workload size with the Cardiac Sample.
-m <workload size>
mesh_small : Defines the 3 dimensional grid sizes for the stencil
mesh_mid : Number of timesteps to compute.
-s <workload size.txt>
setup_small.txt : Defines the 3 dimensional grid sizes for the stencil
setup_mid.txt : Number of timesteps to compute.
If you receive an error message, troubleshoot the problem using the Diagnostics Utility for Intel® oneAPI Toolkits, which provides system checks to find missing dependencies and permissions errors. See Diagnostics Utility for Intel® oneAPI Toolkits User Guide.
If an error occurs, you can get more details by running make with
the VERBOSE=1 argument:
make VERBOSE=1
Below is a high-level Advisor analysis to analyze performance on the CPU
Note: The actual results and measurements may vary depending on your actual hardware.
Run a hotspots analysis to find the bottlenecks and most time consuming loop.
VTune Command
Insert Output
Code samples are licensed under the MIT license. See License.txt for details.
Third party program Licenses can be found here: third-party-programs.txt.