2004-01-12 10:19:48 +03:00
|
|
|
//
|
2004-11-22 04:38:40 +03:00
|
|
|
// Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
// All rights reserved.
|
|
|
|
// Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
// All rights reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
// Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
// University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
// Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
// All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
// $COPYRIGHT$
|
|
|
|
//
|
|
|
|
// Additional copyrights may follow
|
|
|
|
//
|
2004-01-12 10:19:48 +03:00
|
|
|
// $HEADER$
|
|
|
|
//
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2005-07-04 06:38:44 +04:00
|
|
|
#include "opal/util/show_help.h"
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "tools/wrappers/ompi_wrap.h"
|
2004-01-12 10:19:48 +03:00
|
|
|
|
2004-08-13 23:13:01 +04:00
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
2004-01-12 10:19:48 +03:00
|
|
|
|
|
|
|
|
2004-09-25 23:31:17 +04:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
2004-01-12 10:19:48 +03:00
|
|
|
{
|
2004-09-25 23:31:17 +04:00
|
|
|
// The four wrapper compilers are extremely similar. So similar,
|
|
|
|
// in fact, that they can be parameterized on what is different.
|
|
|
|
// Hence, we call the "wrapper compiler engine" to do all the
|
|
|
|
// work, and pass in just a few arguments to customize for the
|
|
|
|
// language of this wrapper compiler.
|
2004-01-12 10:19:48 +03:00
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#if !OMPI_WANT_F90_BINDINGS
|
2005-07-04 06:38:44 +04:00
|
|
|
opal_show_help("help-wrapper.txt", "no-fortran-support", true,
|
2004-09-25 23:31:17 +04:00
|
|
|
90, "mpif90");
|
|
|
|
return 1;
|
2004-01-12 10:19:48 +03:00
|
|
|
#else
|
2004-09-25 23:31:17 +04:00
|
|
|
ompi_sv_t compiler;
|
|
|
|
ompi_sv_t fcppflags;
|
|
|
|
ompi_sv_t fcflags;
|
|
|
|
ompi_sv_t ldflags;
|
|
|
|
ompi_sv_t libs;
|
2005-04-13 15:54:36 +04:00
|
|
|
string wrapper_extra_fcflags;
|
2004-09-25 23:31:17 +04:00
|
|
|
|
|
|
|
compiler.clear();
|
|
|
|
compiler.push_back("OMPI_MPIF90");
|
|
|
|
|
|
|
|
fcppflags.clear();
|
|
|
|
fcppflags.push_back("OMPI_MPIF90_FCPPFLAGS");
|
|
|
|
fcppflags.push_back("OMPI_FCPPFLAGS");
|
|
|
|
|
|
|
|
fcflags.clear();
|
|
|
|
fcflags.push_back("OMPI_MPIF90_FCFLAGS");
|
|
|
|
fcflags.push_back("OMPI_FCFLAGS");
|
|
|
|
|
|
|
|
ldflags.clear();
|
|
|
|
ldflags.push_back("OMPI_MPIF90_LDFLAGS");
|
|
|
|
ldflags.push_back("OMPI_LDFLAGS");
|
2004-01-12 10:19:48 +03:00
|
|
|
|
2004-09-25 23:31:17 +04:00
|
|
|
libs.clear();
|
|
|
|
libs.push_back("OMPI_MPIF90_LIBS");
|
|
|
|
libs.push_back("OMPI_LIBS");
|
2004-01-12 10:19:48 +03:00
|
|
|
|
2005-04-13 15:54:36 +04:00
|
|
|
wrapper_extra_fcflags = OMPI_FC_MODULE_FLAG;
|
|
|
|
wrapper_extra_fcflags += " ";
|
|
|
|
wrapper_extra_fcflags += OMPI_LIBDIR;
|
|
|
|
wrapper_extra_fcflags += " ";
|
|
|
|
wrapper_extra_fcflags += WRAPPER_EXTRA_FCFLAGS;
|
|
|
|
|
2004-09-25 23:31:17 +04:00
|
|
|
return ompi_wrap_engine(argc, argv, compiler, fcflags, fcflags,
|
2005-04-13 15:54:36 +04:00
|
|
|
ldflags, libs, OMPI_F90, wrapper_extra_fcflags,
|
|
|
|
false, true, true);
|
2004-01-12 10:19:48 +03:00
|
|
|
#endif
|
|
|
|
}
|