📄 buildiface
字号:
'Unpublish_name' => '0', 'Is_finalized' => '1;bool', 'Query_thread' => '1', 'Is_thread_main' => '1;bool', 'Add_error_class' => 1, 'Add_error_code' => 2, 'Add_error_string' => '0:2', );%class_mpi2comm = ( 'Barrier' => 0, 'Get_attr' => 'int', 'Set_attr' => 0, 'Delete_attr' => 0,# 'Create_keyval' => 'int', 'Free_keyval' => 'static:0:1', 'Call_errhandler' => 0, 'Set_name' => '0:2', 'Get_name' => '0:3', 'Disconnect' => 0, 'Get_parent' => 'static:0;Intercomm', );%class_mpi2cart = ();%class_mpi2dtype = ( 'Set_name' => '0:2', 'Get_name' => '0:3', 'Dup' => 'MPI_Datatype', 'Get_extent' => '0', 'Create_hvector' => 'MPI_Datatype', 'Create_hindexed' => 'MPI_Datatype', 'Get_extent' => '0', 'Create_resized' => 'MPI_Datatype', # FIXME Check not just resized 'Get_true_extent' => 0, 'Create_subarray' => 'MPI_Datatype', 'Create_darray' => 'MPI_Datatype', 'Get_attr' => 'int', 'Set_attr' => 0, 'Delete_attr' => 0,# 'Create_keyval' => 'int', 'Free_keyval' => 'static:0:1',);%class_mpi2errh = ( );%class_mpi2graph = ();%class_mpi2group = ();%class_mpi2inter = ( #'Barrier' => 0, # MPI-2 adds intercomm collective #'Bcast' => 0, # These are moved into the Comm class #'Gather' => 0, #'Gatherv' => 0, #'Scatter' => 0, #'Scatterv' => 0, #'Allgather' => 0, #'Allgatherv' => 0, #'Alltoall' => 0, #'Alltoallv' => 0, #'Reduce' => 0, #'Allreduce' => 0, #'Reduce_scatter' => 0, #'Scan' => 0, #'Exscan' => 0,);#$specialReturnType{"inter-Split"} = "Intercomm";# Alltoallw uses an array of datatypes, which requires special handling# Spawn and spawn mulitple uses arrays of character strings, which# also require special handling%class_mpi2intra = ( #'Alltoallw' => 0, 'Exscan' => 0,# 'Spawn' => 'MPI_Comm',# 'Spawn_multiple' => 'MPI_Comm', 'Accept' => 'MPI_Comm', 'Connect' => 'MPI_Comm', );%class_mpi2op = ();%class_mpi2preq = ();%class_mpi2req = ();# Start requires C++ to C function interposers (like errhandlers)%class_mpi2greq = ( 'Complete' => 0, # 'Start' => 'MPI_Request', );%class_mpi2st = ();%class_mpi2file = ( );if ($build_io) { %class_mpi2file = ( 'Open' => 'static:MPI_File:2', 'Close' => 0, 'Delete' => 'static:0:1', 'Set_size' => 0, 'Preallocate' => 0, 'Get_size' => 'MPI_Offset', 'Get_group' => 'MPI_Group', 'Get_amode' => 'int', 'Set_info' => 0, 'Get_info' => 'MPI_Info', 'Set_view' => '0:4', 'Get_view' => 0, 'Read_at' => 0, 'Read_at_all' => 0, 'Write_at' => '0:3', 'Write_at_all' => '0:3', 'Iread_at' => 'MPI_Request', 'Iwrite_at' => 'MPI_Request:2', 'Read' => 0, 'Read_all' => 0, 'Write' => '0:2', 'Write_all' => '0:2', 'Iread' => 'MPI_Request', 'Iwrite' => 'MPI_Request:2', 'Seek' => 0, 'Get_position' => 'MPI_Offset', 'Get_byte_offset' => 'MPI_Offset', 'Read_shared' => 0, 'Write_shared' => '0:2', 'Iread_shared' => 'MPI_Request', 'Iwrite_shared' => 'MPI_Request:2', 'Read_ordered' => 0, 'Write_ordered' => '0:2', 'Seek_shared' => 0, 'Get_position_shared' => 'MPI_Offset', 'Read_at_all_begin' => 0, 'Read_at_all_end' => 0, 'Write_at_all_begin' => '0:3', 'Write_at_all_end' => '0:2', 'Read_all_begin' => 0, 'Read_all_end' => 0, 'Write_all_begin' => '0:2', 'Write_all_end' => '0:2', 'Read_ordered_begin' => 0, 'Read_ordered_end' => 0, 'Write_ordered_begin' => '0:2', 'Write_ordered_end' => '0:2', 'Get_type_extent' => 'MPI_Aint', 'Set_atomicity' => '0:2', 'Get_atomicity' => 'int;bool', 'Sync' => 0, 'Get_errhandler' => 'MPI_Errhandler', 'Set_errhandler' => 0, 'Call_errhandler' => 0, ); # %class_mpi2file = ( # 'File_open' => 'static:MPI_File:2',# 'File_close' => 0,# 'File_delete' => 'static:0:1',# 'File_set_size' => 0,# 'File_preallocate' => 0,# 'File_get_size' => 'MPI_Offset',# 'File_get_group' => 'MPI_Group',# 'File_get_amode' => 'int',# 'File_set_info' => 0,# 'File_get_info' => 'MPI_Info',# 'File_set_view' => '0:4',# 'File_get_view' => 0,# 'File_read_at' => 0,# 'File_read_at_all' => 0,# 'File_write_at' => '0:2',# 'File_write_at_all' => '0:2',# 'File_iread_at' => 'MPI_Request', # 'File_iwrite_at' => 'MPI_Request:1',# 'File_read' => 0,# 'File_read_all' => 0,# 'File_write' => '0:1',# 'File_write_all' => '0:1',# 'File_iread' => 'MPI_Request',# 'File_iwrite' => 'MPI_Request:1',# 'File_seek' => 0,# 'File_get_position' => 'MPI_Offset',# 'File_get_byte_offset' => 'MPI_Offset',# 'File_read_shared' => 0,# 'File_write_shared' => 0,# 'File_iread_shared' => 'MPI_Request',# 'File_iwrite_shared' => 'MPI_Request:1',# 'File_read_ordered' => 0,# 'File_write_ordered' => '0:1',# 'File_seek_shared' => 0,# 'File_get_position_shared' => 'MPI_Offset',# 'File_read_at_all_begin' => 0,# 'File_read_at_all_end' => 0,# 'File_write_at_all_begin' => '0:2',# 'File_write_at_all_end' => '0:1',# 'File_read_all_begin' => 0,# 'File_read_all_end' => 0,# 'File_write_all_begin' => '0:1',# 'File_write_all_end' => '0:1',# 'File_read_ordered_begin' => 0,# 'File_read_ordered_end' => 0,# 'File_write_ordered_begin' => '0:1',# 'File_write_ordered_end' => '0:1',# 'File_get_type_extent' => 'MPI_Aint',# 'File_set_atomicity' => '0:1',# 'File_get_atomicity' => 'bool',# 'File_sync' => 0,# 'File_set_errhandler' => 'MPI_Errhandler',# 'File_get_errhandler' => 0,# ); }%class_mpi2win = ( 'Put' => '0:1', 'Get' => '0', 'Accumulate' => '0', 'Create' => 'static:MPI_Win', 'Free' => '0', 'Fence' => '0', 'Get_group' => 'MPI_Group', 'Call_errhandler' => 0, 'Get_attr' => '0', 'Start' => '0', 'Complete' => '0', 'Post' => '0', 'Wait' => '0', 'Test' => 'int;bool', 'Lock' => '0', 'Unlock' => '0', 'Set_name' => '0:2', 'Get_name' => '0:3', 'Get_attr' => 'int', 'Set_attr' => 0, 'Delete_attr' => 0, 'Free_keyval' => 'static:0:1', );%class_mpi2info = ( 'Create' => 'static:1', 'Set' => '0:2:3', 'Delete' => '0:2', 'Get' => '5;bool:2', 'Get_valuelen' => '4;bool:2', 'Get_nkeys' => '2', 'Get_nthkey' => '0', 'Dup' => '2', 'Free' => '0', );# Name of classes, in the order in which they must be declared. This# includes all classes, by their short names@classes = ( 'except', 'dtype', 'info', 'st', 'group', 'op', 'errh', 'req', 'preq', 'comm', 'null', 'inter', 'intra', 'greq', 'win', 'file', 'graph', 'cart', );## Some classes have additional methods. This hash on the classes (by # short name) gives the name of a routine that will add additional methods.# Primarily used for the Status methods (get/set_tag etc) and for # Communicator clone methods.%class_extra_fnc = ( 'st' => 'Status_methods', 'except' => 'Exception_methods', 'comm' => 'Comm_methods', 'null' => 'Nullcomm_methods', 'inter' => 'Intercomm_methods', 'intra' => 'Intracomm_methods', 'graph' => 'Graphcomm_methods', 'cart' => 'Cartcomm_methods', 'dtype' => 'Datatype_methods', 'op' => 'Op_methods', 'file' => 'File_methods', 'win' => 'Win_methods', 'greq' => 'Grequest_methods', );# ----------------------------------------------------------------------------# If there is a specific list of routines, replace the list with this# list%newclasses = ();if ($routine_list ne "") { for $routine (split(/\s+/,$routine_list)) { print "$routine\n" if $gDebug; ($class,$rname) = split(/-/,$routine); # Look up name in the class list $classvar = "class-mpi1$class"; $result_type = 0; if (defined($$classvar{$rname})) { $result_type = $$classvar{$rname}; } else { $classvar = "class-mpi2$class"; if (defined($$classvar{$rname})) { $result_type = $$classvar{$rname}; } } $newclasses{$class} .= " $rname=>$result_type"; } # Now, clear all of the classes foreach $class (@classes) { $class_name = "class_mpi1$class"; %$class_name = (); $class_name = "class_mpi2$class"; %$class_name = (); } # And unpack newclasses foreach $class (keys(%newclasses)) { $class_name = "class_mpi1$class"; foreach $rpair (split(/\s+/,$newclasses{$class})) { if ($rpair eq "") { next; } print "$rpair\n" if $gDebug; ($routine, $rval) = split(/=>/,$rpair); $$class_name{$routine} = $rval; } } # At this point, we should generate only the routines requested, # plus all of the classes (we may need the empty classes for the # predefined types)}# ----------------------------------------------------------------------------# MPI objects# dtypes gives all of the MPI datatypes whose C version are this name# with MPI_ in front. E.g., MPI::CHAR is the same as MPI_CHAR.# The size-specific types were added in MPI-2, and are required for# C and C++ as well as for Fortran@dtypes = ( 'CHAR', 'UNSIGNED_CHAR', 'BYTE', 'SHORT', 'UNSIGNED_SHORT', 'INT', 'UNSIGNED', 'LONG', 'UNSIGNED_LONG', 'FLOAT', 'DOUBLE', 'LONG_DOUBLE', 'LONG_LONG_INT', 'LONG_LONG', 'PACKED', 'LB', 'UB', 'FLOAT_INT', 'DOUBLE_INT', 'LONG_INT', 'SHORT_INT', 'LONG_DOUBLE_INT', 'REAL4', 'REAL8', 'REAL16', 'COMPLEX8', 'COMPLEX16', 'COMPLEX32', 'INTEGER1', 'INTEGER2', 'INTEGER4', 'INTEGER8', 'INTEGER16', 'WCHAR', 'SIGNED_CHAR', 'UNSIGNED_LONG_LONG' );## Still missing: C++ only types: BOOL, COMPLEX, DOUBLE_COMPLEX, # LONG_DOUBLE_COMPLEX. # ops is like dtypes@ops = ( 'MAX', 'MIN', 'SUM', 'PROD', 'LAND', 'BAND', 'LOR', 'BOR', 'LXOR', 'BXOR', 'MINLOC', 'MAXLOC', 'REPLACE' );# errclasses is like dtypes. Contains both MPI-1 and MPI-2 classes@errclasses = ( 'SUCCESS', 'ERR_BUFFER', 'ERR_COUNT', 'ERR_TYPE', 'ERR_TAG', 'ERR_COMM', 'ERR_RANK', 'ERR_REQUEST', 'ERR_ROOT', 'ERR_GROUP', 'ERR_OP', 'ERR_TOPOLOGY', 'ERR_DIMS', 'ERR_ARG', 'ERR_UNKNOWN', 'ERR_TRUNCATE', 'ERR_OTHER', 'ERR_INTERN', 'ERR_PENDING', 'ERR_IN_STATUS', 'ERR_LASTCODE', 'ERR_FILE', 'ERR_ACCESS', 'ERR_AMODE', 'ERR_BAD_FILE', 'ERR_FILE_EXISTS', 'ERR_FILE_IN_USE', 'ERR_NO_SPACE', 'ERR_NO_SUCH_FILE', 'ERR_IO', 'ERR_READ_ONLY', 'ERR_CONVERSION', 'ERR_DUP_DATAREP', 'ERR_UNSUPPORTED_DATAREP', 'ERR_INFO', 'ERR_INFO_KEY', 'ERR_INFO_VALUE', 'ERR_INFO_NOKEY', 'ERR_NAME', 'ERR_NO_MEM', 'ERR_NOT_SAME', 'ERR_PORT', 'ERR_QUOTA', 'ERR_SERVICE', 'ERR_SPAWN', 'ERR_UNSUPPORTED_OPERATION', 'ERR_WIN', 'ERR_BASE', 'ERR_LOCKTYPE', 'ERR_KEYVAL', 'ERR_RMA_CONFLICT', 'ERR_RMA_SYNC', 'ERR_SIZE', 'ERR_DISP', 'ERR_ASSERT', );## Special routines require special processing in C++%special_routines = ( 'Init' => 1, 'Init_thread' => 1, 'Pcontrol' => '1' );## Most routines can be processed automatically. However, some# require some special processing. (See the Fortran version# of buildiface)$arg_string = join( ' ', @ARGV );# ---------------------------------------------------------------------------# Here begins more executable code. Read the definitions of the # routines. The argument list for routine xxx is placed into the hash# mpi_routine{xxx}.&ReadInterface( "../../include/mpi.h.in" );# Special case: Add Pcontrol$mpi_routine{'Pcontrol'} = "int,...";# if doing MPI2, we also need to read the MPI-2 protottypesif ( -s "../../mpi/romio/include/mpio.h.in" ) { &ReadInterface( "../../mpi/romio/include/mpio.h.in" );}# Class_type gives the C datatype for each class, except for the# exception class, which has no C counterpart%class_type = ( 'comm' => MPI_Comm, 'cart' => MPI_Comm, 'dtype' => MPI_Datatype, 'errh' => MPI_Errhandler, 'null' => MPI_Comm, 'graph' => MPI_Comm, 'group' => MPI_Group, 'inter' => MPI_Comm, 'intra' => MPI_Comm, 'op' => MPI_Op, 'preq' => MPI_Request, 'req' => MPI_Request, 'greq' => MPI_Request,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -