简体   繁体   中英

Why I need to use mpicc

I am on Arch Linux. Before I was using msmpi on Windows and I did not need to provide any specific compiler, only usual library, include flags. It seems like openmpi is the only available implementation on Arch Linux, isn't it? And what is the reason that I need to use a special (even it is just a wrapper around gcc as I understand) mpicc compiler for this purposes? I am just always suspicious about using some wrappers (tricks around typical ways of doing) that is why I would like to know is there a way to rid of mpicc and use openmpi implementation without this wrapper.

First, Open MPI is not the only implementation available on Linux. You can also use MPICH, Intel MPI, etc.

Second, for any MPI implementation, you don't have to use the compiler wrappers, it just makes it simpler to compile your code if you do so. You are welcome to unroll the wrappers and put all the appropriate stuff on the command line yourself if you like. There's various ways to do it depending on your implementation.

For MPICH, you can use mpichversion , which will show you how MPICH was compiled, as well as any flags that are used when calling mpicc .

UPDATE : I should have pointed this out originally. It's highly recommended to just use the wrappers. From time to time, the implementations will change what those wrappers do in ways that might cause everything to break for you if you don't use them. So unless you have a very good reason not to do so, using them is much safer. If you don't trust them, just check in on them from time to time. All the code is open source.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM