---
title: 安装PNETCDF
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengnemo_02_0005.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengnemo_02_0005.html
indexId: bd8860be8d4e4db09cca556b1ac097fe03420fae32922a9a3dc1fb0c03d9653566
---
# 安装PNETCDF

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令安装PNETCDF。

```
tar -xvf parallel-netcdf-1.9.0.tar.bz2
cd parallel-netcdf-1.9.0
export MPICC=`which mpicc`
export MPICXX=`which mpicxx`
export MPIFC=`which mpifort`
./configure --prefix=
/path/to/PNETCDF
--build=aarch64-unknown-linux-gnu CFLAGS="-fPIC -DPIC" CXXFLAGS="-fPIC -DPIC" FCFLAGS="-fPIC" FFLAGS="-fPIC"
CC=$MPICC
CXX=$MPICXX
FC=$MPIFC
F77=$MPIFC
make -j 16
make install
```


3. 执行以下命令加载环境变量。

```
export PATH=
/path/to/PNETCDF
/bin:$PATH
export LD_LIBRARY_PATH=
/path/to/PNETCDF
/lib:$LD_LIBRARY_PATH
```
