mpiCC

Compiles and links MPI programs written in C++//编译链接MPI C++源程序

Description

This command can be used to compile and link MPI programs written in C++. It provides the options and any special libraries that are needed to compile and link MPI programs.//它提供了选项和有用的库来编译链接MPI程序

It is important to use this command (or a Makefile processed with mpireconfig) particularly when linking programs, as it provides the necessary libraries. It can also simplify the use of the MPE profiling libraries, through the use of the -mpilog-mpitrace,
and -mpianim commands.

mpiCC cannot be used to compile C programs. Use mpicc for C programs.

Command line arguments

  -mpilog Build version that generate MPE log files 
  -mpitrace Build version that generates traces 
  -mpianim Build version that generates real-time animation 
  -show Show the commands that would be used without runnning them 
  -help Give short help 
  -echo Show exactly what this program is doing. This option should normally not be used. 
  others are passed to the compiler or linker. For example, -c causes files to be compiled, -g selects compilation with debugging on most systems, and -o name causes linking with the output executable given the name name

Environment Variables

The environment variables MPICH_CCC and MPICH_CCLINKER may be used to select different C++ compiler and linker. Note that since MPICH is built with a particular C++ and C compiler, change the compilers used can cause problems. Use this only
if you could intermix code compiled with the different compilers.

Examples

To compile a single file foo.c, use

   mpicc -c foo.c

To link the output and make an executable, use

   mpicc -o foo foo.o

Combining compilation and linking in a single command

   mpicc -o foo foo.c

is a convenient way to build simple programs.

See Also

mpif77, mpireconfig

Location:/home/MPI/mansrc/commands

mpicc


mpicc(1)                           LAM TOOLS                          mpicc(1)

NAME

       mpicc, mpiCC / mpic++ - Compile LAM/MPI C/C++ programs.

SYNTAX

       mpicc [-showme|-showme:compile|-showme:link] ...

       mpiCC [-showme|-showme:compile|-showme:link] ...

       mpic++ [-showme|-showme:compile|-showme:link] ...

OPTIONS

       -showme
Does not invoke the underlying C/C++ compiler.Instead,it shows the command line that would be  executed  to  compile  the C/C++ program.
       -showme:compile 
Does  not  invoke  the  underlying  C/C++ compiler.  Instead, it shows the compiler flags that would be  supplied  to  the  C/C++ compiler.
       -showme:link 
Does  not  invoke  the  underlying  C/C++ compiler.  Instead, it shows the linker flags that would be supplied to the C/C++  compiler.
       See  cc(1)  and CC(1) (or whatever your underlying C/C++ compilers are)for all other options.

DESCRIPTION

       mpicc and mpiCC (mpic++ is a synonym for mpiCC provided  for  filenames that  do not support case-sensitive filenames) are convenience wrappers for the local native C and C++ compilers.Translation of a LAM program requires the linkage of the LAM specific libraries which may not reside in one of the standard search directories  of  ld(1). It also often requires the inclusion of header files what may also not be found in a standard location.  mpicc passes its arguments to the  local  native  C compiler along with the -I, -L and -l options required by LAM programs.
This includes all necessary options for ROMIO and/or C++ bindings support (if ROMIO/C++ support was included when LAM was compiled).
mpiCC (and therefore mpic++) is similar, but invokes the native C++
compiler instead. The LAM Team strongly encourages using mpicc and mpiCC instead of
attempting to link to the LAM libraries manually. This allows the spe-
cific implementation of LAM to change without forcing changes to linker
directives in users’ Makefiles (the specific set of underlying LAM
libraries has already changed multiple times, and will likely change
again in future versions). Indeed, since mpicc/mpiCC are very thin wrappers on top of an underly-
ing compiler, there are very, very few compelling reasons not to use
mpicc/mpiCC. When it is not possible to use mpicc/mpiCC, the
-showme:compile and -showme:link arguments should be used instead. For
example: shell$ cc -c file1.c ‘mpicc -showme:compile‘ shell$ cc -c file2.c ‘mpicc -showme:compile‘ shell$ cc file1.o file2.o ‘mpicc -showme:link‘ -o my_mpi_program

ENVIRONMENT VARIABLES

       By  default,  mpicc  uses the C compiler that was selected when LAM was
configured (with the --with-cc flag to ./configure, or by setting the
environment variable CC before ./configure was invoked) as the local
native C compiler, but this can be overridden by the LAMMPICC environ-
ment variable (an older name for this environment variable is LAMHCC --
this also still works, but its use is deprecated). Likewise, mpiCC uses the C++ compiler that was selected when LAM was
configured (with the --with-cpp flag to ./configure, or by setting the
environment variable CXX before invoking ./configure) by default, but
this can be overridden by the LAMMPICXX environment variable (an older
name for this environment variable is LAMHCP -- this also still works,
but its use is deprecated). If the environment variable LAMHOME is set, mpicc and mpiCC will use
its value as the location of the LAM installation directory instead of
the value that was compiled into mpicc/mpiCC. This means that
mpicc/mpiCC will use the value of LAMHOME as the base to create the -I
and -L arguments that are passed to the lower-level compiler, not the
installation directory that was supplied when mpicc/mpiCC were created.
This is almost always a Bad Idea. The use of LAMHOME is discouraged except for some rare configuration
cases in oddly networked sites (in which case your system administrator
should probably set this up), and for advanced users with multiple
LAM/MPI installations who really know what they are doing; if the
LAMHOME environment variable is unintentionally left set, it can lead
to tremendous user confusion. For example, if LAMHOME points to LAM
installation A, but the user’s PATH points to LAM installation B, then
even though B’s mpicc will be used, the user program will be compiled
and linked against LAM installation A. The LAMHOME environment variable is mainly only left in place for back-
wards compatibility; it is not required for normal functioning of
LAM/MPI. The LAM Team discourages the use of the LAMHOME environment
variable, and instead advocates simply setting the PATH properly to
switch between multiple LAM/MPI implementations.

NOTES

       Previous  versions  of LAM encouraged the use of hcc and hcp to compile
LAM and/or MPI C and C++ applications, respectively. In very old ver-
sions of LAM, hcc and hcp did not automatically add -lmpi to the com-
mand line. hcc and hcp were eventually deprecated and replaced with
mpicc and mpiCC (or mpic++ on case-insensitive filesystems). The exe-
cutables hcc and hcp are now simply symbolic links to mpicc and mpic++,
respectively, just in case there’s anyone out there that still uses
those names. It should be harmless to pass in the additional -lmpi;
mpicc and mpic++ should silently do the Right Thing (only link in the
MPI library once).

SEE ALSO

       cc(1), CC(1), ld(1), lam-helpfile(5), mpif77(1)

LAM 7.1.1                       September, 2004                       mpicc(1)

mpiCC与mpicc命令详解的更多相关文章

  1. Git初探--笔记整理和Git命令详解

    几个重要的概念 首先先明确几个概念: WorkPlace : 工作区 Index: 暂存区 Repository: 本地仓库/版本库 Remote: 远程仓库 当在Remote(如Github)上面c ...

  2. linux yum命令详解

    yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...

  3. Linux下ps命令详解 Linux下ps命令的详细使用方法

    http://www.jb51.net/LINUXjishu/56578.html Linux下的ps命令比较常用 Linux下ps命令详解Linux上进程有5种状态:1. 运行(正在运行或在运行队列 ...

  4. Docker命令详解

    Docker命令详解   最近学习Docker,将docker所有命令实验了一番,特整理如下: # docker --help Usage: docker [OPTIONS] COMMAND [arg ...

  5. linux awk命令详解

    linux awk命令详解 简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分 ...

  6. android adb 命令详解

    ADB (Android Debug Bridge)  是android SDK中的工具,需要先配置环境变量才能使用.起调试桥的作用,可以管理安卓设备.(也叫debug工具) ---------查看设 ...

  7. Git 常用命令详解

    Git 是一个很强大的分布式版本管理工具,它不但适用于管理大型开源软件的源代码(如:linux kernel),管理私人的文档和源代码也有很多优势(如:wsi-lgame-pro) Git 的更多介绍 ...

  8. Top 命令详解

    Top 命令详解 先感受一下top命令的执行结果吧!哈哈-- top - 17:32:34 up 3 days, 8:04, 5 users, load average: 0.09, 0.12, 0. ...

  9. Ruby Gem命令详解

    转自:http://www.jianshu.com/p/728184da1699 Gem介绍: Gem是一个管理Ruby库和程序的标准包,它通过Ruby Gem(如 http://rubygems.o ...

  10. DOS命令详解

    DOS命令详解 命令 \? 可以进入命令帮助 1.md命令创建目录. MKDIR [drive:]pathMD [drive:]path 如果命令扩展被启用,MKDIR 会如下改变: 如果需要,MKD ...

随机推荐

  1. Nacos源码—9.Nacos升级gRPC分析四

    大纲 10.gRPC客户端初始化分析 11.gRPC客户端的心跳机制(健康检查) 12.gRPC服务端如何处理客户端的建立连接请求 13.gRPC服务端如何映射各种请求与对应的Handler处理类 1 ...

  2. 高性能NoSQL

    极客时间:<从 0 开始学架构>:高性能NoSQL 1.引言 关系型数据库凭借着SQL功能和ACID的属性,活跃于各种各样的系统中,但它并不是完美的,其存在以下缺点: 关系数据库存储的是行 ...

  3. FastAPI与MongoDB Change Stream的实时数据交响曲

    title: FastAPI与MongoDB Change Stream的实时数据交响曲 date: 2025/05/25 13:04:40 updated: 2025/05/25 13:04:40 ...

  4. 第8讲、Multi-Head Attention 的核心机制与实现细节

    为什么要有 Multi-Head Attention? 单个 Attention 机制虽然可以捕捉句子中不同词之间的关系,但它只能关注一种角度或模式. Multi-Head 的作用是: 多个头 = 多 ...

  5. 「Log」做题记录 2024.1.1-2024.1.28

    \(2024.1.1-2024.1.7\) \(\color{blueviolet}{P1501}\) LCT 板子,链加链乘查询链和,断边加边. \(\color{black}{P4332}\) L ...

  6. qt激光加工软件开发——介绍

    20年毕业后,先是从事qt+c++开发,而后从事mfc开发,今年步入新的公司,着手开发一版新的激光设备加工软件 激光加工软件所具备的功能: 轴的控制:主要包括XYZ三个轴,品牌:ACS.固高.Gali ...

  7. ChatGPT搅动AI芯片的“一池春水”

    这是IC男奋斗史的第37篇原创 本文1520字,预计阅读4分钟. ChatGPT是什么以及它的发展历程,相信各位老铁们都已经很清楚,杰哥便不再赘述.大家都知道,杰哥是做AI芯片的,ChatGPT与杰哥 ...

  8. MySQL 07 行锁功过:怎么减少行锁对性能的影响?

    行锁是针对数据表中行记录的锁,是在引擎层由引擎实现的. 从两阶段锁说起 在InnoDB事务中,行锁是在需要的时候才加上的,但并不是不需要了就立即释放,而是等到事务结束时才释放,这就是两阶段锁协议. 知 ...

  9. 扩展若依@Excel注解,使其对字段的控制是否导出更加便捷

    基于若依框架实现按角色控制 Excel 字段导出功能 一.背景介绍 在我们的项目开发中,采用了若依(RuoYi)的 Java Spring 框架进行系统搭建.若依框架提供了 @Excel 注解,通过在 ...

  10. Hive与Clickhouse对比

    个人理解,欢迎指正 对比指标 Hive Clickhouse 元数据管理 元数据存MySQL,通过HiveMetaStore管理 每个Shard自己管理 数据存储 HDFS 本地磁盘 架构设计 MR架 ...