How to install HPhi on macOS using MateriApps Installer
This review explains how to install HPhi on macOS (Big Sur) using Homebrew and the MateriApps Installer.
2. Install Homebrew
Open a terminal and follow the instructions at https://brew.sh to install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ Homebrew/install/HEAD/install.sh)"
3. Install the compiler, tools, and libraries
Using Homebrew, install GCC, CMake, Git, and OpenMPI:
brew install gcc cmake git open-mpi
4. Download MateriApps Installer
cd $HOME git clone https://github.com/wistaria/MateriAppsInstaller.git
A set of scripts will be downloaded to $HOME/MateriAppsInstaller.
5. Setup the MateriApps Installer environment
$HOME/materiapps will be created and the minimum required scripts will be installed.
6. Install gcc-wrapper and HPhi
Homebrew installs GCC with a name with a version number, e.g. gcc-11. In order to be able to call GCC with a name without a version number, first install gcc-wrapper. Then, install HPhi
sh $HOME/MateriAppsInstaller/tools/gcc-wrapper/install.sh sh $HOME/MateriAppsInstaller/tools/gcc-wrapper/link.sh sh $HOME/MateriAppsInstaller/apps/hphi/install.sh gcc sh $HOME/MateriAppsInstaller/apps/hphi/link.sh
HPhi and other applications will be installed under $HOME/materiapps.
7. Run the tutorial
First, set the environment variables necessary for execution, such as $PATH, etc. The location of HPhi is also set in $HPHI_ROOT environment variable:
Note: The above operation is required every time you open a terminal. Or, if you put the above line in $HOME/.zshrc, it will be executed automatically when you open the terminal.
Next, copy the tutorial files and run it:
cp -r $HPHI_ROOT/samples $HOME cd $HOME/samples/tutorial_1.1 HPhi -s stan1.in
The eigenenergies of the spin-1/2 dimers will be calculated. More tutorials are available at https://issp-center-dev.github.io/HPhi/manual /develop/tutorial/en/html/.