c - OMPTrace:仅适用于 C/C++?或者是否也可以将它用于 Fortran?
问题描述
我正在尝试使用OMPTrace
它是一种用于跟踪和可视化 OpenMP 程序执行的工具,如此处所示https://github.com/passlab/omptrace。我已经在一个简单的代码上测试了这个库C
,它工作得很好(这个库很好地安装在/home/hakim/llvm-openmp/BUILD/omptrace/build/libomptrace.so
)。我现在想知道它是否也适用于用Fortran
. 我创建了一个makefile,如下所示:
OMP_INSTALL=/home/hakim/llvm-openmp-install
OMP_LIB_PATH=${OMP_INSTALL}/lib
OMPTRACE_LIB=/home/hakim/llvm-openmp/BUILD/omptrace/build/libomptrace.so
default:runhecese
heceseclang: hecese_OpenMP.f90
clang -g -fopenmp hecese_OpenMP.f90 -o heceseclang
objdump -d heceseclang >heceseclang.objdump
runhecese: heceseclang
LD_PRELOAD=${OMP_LIB_PATH}/libomp.so:${OMPTRACE_LIB} ./heceseclang
clean:
rm heceselang heceseclang.objdump core
执行它时,我得到:
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o: in function `__tasks_MOD_ww0':
hecese_OpenMP.f90:(.text+0x1dc6): undefined reference to `pow'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x1df7): undefined reference to `pow'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x1e1c): undefined reference to `pow'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x1e37): undefined reference to `pow'
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o: in function `__tasks_MOD_w':
hecese_OpenMP.f90:(.text+0x1ed0): undefined reference to `pow'
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o:hecese_OpenMP.f90:(.text+0x1eeb): more undefined references to `pow' follow
/usr/bin/ld: /tmp/hecese_OpenMP-67d132.o: in function `MAIN__':
hecese_OpenMP.f90:(.text+0x36f1): undefined reference to `_gfortran_st_open'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x372c): undefined reference to `_gfortran_st_read'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x373b): undefined reference to `_gfortran_st_read_done'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x3776): undefined reference to `_gfortran_st_read'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x3794): undefined reference to `_gfortran_transfer_integer'
/usr/bin/ld: hecese_OpenMP.f90:(.text+0x37a3): undefined reference to `_gfortran_st_read_done'
我没有向您展示所有错误,因为以下错误与我已经展示过的相同。这都是关于undefined references
. 我想知道它是否来自clang
编译器。
我应该安装flang
编译器并使用它而不是那个clang
吗?我等待的结果是一个.graphml
文件。
请问有什么帮助吗?
解决方案
推荐阅读
- javascript - 用于计算特定日期或时间剩余小时数的 Javascript 函数
- google-cloud-platform - 使用调度程序 GCP 自动启动/停止实例 VM
- android - Admob 插页式广告未在点击按钮 android 上显示
- python-3.x - 在列表列表中搜索 --- 获取每个列表的答案 --- 只想要一个答案
- c - 如何从C中的函数返回字符数组
- r - 如何在数据框中进行一次模糊匹配和一次精确匹配?
- mysql - SQL:按组排名,无需汇总或加入
- python - 如何根据数据点排列直线
- java - 为什么从子类调用超类方法时我的值为 null?
- python - 将 PySpark 数据框的列与标量相乘