網站首頁 編程語言 正文
fatal error: mpi.h: No such file or directory // fatal error: mkl.h: No such file or directory
作者:小果果WRT 更新時間: 2022-02-23 編程語言在非root用戶的目錄下安裝了Intel mkl的庫,也安裝了mpich/openmpi 但是編譯程序時都出現fatal error: mpi.h: No such file or directory // fatal error: mkl.h: No such file or directory錯誤
運行指令:mpicc -o cannon cannon.c
1>更改程序中的#include "mpi.h" 為 include <mpi.h> 未解決
運行 mpicc -o cannon cannon.c -I/home/wangruting/software2/mpich-3.3.2/include -L/home/wangruting/software2/mpich-3.3.2/lib
解決了fatal error
運行 mpirun -np 4 ./cannon
2>添加環境變量到~/.bashrc文件中
export PATH=$PATH:/home/wangruting/intel/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_LIB:/home/wangruting/intel/lib/intel64:/home/wangruting/intel/mkl/lib/intel64
編譯時加 -I/home/wangruting/intel/mkl/include 表示優先在此路徑尋找頭文件
加-L/home/wangruting/intel/mkl/lib/intel64 -L/home/wangruting/intel/lib/intel64 表示優先在此路徑尋找庫文件
運行命令: gcc example.c -o example -I/home/wangruting/intel/mkl/inculde -L/home/wangruting/intel/mkl/lib/intel64 -lm -dl -lpthread -liomp5 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core(未解決)
原文鏈接:https://blog.csdn.net/weixin_44542349/article/details/107640184
相關推薦
- 2022-03-12 使用VMware虛擬機安裝Linux(CentOS7鏡像)_Linux
- 2022-06-21 Oracle新增和刪除用戶_oracle
- 2022-04-17 將本地jar放到pom中被maven管理
- 2022-07-12 Linux創建定時執行任務
- 2022-04-30 python的正則表達式和re模塊詳解_python
- 2022-06-19 WPF實現流光動畫特效_實用技巧
- 2022-07-29 Linux磁盤管理方法介紹_linux shell
- 2022-08-03 GoFrame?glist?基礎使用和自定義遍歷_Golang
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支