Skip to content

Getting Started

Robert West edited this page Jun 3, 2021 · 4 revisions

Getting Started

1. Clone This Repository

git clone https://github.com/uvahotspot/HotSpot.git

2. Install Dependencies

HotSpot is capable of running simulations right out of the box. However, installing SuperLU can drastically decrease simulation times and is recommended (it's also necessary for running simulations with microfluidic cooling). You can install SuperLU and BLAS (a dependency of SuperLU) from the package manager:

sudo apt install libblas-dev libsuperlu5 libsuperlu-dev

3. Edit the Makefile

If you want to specify more building options, you'll need to open up the Makefile in a text editor and do some editing. It's possible here to specify information for math acceleration engines, specify where BLAS and SuperLU are installed (if installed in non-standard locations), and to change compilation options.

4. Build HotSpot

The simplest way to build HotSpot is to simply:

cd HotSpot && make

We recommend building HotSpot with the SuperLU library. If you installed SuperLU as described in Step 2, you can include it when building:

cd HotSpot && make SUPERLU=1

If the linking to SuperLU doesn't work, you may need to modify the BLASLIB, SUPERLULIB, and SLU_HEADER variables in the Makefile. You can also use a variety of other building options, which are described in more detail in Building Options.

5. Run A Simulation

To see how HotSpot works and run a simple simulation, you can execute run.sh in one of the examples directories. More details about these are given in Example Simulations. To learn how to create your own simulations, familiarize yourself with the Simulation Options and File Types.

6. Fiddle

If you want to learn more about how HotSpot works, you can very easily change the simulation options in the examples example simulations. Here are a few simple changes that should give you some insight:

  • Change the grid granularity in example2 from 64x64 to 32x32. Observe the effect this has on the output files.
  • Change run.sh in example3 to create heat map of layer 0 instead of layer 2.
  • Change example5 to use the vertical microchannel geometry given in vertical.csv instead of the horizontal microchannel geometry given in horizontal.csv.

More Advanced Usage

To incorporate HotSpot into your own designs, we archive all of HotSpot's functions into libhotspot.a. We also give the function prototypes for important functions in hotspot-iface.h. This means that you can call HotSpot's functions in your own code by:

  1. Adding #include "hotspot-iface.h" to your source code file.
  2. Linking to our library file:

gcc <your_code.c> -lm -L</path/to/libhotspot.a/directory> -lhotspot -I</path/to/HotSpot/directory>

Additionally, we've included an example of how you might incorporate basic HotSpot functionality into your own code in sim-template.c.