Reputation: 403
I tried compiling MPI programs with mpicc
by passing -O1
-O2
-O3
etc optimization flags. I would like to know whether optimization flags really work with mpicc
and also wether mpicc
supports all the optimization flags of gcc
compiler.
Upvotes: 2
Views: 3181
Reputation: 74465
mpicc
, mpic++
, mpif90
, mpif77
, etc. are all just wrappers around the actual system compiler. Any option that the wrapper does not recognise as its own gets passed to the actual compiler. You can see what is being invoked behind the scenes by calling mpicc
with the -showme
option:
$ mpicc -showme
gcc ... <lots of options> ...
Upvotes: 4
Reputation: 15951
absolutely. All flags passed to mpicc
, mpic++
and the likes are passed to the "original" compiler.
Upvotes: 1