mpicc在编译时没有警告 [英] mpicc with no warning when compiling

查看:145
本文介绍了mpicc在编译时没有警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道使用什么标志,以避免在使用mpicc编译C / C ++并行时出现警告消息。更具体地说,我不想让我的消息屏幕引用未使用的变量,例如。警告:未使用的变量

I would like to know what flag to use in order to avoid warning messages that appear when compiling a C/C++ parallel using mpicc. More specifically, I prefer not to have my screen of messages referring to unused variables,e.g. warning: unused variable

感谢

推荐答案

Mark, mpicc 只是一个真正的编译器工具链的包装器。有一个几乎标准的选项(几乎)所有包装器理解: -showme 。它显示了什么标志传递给编译器,例如:

As pointed by High Performance Mark, mpicc is simply a wrapper around the real compiler toolchain. There is an almost standard option that (almost) all wrappers understand: -showme. It shows you what flags exactly get passed on to the compiler, e.g.:

$ mpicc -showme
icc <lots of preprocessor flags> -fexceptions -pthread \
    <lots of linker flags> -lmpi -losmcomp -lrdmacm -libverbs -lrt \
    -lnsl -lutil -lpsm_infinipath -lbat -llsf -ldl -lm -lnuma

检查这些选项,请查看您的编译器手册,了解如何抑制警告。

Examine these options, consult your compiler's manual and find out how to suppress the warnings.

这篇关于mpicc在编译时没有警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆