---
title: 编译Geant4并行模块时报错
description: "编译Geant4并行模块时报错，报错信息为：“G4MPImanager.hh:117:9: error: ‘MPI’ does not name a type; did you mean ‘M_PI’?”。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0087.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/trouble/bootkit_hpc_troublecase_0087.html
indexId: e73b264ef6db99c1782ba8ed021b40f493a6d51964155c34d178006b13c08c5b74
---
# 编译Geant4并行模块时报错

#### 问题现象描述

编译Geant4并行模块时报错，报错信息为：“G4MPImanager.hh:117:9: error: ‘MPI’ does not name a type; did you mean ‘M_PI’?”。


#### 关键过程、根本原因分析

OpenMPI 4.0.1默认没有打开g++绑定。


#### 结论、解决方案及效果

重新编译OpenMPI 4.0.1并在配置OpenMPI时加入--enable-mpi-cxx参数，详细操作请参见《鲲鹏BoostKit HPC使能套件-安装指南（开源组件）(https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/instg-osc/kunpenghpcenv_03_0013.html)》中“基础环境搭建指南 > 集群场景环境搭建 > OpenMPI安装”。
