- Minor fixes to code base to make it in ompi code style
- Ensure to always make the mpiCC sym link when we're on case-sensitive filesystems (fix Makefile.am logic) This commit was SVN r2174.
Этот коммит содержится в:
родитель
9b07ea2585
Коммит
bd7d7e3eb5
@ -122,6 +122,17 @@ endif
|
|||||||
# install-exec-hook if WANT_DEPRECATED_EXECUTABLE_NAMES is
|
# install-exec-hook if WANT_DEPRECATED_EXECUTABLE_NAMES is
|
||||||
# false.
|
# false.
|
||||||
else
|
else
|
||||||
|
if CASE_SENSITIVE_FS
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
|
(cd $(DESTDIR)$(bindir); rm -f mpiCC; ln -s mpic++ mpiCC)
|
||||||
|
else
|
||||||
|
install-exec-hook:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/mpiCC
|
||||||
|
endif
|
||||||
|
|
||||||
|
if CASE_SENSITIVE_FS
|
||||||
|
uninstall-local:
|
||||||
|
else
|
||||||
uninstall-local:
|
uninstall-local:
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
@ -88,12 +88,13 @@ ompi_wrap_parse_args(int argc, char* argv[], bool& want_flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (have_arg) {
|
if (have_arg) {
|
||||||
if ("compile" == str)
|
if ("compile" == str) {
|
||||||
showme_compile = true;
|
showme_compile = true;
|
||||||
else if ("link" == str)
|
} else if ("link" == str) {
|
||||||
showme_link = true;
|
showme_link = true;
|
||||||
else
|
} else {
|
||||||
showme_cmd = true;
|
showme_cmd = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if ("-c" == str) {
|
} else if ("-c" == str) {
|
||||||
fl_libs = false;
|
fl_libs = false;
|
||||||
@ -157,19 +158,21 @@ ompi_wrap_get_compiler(const ompi_sv_t& env_list, const string& default_comp,
|
|||||||
|
|
||||||
// If we didn't find any of the environment variables, use the default
|
// If we didn't find any of the environment variables, use the default
|
||||||
|
|
||||||
if (out.empty())
|
if (out.empty()) {
|
||||||
ompi_wrap_split(default_comp, ' ', out);
|
ompi_wrap_split(default_comp, ' ', out);
|
||||||
|
}
|
||||||
|
|
||||||
// If we're preprocessing, we need to know the basename of argv0
|
// If we're preprocessing, we need to know the basename of argv0
|
||||||
// (see below).
|
// (see below).
|
||||||
|
|
||||||
if (fl_cpp) {
|
if (fl_cpp) {
|
||||||
pos = out[0].find_last_of('/');
|
pos = out[0].find_last_of('/');
|
||||||
if (pos != string::npos)
|
if (pos != string::npos) {
|
||||||
// JMS There has to be a better way to do this
|
// JMS There has to be a better way to do this
|
||||||
compiler0 = out[0].substr(pos + 1);
|
compiler0 = out[0].substr(pos + 1);
|
||||||
else
|
} else {
|
||||||
compiler0 = out[0];
|
compiler0 = out[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ugh. If we're acting as the preprocessor, ditch any libtool
|
// Ugh. If we're acting as the preprocessor, ditch any libtool
|
||||||
@ -214,8 +217,9 @@ ompi_wrap_build_cflags(bool want_f77_includes, ompi_sv_t& cflags)
|
|||||||
// of what the prefix is, because the fortran compiler will not
|
// of what the prefix is, because the fortran compiler will not
|
||||||
// -I/usr/include automatically.
|
// -I/usr/include automatically.
|
||||||
|
|
||||||
if (want_f77_includes || "/usr/include" != incdir)
|
if (want_f77_includes || "/usr/include" != incdir) {
|
||||||
cflags.push_back("-I" + incdir);
|
cflags.push_back("-I" + incdir);
|
||||||
|
}
|
||||||
|
|
||||||
#if OMPI_WANT_CXX_BINDINGS
|
#if OMPI_WANT_CXX_BINDINGS
|
||||||
cflags.push_back("-I" + incdir + "/ompi");
|
cflags.push_back("-I" + incdir + "/ompi");
|
||||||
@ -281,8 +285,9 @@ ompi_wrap_build_ldflags(ompi_sv_t& ldflags)
|
|||||||
// If we don't want the libs, then we don't want ldflags, either.
|
// If we don't want the libs, then we don't want ldflags, either.
|
||||||
// Hence, return with ldflags empty.
|
// Hence, return with ldflags empty.
|
||||||
|
|
||||||
if (!fl_libs)
|
if (!fl_libs) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Add in the extra flags passed by configure. Do the same kinds of
|
// Add in the extra flags passed by configure. Do the same kinds of
|
||||||
// checks that we do below -- ensure that we don't add a "-L/usr" to
|
// checks that we do below -- ensure that we don't add a "-L/usr" to
|
||||||
@ -365,12 +370,13 @@ ompi_wrap_build_libs(bool want_cxx_libs, ompi_sv_t& libs)
|
|||||||
if (want_cxx_libs) {
|
if (want_cxx_libs) {
|
||||||
if (!ompi_wrap_check_file(libdir, "libmpi_cxx.a") &&
|
if (!ompi_wrap_check_file(libdir, "libmpi_cxx.a") &&
|
||||||
!ompi_wrap_check_file(libdir, "libmpi_cxx.so") &&
|
!ompi_wrap_check_file(libdir, "libmpi_cxx.so") &&
|
||||||
!ompi_wrap_check_file(libdir, "libmpi_cxx.dylib"))
|
!ompi_wrap_check_file(libdir, "libmpi_cxx.dylib")) {
|
||||||
cerr << "WARNING: " << cmd_name
|
cerr << "WARNING: " << cmd_name
|
||||||
<< " expected to find libmpi_cxx.* in " << libdir << endl
|
<< " expected to find libmpi_cxx.* in " << libdir << endl
|
||||||
<< "WARNING: MPI C++ support will be disabled" << endl;
|
<< "WARNING: MPI C++ support will be disabled" << endl;
|
||||||
else
|
} else {
|
||||||
libs.push_back("-lmpi_cxx");
|
libs.push_back("-lmpi_cxx");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -378,12 +384,13 @@ ompi_wrap_build_libs(bool want_cxx_libs, ompi_sv_t& libs)
|
|||||||
#if 0
|
#if 0
|
||||||
#if BUILD_MPI_F77
|
#if BUILD_MPI_F77
|
||||||
if (!ompi_wrap_check_file(libdir, "libompif77mpi.a") &&
|
if (!ompi_wrap_check_file(libdir, "libompif77mpi.a") &&
|
||||||
!ompi_wrap_check_file(libdir, "libompif77mpi.so"))
|
!ompi_wrap_check_file(libdir, "libompif77mpi.so")) {
|
||||||
cerr << "WARNING: " << cmd_name
|
cerr << "WARNING: " << cmd_name
|
||||||
<< " expected to find libompif77mpi.* in " << libdir << endl
|
<< " expected to find libompif77mpi.* in " << libdir << endl
|
||||||
<< "WARNING: MPI Fortran support will be disabled" << endl;
|
<< "WARNING: MPI Fortran support will be disabled" << endl;
|
||||||
else
|
} else {
|
||||||
libs.push_back("-lompif77mpi");
|
libs.push_back("-lompif77mpi");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -394,8 +401,9 @@ ompi_wrap_build_libs(bool want_cxx_libs, ompi_sv_t& libs)
|
|||||||
// Finally, any system libraries
|
// Finally, any system libraries
|
||||||
#if 0
|
#if 0
|
||||||
#if OMPI_WANT_ROMIO && HAVE_LIBAIO
|
#if OMPI_WANT_ROMIO && HAVE_LIBAIO
|
||||||
if (want_aio)
|
if (want_aio) {
|
||||||
libs.push_back("-laio");
|
libs.push_back("-laio");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
ompi_wrap_split_append_sv(WRAPPER_EXTRA_LIBS, libs);
|
ompi_wrap_split_append_sv(WRAPPER_EXTRA_LIBS, libs);
|
||||||
@ -416,8 +424,9 @@ ompi_wrap_build_libs(bool want_cxx_libs, ompi_sv_t& libs)
|
|||||||
void
|
void
|
||||||
ompi_wrap_build_extra_flags(const string& extra_string, ompi_sv_t& extra_flags)
|
ompi_wrap_build_extra_flags(const string& extra_string, ompi_sv_t& extra_flags)
|
||||||
{
|
{
|
||||||
if (!extra_string.empty())
|
if (!extra_string.empty()) {
|
||||||
ompi_wrap_split_append_sv(extra_string, extra_flags);
|
ompi_wrap_split_append_sv(extra_string, extra_flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -431,8 +440,9 @@ ompi_wrap_build_extra_flags(const string& extra_string, ompi_sv_t& extra_flags)
|
|||||||
void
|
void
|
||||||
ompi_wrap_print_sv(const ompi_sv_t& sv)
|
ompi_wrap_print_sv(const ompi_sv_t& sv)
|
||||||
{
|
{
|
||||||
for (int i = 0; (string::size_type) i < sv.size(); ++i)
|
for (int i = 0; (string::size_type) i < sv.size(); ++i) {
|
||||||
cout << sv[i] << " ";
|
cout << sv[i] << " ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -455,8 +465,9 @@ ompi_wrap_exec_sv(const ompi_sv_t& sv)
|
|||||||
|
|
||||||
// Build up a C array of the args
|
// Build up a C array of the args
|
||||||
|
|
||||||
for (i = 0; (string::size_type) i < sv.size(); ++i)
|
for (i = 0; (string::size_type) i < sv.size(); ++i) {
|
||||||
ompi_argv_append(&ac, &av, (char*) sv[i].c_str());
|
ompi_argv_append(&ac, &av, (char*) sv[i].c_str());
|
||||||
|
}
|
||||||
|
|
||||||
// There is no way to tell whether ompi_few returned non-zero because
|
// There is no way to tell whether ompi_few returned non-zero because
|
||||||
// the called app returned non-zero or if there was a failure in the
|
// the called app returned non-zero or if there was a failure in the
|
||||||
@ -472,8 +483,9 @@ ompi_wrap_exec_sv(const ompi_sv_t& sv)
|
|||||||
} else {
|
} else {
|
||||||
free(tmp);
|
free(tmp);
|
||||||
ret = ompi_few(av, &status);
|
ret = ompi_few(av, &status);
|
||||||
if (0 != ret && 0 != errno && fl_want_show_error)
|
if (0 != ret && 0 != errno && fl_want_show_error) {
|
||||||
perror(cmd_name.c_str());
|
perror(cmd_name.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Free the C array
|
// Free the C array
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user