Skip to content

Commit

Permalink
Update build and install process and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewcarbone committed Dec 17, 2024
1 parent 1baa415 commit 36ee4e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ add_executable(
)

target_link_libraries(hdspin-postprocess ${MPI_CXX_LIBRARIES})

install(TARGETS hdspin hdspin-postprocess RUNTIME DESTINATION bin)
5 changes: 3 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ Once CMake and MPI are installed on your system, the rest should be straighforwa
```bash
git clone [email protected]:matthewcarbone/hdspin.git
cd hdspin
cmake -S . -B build -DPRECISON=256 -DBUILD_TESTS=ON -DSMOKE=ON
cmake -S . -B build -DPRECISON=256 -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTS=ON -DSMOKE=ON
cd build
make -j8
sudo make -j8 install
```
Sudo permissions are required to install to the directory `/usr/local/bin`, where the first two parts of the path are set by `DCMAKE_INSTALL_PREFIX`. You can of course choose whichever directory you want, but we recommend putting it in your path so you have easy access to the executable.

Note that at compile time, there are three options for the user to set:
* `-DPRECISON=<INT>` is the maximum number of spins you can use during the simulation. Should be a power of 2 (as recommended by the Arbitrary Precision library). Default is `256`. Note that this is the _maximum_ value you can use for `N_spins` in the simulation.
Expand Down

0 comments on commit 36ee4e7

Please sign in to comment.