Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I tell what the wrapper compiler default flags are?

compiler Default flags wrapper
0
Posted

How can I tell what the wrapper compiler default flags are?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123