Skip to content

Commit

Permalink
user manuel added
Browse files Browse the repository at this point in the history
  • Loading branch information
Meng committed Aug 3, 2023
1 parent 05d861c commit f7b7b3f
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 7 deletions.
26 changes: 24 additions & 2 deletions doc/user_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cd build
3. Configure the project using CMake and build
```bash
cmake ..
make
make -j4
```


Expand All @@ -60,7 +60,29 @@ Follow these steps to build NWQ-Sim on the OLCF Frontier HPC:
source ~/NWQ-Sim/environment/setup_frontier.sh
```

Then, build NWQ-Sim using the steps in [Build from Source](#build_base)
1. Clone the NWQ-Sim repository:
```bash
git clone https://github.com/pnnl/NWQ-Sim.git
cd NWQ-Sim
```
2. Create a build directory and navigate into it:
```bash
mkdir build
cd build
```
3. Configure the project using CMake
```bash
cmake ..
```
4. (ISSUE) Default clang++ compiler on Frontier HPC produces slow-running code. hipcc improves performance but can't be set directly in CMake. A temporary fix is provided below to replace clang++ with hipcc in build scripts:

```bash
sed -i 's|/opt/rocm-5.3.0/llvm/bin/clang++|hipcc|g' qasm/CMakeFiles/nwq_qasm.dir/build.make
```
5. Build
```bash
make -j4
```

### ORNL Summit HPC

Expand Down
38 changes: 35 additions & 3 deletions doc/user_manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ follow these steps:
.. code:: bash
cmake ..
make
make -j4
Build on HPC Systems
--------------------
Expand All @@ -80,8 +80,40 @@ Follow these steps to build NWQ-Sim on the OLCF Frontier HPC:
source ~/NWQ-Sim/environment/setup_frontier.sh
Then, build NWQ-Sim using the steps in `Build from
Source <#build_base>`__
1. Clone the NWQ-Sim repository:

.. code:: bash
git clone https://github.com/pnnl/NWQ-Sim.git
cd NWQ-Sim
2. Create a build directory and navigate into it:

.. code:: bash
mkdir build
cd build
3. Configure the project using CMake

.. code:: bash
cmake ..
4. (ISSUE) Default clang++ compiler on Frontier HPC produces
slow-running code. hipcc improves performance but can’t be set
directly in CMake. A temporary fix is provided below to replace
clang++ with hipcc in build scripts:

.. code:: bash
sed -i 's|/opt/rocm-5.3.0/llvm/bin/clang++|hipcc|g' qasm/CMakeFiles/nwq_qasm.dir/build.make
5. Build

.. code:: bash
make -j4
ORNL Summit HPC
~~~~~~~~~~~~~~~
Expand Down
6 changes: 5 additions & 1 deletion environment/setup_crusher.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#Environment settings for ORNL Crusher HPC
module load rocm
module load cmake
module load rocm/5.3.0
module load cray-mpich
module load craype-accel-amd-gfx90a

export cc=gcc
export CC=g++

export MPICH_GPU_SUPPORT_ENABLED=1
export MY_HIP_ARCH=gfx90a
5 changes: 4 additions & 1 deletion environment/setup_frontier.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#Environment settings for ORNL Frontier HPC
module load cmake
module load rocm/5.3.0
module load cray-mpich
module load craype-accel-amd-gfx90a

export cc=gcc
export CC=g++

export MY_HIP_ARCH=gfx90a
export MY_HIP_ARCH=gfx90a
export MPICH_GPU_SUPPORT_ENABLED=1

0 comments on commit f7b7b3f

Please sign in to comment.