How can I tell what the wrapper compiler default flags are?
If the corresponding environment variables are not set, the wrappers will add -I$includedir and -I$includedir/openmpi (which usually map to $prefix/include and $prefix/include/openmpi, respectively) to the xFLAGS area, and add -L$libdir (which usually maps to $prefix/lib) to the xLDFLAGS area. To obtain the values of the other flags, there are two main methods: • Use the –showme option to any wrapper compiler. For example (lines broken here for readability): shell$ mpicc prog.c -o prog –showme gcc -I/path/to/openmpi/include -I/path/to/openmpi/include/openmpi/ompi \ prog.c -o prog -L/path/to/openmpi/lib -lmpi \ -lopen-rte -lopen-pal -lutil -lnsl -ldl -Wl,–export-dynamic -lm This shows a coarse-grained method for getting the entire command line, but does not tell you what each set of flags are (xFLAGS, xCPPFLAGS, xLDFLAGS, and xLIBS). • Use the ompi_info command. For example: shell$ ompi_info –all | grep wrapper Wrapper extra CFLAGS: Wrapper extra CXXFLAGS: Wrapper extra FFLAGS: Wrap