> For the complete documentation index, see [llms.txt](https://docs-ksc.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-ksc.gitbook.io/blog/install/nurion/mpip-3.4.1-install.md).

# mpiP v3.4.1 설치 소개

mpiP는 MPI 애플리케이션을 위한 가벼운 프로파일링 라이브러리입니다. MPI 함수에 대한 통계 정보만 수집하기 때문에 mpiP는 추적 도구보다 상당히 적은 오버헤드와 훨씬 적은 데이터를 생성합니다.

* mpiP Github : <https://github.com/LLNL/mpiP>

이 문서에서는 mpiP 3.4.1 버전을 컴파일 하여 설치 하는 방법에 대해 예시로 소개합니다.

## **가. 설치 환경**

| 구분                      | 내용                     |
| ----------------------- | ---------------------- |
| 대상 시스템                  | 누리온                    |
| OS Version              | 리눅스 / CentOS 7.9       |
| CPU                     | <p>Intel Xeon Phi 7250 |
| <br>Intel Xeon 6148</p> |                        |
| 컴파일러                    | GNU 7.2.0 version      |
| MPI                     | Openmpi 3.1.0 version  |
| 기타                      |                        |

## **나. 설치 전 환경 설정**

누리온 시스템에서는 PATH, LD\_LIBRARY\_PATH 설정을 손쉽게 하기 위해서 환경설정 툴인 Module이 구성되어 있으며 이하 설치 소개에서는 module load 를 이용한 환경설정 방법으로 안내 드립니다.

**\[ 환경 설정 ]**

<pre class="language-shell-session"><code class="lang-shell-session"><strong>$ module purge
</strong><strong>$ module load gcc/7.2.0 openmpi/3.1.0
</strong></code></pre>

## **다. 설치 과정**

설치 과정 소개는 tar 를 이용한 압축 해제 방법과 설정 방법등 진행 절차를 위주로 설명하고, 소스 파일 다운로드 등은 생략합니다.

**mpiP는 dependency로 인하여 설치 전 binutils와 libunwind 라이브러리에 대한 설치가 사전에 완료되어야 합니다.**

설치 경로는 <mark style="color:blue;">**${HOME}/apps/mpiP/3.4.1**</mark>을 사용하였습니다. 이 위치는 사용자에게 맞는 위치로 변경하여야 합니다. 아래의 방법으로 설치 진행 시 라이브러리와 헤더 파일은 각각 <mark style="color:blue;">**my\_lib, my\_include**</mark>\*\* \*\* 디렉토리에 설치됩니다.

### **1. binutils 설치**

\[설치과정]

```shell-session
$ tar xzvf binutils-2.32.tar.gz
$ cd binutils-2.32
$ ./configure --prefix=${HOME}/apps/binutils \
--libdir=${HOME}/apps/my_lib \
--includedir=${HOME}/apps/my_include \
--enable-ld=yes --with-system-zlib \
--with-mpc=/apps/common/mpc/1.1.0 --with-mpfr=/apps/common/mpfr/4.0.1 \
--with-gmp=/apps/common/gmp/6.1.2 --enable-install-libiberty
$ make
$ make install
```

### **2. libunwind 설치**

\[설치과정]

```shell-session
$ tar xzvf libunwind-1.2.tar.gz
$ cd libunwind-1.2
$ ./configure --prefix=${HOME}/apps/libunwind \
--libdir=${HOME}/apps/my_lib \
--includedir=${HOME}/apps/my_include \
--enable-shared --enable-static
$ make
$ make install
```

### **3. mpiP 설치**

\[설치과정]

```shell-session
$ tar xzvf mpiP-3.4.1.tar.gz
$ cd mpiP-3.4.1
$ ./configure --prefix=${HOME}/apps/mpiP \
--libdir=${HOME}/apps/my_lib \
--includedir=${HOME}/apps/my_include \
LDFLAGS="-L/apps/compiler/gcc/7.2.0/openmpi/3.1.0/lib \
-L${HOME}/apps/my_lib" </p>
CPPFLAGS="-I/apps/compiler/gcc/7.2.0/openmpi/3.1.0/include \
-I${HOME}/apps/my_include"
$ vi mpiPi.h
----- 수정 사항은 아래의 내용 참고 -----
$ make
$ make install
```

\[vi mpiPi.h수정 사항]

```
<수정 전>
#ifndef _MPIPI_H
#define _MPIPI_H

<수정 후>
#ifndef _MPIPI_H
#define _MPIPI_H
#define PACKAGE 1
#define PACKAGE_VERSION 1
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-ksc.gitbook.io/blog/install/nurion/mpip-3.4.1-install.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
