
-> Added new targets in Makefile.am to call a new build script generate-opt-funcs.pl to generate specialized functions for each *.pm file. -> Added new perl module *.pm files for send,isend,irecv,iprobe,improbe which are loaded by generate-opt-funcs.pl to create new source files that correspond to the name of the .pm file to be used as part of MTL OFI. -> Added mtl_ofi_opt.pm.template and updated README with details on the specialization features and how to add additional specialization support. -> Added new opt_common/mtl_ofi_opt_common.pm containing common functions for generating the specialized functions used by all other *.pm modules. -> Added new mtl_ofi.h which includes the definitions for the function symbol table for storing the specialized functions along with the definitions for the initialization functions for the corresponding function pointers. -> Based off the OFI provider capabilities the specialized function pointers are assigned at mtl_ofi_component_init to the corresponding MTL OFI function. -> mca_mtl_ofi_module_t has been updated with the symbol table struct which is assigned at component init. Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
63 строки
1.4 KiB
Perl
63 строки
1.4 KiB
Perl
#!/usr/bin/env perl
|
|
#
|
|
# Copyright (c) 2013-2018 Intel, Inc. All rights reserved
|
|
#
|
|
# $COPYRIGHT$
|
|
#
|
|
# Additional copyrights may follow
|
|
#
|
|
# $HEADER$
|
|
#
|
|
|
|
use strict;
|
|
use warnings;
|
|
use mtl_ofi_send_opt;
|
|
use mtl_ofi_isend_opt;
|
|
use mtl_ofi_irecv_opt;
|
|
use mtl_ofi_iprobe_opt;
|
|
use mtl_ofi_improbe_opt;
|
|
use opt_common::mtl_ofi_opt_common;
|
|
|
|
my $MTL_OFI_HEADER =
|
|
'/*
|
|
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved
|
|
*
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "mtl_ofi.h"';
|
|
|
|
my $specialization_file = $ARGV[0];
|
|
my $specialization_type = $specialization_file;
|
|
$specialization_type =~ s{\.[^.]+$}{};
|
|
my $sym_table_type = $specialization_type;
|
|
$sym_table_type =~ s/_opt//g;
|
|
|
|
open my $gen_file, ">", $specialization_file;
|
|
|
|
#
|
|
# Generate the Specialized functions & symbol table for the specified file.
|
|
#
|
|
print $gen_file "$MTL_OFI_HEADER\n\n";
|
|
|
|
my $GEN_FUNC = $specialization_type . "::gen_funcs\(\$gen_file, \"FUNC\"\)";
|
|
my $GEN_SYM = $specialization_type . "::gen_funcs\(\$gen_file, \"SYM\"\)";
|
|
my $SYM_TABLE = "ompi_" . $sym_table_type . "_symtable";
|
|
|
|
eval $GEN_FUNC;
|
|
|
|
my $SYM_FUNC_HEADER = opt_common::mtl_ofi_opt_common::gen_sym_function_header($SYM_TABLE);
|
|
print $gen_file "$SYM_FUNC_HEADER\n";
|
|
|
|
eval $GEN_SYM;
|
|
|
|
my $SYM_FUNC_FOOTER = opt_common::mtl_ofi_opt_common::gen_sym_function_footer();
|
|
print $gen_file "$SYM_FUNC_FOOTER\n\n";
|
|
close($gen_file);
|
|
exit(0);
|
|
###
|