Grant George's wish and display a bunch of compilation flags
This commit was SVN r1358.
Этот коммит содержится в:
родитель
c537586ffb
Коммит
a0472f7f5a
@ -14,7 +14,15 @@ AM_CPPFLAGS = \
|
||||
-DOMPI_SYSCONFDIR="\"$(sysconfdir)\"" \
|
||||
-DOMPI_CONFIGURE_USER="\"@OMPI_CONFIGURE_USER@\"" \
|
||||
-DOMPI_CONFIGURE_HOST="\"@OMPI_CONFIGURE_HOST@\"" \
|
||||
-DOMPI_CONFIGURE_DATE="\"@OMPI_CONFIGURE_DATE@\""
|
||||
-DOMPI_CONFIGURE_DATE="\"@OMPI_CONFIGURE_DATE@\"" \
|
||||
-DOMPI_BUILD_CFLAGS="\"@CFLAGS@\"" \
|
||||
-DOMPI_BUILD_CPPFLAGS="\"@CPPFLAGS@\"" \
|
||||
-DOMPI_BUILD_CXXFLAGS="\"@CXXFLAGS@\"" \
|
||||
-DOMPI_BUILD_CXXCPPFLAGS="\"@CXXCPPFLAGS@\"" \
|
||||
-DOMPI_BUILD_FFLAGS="\"@FFLAGS@\"" \
|
||||
-DOMPI_BUILD_FCFLAGS="\"@FCFLAGS@\"" \
|
||||
-DOMPI_BUILD_LDFLAGS="\"@LDFLAGS@\"" \
|
||||
-DOMPI_BUILD_LIBS="\"@LIBS@\""
|
||||
|
||||
libs = $(top_builddir)/src/libmpi.la
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
//
|
||||
// $HEADER$
|
||||
//
|
||||
/** @file **/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
@ -28,14 +27,19 @@ static int screen_width = 78;
|
||||
// Prints the passed strings in a pretty or parsable format.
|
||||
//
|
||||
void ompi_info::out(const string& pretty_message, const string &plain_message,
|
||||
const string& value)
|
||||
const string& value)
|
||||
{
|
||||
if (pretty) {
|
||||
string::size_type pos, max_value_width;
|
||||
string spaces(OMPI_max(centerpoint - pretty_message.length(), 0), ' ');
|
||||
string spaces;
|
||||
string v = value;
|
||||
string filler;
|
||||
|
||||
int num_spaces = centerpoint - pretty_message.length();
|
||||
if (num_spaces > 0) {
|
||||
spaces = string(num_spaces, ' ');
|
||||
}
|
||||
|
||||
max_value_width = screen_width - spaces.length() -
|
||||
pretty_message.length() - 2;
|
||||
filler = spaces + pretty_message + ": ";
|
||||
@ -88,7 +92,7 @@ void ompi_info::out(const string& pretty_message, const string &plain_message,
|
||||
// Prints the passed integer in a pretty or parsable format.
|
||||
//
|
||||
void ompi_info::out(const string& pretty_message, const string &plain_message,
|
||||
int value)
|
||||
int value)
|
||||
{
|
||||
if (ompi_info::pretty) {
|
||||
string spaces(OMPI_max(centerpoint - pretty_message.length(), 0), ' ');
|
||||
|
@ -244,7 +244,7 @@ void ompi_info::do_arch(ompi_cmd_line_t *cmd_line)
|
||||
gethostname(hostname, MAXHOSTNAMELEN);
|
||||
prefix = hostname + string(":");
|
||||
}
|
||||
out("Architecture", prefix + "arch", OMPI_ARCH);
|
||||
out("Configured architecture", prefix + "config:arch", OMPI_ARCH);
|
||||
}
|
||||
|
||||
|
||||
@ -313,29 +313,54 @@ void ompi_info::do_config(bool want_all)
|
||||
out("Fortran90 compiler", "compiler:f90:command", OMPI_F90);
|
||||
|
||||
if (want_all) {
|
||||
|
||||
// Will always have the size of Fortran integer
|
||||
|
||||
out("Fort integer size", "compiler:fortran:sizeof:integer",
|
||||
OMPI_SIZEOF_FORTRAN_INT);
|
||||
out("Fort real size", "compiler:fortran:sizeof:real",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
out("Fort dbl prec size",
|
||||
"compiler:fortran:sizeof:double_precision", OMPI_SIZEOF_FORTRAN_REAL);
|
||||
out("Fort cplx size", "compiler:fortran:sizeof:complex",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
out("Fort dbl cplx size",
|
||||
"compiler:fortran:sizeof:double_complex",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
|
||||
out("Fort integer align", "compiler:fortran:align:integer",
|
||||
OMPI_ALIGNMENT_FORTRAN_INT);
|
||||
out("Fort real align", "compiler:fortran:align:real",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
out("Fort dbl prec align",
|
||||
"compiler:fortran:align:double_precision", OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
out("Fort cplx align", "compiler:fortran:align:complex",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
out("Fort dbl cplx align",
|
||||
"compiler:fortran:align:double_complex",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
// May or may not have the other Fortran sizes
|
||||
|
||||
if (OMPI_WANT_F77_BINDINGS || OMPI_WANT_F90_BINDINGS) {
|
||||
out("Fort real size", "compiler:fortran:sizeof:real",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
out("Fort dbl prec size",
|
||||
"compiler:fortran:sizeof:double_precision",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
out("Fort cplx size", "compiler:fortran:sizeof:complex",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
out("Fort dbl cplx size",
|
||||
"compiler:fortran:sizeof:double_complex",
|
||||
OMPI_SIZEOF_FORTRAN_REAL);
|
||||
|
||||
out("Fort integer align", "compiler:fortran:align:integer",
|
||||
OMPI_ALIGNMENT_FORTRAN_INT);
|
||||
out("Fort real align", "compiler:fortran:align:real",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
out("Fort dbl prec align",
|
||||
"compiler:fortran:align:double_precision",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
out("Fort cplx align", "compiler:fortran:align:complex",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
out("Fort dbl cplx align",
|
||||
"compiler:fortran:align:double_complex",
|
||||
OMPI_ALIGNMENT_FORTRAN_REAL);
|
||||
} else {
|
||||
out("Fort real size", "compiler:fortran:sizeof:real", "skipped");
|
||||
out("Fort dbl prec size",
|
||||
"compiler:fortran:sizeof:double_precision", "skipped");
|
||||
out("Fort cplx size", "compiler:fortran:sizeof:complex", "skipped");
|
||||
out("Fort dbl cplx size",
|
||||
"compiler:fortran:sizeof:double_complex", "skipped");
|
||||
|
||||
out("Fort integer align", "compiler:fortran:align:integer", "skipped");
|
||||
out("Fort real align", "compiler:fortran:align:real", "skipped");
|
||||
out("Fort dbl prec align",
|
||||
"compiler:fortran:align:double_precision","skipped");
|
||||
out("Fort cplx align", "compiler:fortran:align:complex", "skipped");
|
||||
out("Fort dbl cplx align",
|
||||
"compiler:fortran:align:double_complex", "skipped");
|
||||
}
|
||||
}
|
||||
|
||||
out("C profiling", "option:profiling:c", cprofiling);
|
||||
@ -347,6 +372,33 @@ void ompi_info::do_config(bool want_all)
|
||||
out("POSIX thread support", "option:pthreads", pthreads);
|
||||
out("Solaris thread support", "option:solaris_threads", sthreads);
|
||||
|
||||
if (want_all) {
|
||||
|
||||
// Don't display the build CPPFLAGS or CXXCPPFLAGS because they're
|
||||
// just -I$(top_srcdir)/include, etc. Hence, they're a) boring,
|
||||
// and c) specific for ompi_info.
|
||||
|
||||
out("Build CFLAGS", "option:build:cflags", OMPI_BUILD_CFLAGS);
|
||||
out("Build CXXFLAGS", "option:build:cxxflags", OMPI_BUILD_CXXFLAGS);
|
||||
out("Build FFLAGS", "option:build:fflags", OMPI_BUILD_FFLAGS);
|
||||
out("Build FCFLAGS", "option:build:fcflags", OMPI_BUILD_FCFLAGS);
|
||||
out("Build LDFLAGS", "option:build:ldflags", OMPI_BUILD_LDFLAGS);
|
||||
out("Build LIBS", "option:build:libs", OMPI_BUILD_LIBS);
|
||||
|
||||
out("Wrapper extra CFLAGS", "option:wrapper:extra_cflags",
|
||||
WRAPPER_EXTRA_CFLAGS);
|
||||
out("Wrapper extra CXXFLAGS", "option:wrapper:extra_cxxflags",
|
||||
WRAPPER_EXTRA_CXXFLAGS);
|
||||
out("Wrapper extra FFLAGS", "option:wrapper:extra_fflags",
|
||||
WRAPPER_EXTRA_FFLAGS);
|
||||
out("Wrapper extra FCFLAGS", "option:wrapper:extra_fcflags",
|
||||
WRAPPER_EXTRA_FCFLAGS);
|
||||
out("Wrapper extra LDFLAGS", "option:wrapper:extra_ldflags",
|
||||
WRAPPER_EXTRA_LDFLAGS);
|
||||
out("Wrapper extra LIBS", "option:wrapper:extra_libs",
|
||||
WRAPPER_EXTRA_LIBS);
|
||||
}
|
||||
|
||||
out("Debug support", "option:debug", debug);
|
||||
out("MPI parameter check", "option:mpi-param-check", paramcheck);
|
||||
out("Memory profiling support", "option:mem-profile", memprofile);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user