From 3b728660c8e26db05ed9cec25d1b66d8a9e92278 Mon Sep 17 00:00:00 2001 From: Clement FONTENAILLE Date: Wed, 27 Sep 2023 16:42:33 +0200 Subject: [PATCH 1/3] WIP : adding mapper/converter for combiner for MPI_Type_get_envelope --- generator/C/functions.json | 2 +- generator/C/mappers.json | 14 + generator/FORTRAN/functions.json | 4 +- generator/FORTRAN/mappers_f.json | 7 + src/common/mappers.h | 1685 +++++++++++++++--------------- 5 files changed, 892 insertions(+), 820 deletions(-) diff --git a/generator/C/functions.json b/generator/C/functions.json index 5b57f1b..9a7a00c 100755 --- a/generator/C/functions.json +++ b/generator/C/functions.json @@ -6823,7 +6823,7 @@ "var": "combiner", "arg_dep": "", "In": 0, - "name": "int_ptr_mapper", + "name": "combiner_ptr_mapper", "Out": 1 } ], diff --git a/generator/C/mappers.json b/generator/C/mappers.json index 283f99a..26311ee 100644 --- a/generator/C/mappers.json +++ b/generator/C/mappers.json @@ -641,6 +641,20 @@ "r2a": "dest_conv_r2a", "debug_type":"%*d" }, + "combiner_converter":{ + "local_alloc" : 0, + "a2r": "dest_conv_a2r", + "type": "int", + "r2a": "dest_conv_r2a", + "debug_type":"%d" + }, + "combiner_ptr_converter":{ + "local_alloc" : 1, + "a2r": "dest_conv_a2r", + "type": "int *", + "r2a": "dest_conv_r2a", + "debug_type":"%*d" + }, "datarep_conversion_re_ptr_converter": { "local_alloc": 0, "a2r": "datarep_conversion_ptr_conv_a2r", diff --git a/generator/FORTRAN/functions.json b/generator/FORTRAN/functions.json index 41dce15..a577fd6 100644 --- a/generator/FORTRAN/functions.json +++ b/generator/FORTRAN/functions.json @@ -1246,7 +1246,7 @@ "var": "dest", "arg_dep": "", "Out": 0, - "name": "rank_mapper", + "name": "dest_converter", "In": 1 }, { @@ -6659,7 +6659,7 @@ "var": "combiner", "arg_dep": "", "In": 0, - "name": "int_ptr_mapper", + "name": "combiner_mapper", "Out": 1 } ], diff --git a/generator/FORTRAN/mappers_f.json b/generator/FORTRAN/mappers_f.json index d98b0d7..e64509c 100644 --- a/generator/FORTRAN/mappers_f.json +++ b/generator/FORTRAN/mappers_f.json @@ -429,6 +429,13 @@ "type": "int ", "r2a": "dest_r2a" ,"debug_type":"%*d" +}, + "combiner_converter": { + "local_alloc": 0, + "a2r": "combiner_a2r", + "type": "int ", + "r2a": "combiner_r2a" + ,"debug_type":"%*d" }, "datarep_conversion_ptr_converter": { "local_alloc": 0, diff --git a/src/common/mappers.h b/src/common/mappers.h index deefc8b..184ced1 100644 --- a/src/common/mappers.h +++ b/src/common/mappers.h @@ -139,17 +139,17 @@ extern char ompi_message_no_proc[]; // Rajouter un ifdef #ifdef INTEL_INTEL - #include "run_mpio.h" // mpi.h from intel implementation doesn't contain MPI-IO routines. - #include "app_mpio.h" // mpi.h from intel implementation doesn't contain MPI-IO routines. +#include "run_mpio.h" // mpi.h from intel implementation doesn't contain MPI-IO routines. +#include "app_mpio.h" // mpi.h from intel implementation doesn't contain MPI-IO routines. #elif INTEL_OMPI - #include "app_mpio.h" +#include "app_mpio.h" #elif defined(OMPI_INTEL) || defined(_INTEL) - #include "run_mpio.h" +#include "run_mpio.h" #endif #include "engine.h" #include "engine_fn.h" - + /*ADIOS CONST*/ //#include "adio_extern.h" // header which contain the value of ADIO_same_amode @@ -163,616 +163,667 @@ extern char ompi_message_no_proc[]; #define const #define gen_hash_conv(NAME,TYPE,NAME2) \ -static inline void NAME##_conv_a2r(A_##TYPE *ca,R_##TYPE *cr)\ + static inline void NAME##_conv_a2r(A_##TYPE *ca,R_##TYPE *cr)\ {\ -NAME2##_translation_get(*ca,cr);\ + NAME2##_translation_get(*ca,cr);\ }\ static inline void NAME##_conv_r2a(A_##TYPE *ca,R_##TYPE *cr)\ {\ -NAME2##_translation_update(ca,*cr);\ + NAME2##_translation_update(ca,*cr);\ }\ static inline void NAME##_conv_r2a_static(A_##TYPE *ca,R_##TYPE *cr)\ {\ -NAME2##_translation_get_key_from_value(*cr,ca);\ + NAME2##_translation_get_key_from_value(*cr,ca);\ }\ static inline void NAME##_conv_r2a_uninitialized(A_##TYPE *ca,R_##TYPE *cr)\ {\ -NAME2##_translation_update_alloc(ca,*cr);\ + NAME2##_translation_update_alloc(ca,*cr);\ } #define case_R_A(name) \ - case R_MPI_##name: \ - return A_MPI_##name + case R_MPI_##name: \ + return A_MPI_##name #define case_A_R(name) \ - case A_MPI_##name: \ - return R_MPI_##name + case A_MPI_##name: \ + return R_MPI_##name static inline void my_keyval_a2r(int *keyval,int *keyval_tmp) { switch(*keyval) -{ - case A_MPI_TAG_UB: *keyval_tmp=R_MPI_TAG_UB ;break; - case A_MPI_HOST: *keyval_tmp=R_MPI_HOST ;break; - case A_MPI_IO: *keyval_tmp=R_MPI_IO ;break; - case A_MPI_WTIME_IS_GLOBAL: *keyval_tmp=R_MPI_WTIME_IS_GLOBAL;break; - case A_MPI_APPNUM: *keyval_tmp=R_MPI_APPNUM ;break; - case A_MPI_LASTUSEDCODE: *keyval_tmp=R_MPI_LASTUSEDCODE ;break; - case A_MPI_UNIVERSE_SIZE: *keyval_tmp=R_MPI_UNIVERSE_SIZE ;break; - case A_MPI_WIN_BASE: *keyval_tmp=R_MPI_WIN_BASE ;break; - case A_MPI_WIN_SIZE: *keyval_tmp=R_MPI_WIN_SIZE ;break; - case A_MPI_WIN_DISP_UNIT: *keyval_tmp=R_MPI_WIN_DISP_UNIT ;break; - case A_MPI_WIN_CREATE_FLAVOR: *keyval_tmp=R_MPI_WIN_CREATE_FLAVOR ;break; - case A_MPI_WIN_MODEL: *keyval_tmp=R_MPI_WIN_MODEL ;break; - - - default: /*We may want to check the keyval hash table*/ - *keyval_tmp=*keyval; -}} + { + case A_MPI_TAG_UB: *keyval_tmp=R_MPI_TAG_UB ;break; + case A_MPI_HOST: *keyval_tmp=R_MPI_HOST ;break; + case A_MPI_IO: *keyval_tmp=R_MPI_IO ;break; + case A_MPI_WTIME_IS_GLOBAL: *keyval_tmp=R_MPI_WTIME_IS_GLOBAL;break; + case A_MPI_APPNUM: *keyval_tmp=R_MPI_APPNUM ;break; + case A_MPI_LASTUSEDCODE: *keyval_tmp=R_MPI_LASTUSEDCODE ;break; + case A_MPI_UNIVERSE_SIZE: *keyval_tmp=R_MPI_UNIVERSE_SIZE ;break; + case A_MPI_WIN_BASE: *keyval_tmp=R_MPI_WIN_BASE ;break; + case A_MPI_WIN_SIZE: *keyval_tmp=R_MPI_WIN_SIZE ;break; + case A_MPI_WIN_DISP_UNIT: *keyval_tmp=R_MPI_WIN_DISP_UNIT ;break; + case A_MPI_WIN_CREATE_FLAVOR: *keyval_tmp=R_MPI_WIN_CREATE_FLAVOR ;break; + case A_MPI_WIN_MODEL: *keyval_tmp=R_MPI_WIN_MODEL ;break; + + + default: /*We may want to check the keyval hash table*/ + *keyval_tmp=*keyval; + }} static inline void my_keyval_r2a(int *keyval,int *keyval_tmp) { switch(*keyval_tmp) -{ - case R_MPI_TAG_UB : *keyval=A_MPI_TAG_UB ;break; - case R_MPI_HOST : *keyval=A_MPI_HOST ;break; - case R_MPI_IO : *keyval=A_MPI_IO ;break; - case R_MPI_WTIME_IS_GLOBAL: *keyval=A_MPI_WTIME_IS_GLOBAL;break; - case R_MPI_APPNUM : *keyval=A_MPI_APPNUM ;break; - case R_MPI_LASTUSEDCODE : *keyval=A_MPI_LASTUSEDCODE ;break; - case R_MPI_UNIVERSE_SIZE : *keyval=A_MPI_UNIVERSE_SIZE ;break; + { + case R_MPI_TAG_UB : *keyval=A_MPI_TAG_UB ;break; + case R_MPI_HOST : *keyval=A_MPI_HOST ;break; + case R_MPI_IO : *keyval=A_MPI_IO ;break; + case R_MPI_WTIME_IS_GLOBAL: *keyval=A_MPI_WTIME_IS_GLOBAL;break; + case R_MPI_APPNUM : *keyval=A_MPI_APPNUM ;break; + case R_MPI_LASTUSEDCODE : *keyval=A_MPI_LASTUSEDCODE ;break; + case R_MPI_UNIVERSE_SIZE : *keyval=A_MPI_UNIVERSE_SIZE ;break; #if !defined(_MPC) && !defined(OMPI_MPC) && !defined(INTEL_MPC) && !defined(MPC_MPC) -/* MPC-3.2.0 defines those variables at the same value than others above */ - case R_MPI_WIN_BASE : *keyval=A_MPI_WIN_BASE ;break; - case R_MPI_WIN_SIZE : *keyval=A_MPI_WIN_SIZE ;break; - case R_MPI_WIN_DISP_UNIT : *keyval=A_MPI_WIN_DISP_UNIT ;break; - case R_MPI_WIN_CREATE_FLAVOR: *keyval_tmp=A_MPI_WIN_CREATE_FLAVOR ;break; - case R_MPI_WIN_MODEL: *keyval_tmp=A_MPI_WIN_MODEL ;break; + /* MPC-3.2.0 defines those variables at the same value than others above */ + case R_MPI_WIN_BASE : *keyval=A_MPI_WIN_BASE ;break; + case R_MPI_WIN_SIZE : *keyval=A_MPI_WIN_SIZE ;break; + case R_MPI_WIN_DISP_UNIT : *keyval=A_MPI_WIN_DISP_UNIT ;break; + case R_MPI_WIN_CREATE_FLAVOR: *keyval_tmp=A_MPI_WIN_CREATE_FLAVOR ;break; + case R_MPI_WIN_MODEL: *keyval_tmp=A_MPI_WIN_MODEL ;break; #endif - default: /*We may want to check the keyval hash table*/ - *keyval=*keyval_tmp; -}} + default: /*We may want to check the keyval hash table*/ + *keyval=*keyval_tmp; + }} //int in_w=0; //__thread int in_w=0; static inline void const_buffer_conv_a2r(void** buf,void** buf_tmp) { - if(*buf == (void*) A_MPI_IN_PLACE) - *buf_tmp= (void*) R_MPI_IN_PLACE; - - else if( *buf == (void*) A_MPI_BOTTOM ) - *buf_tmp= (void*) R_MPI_BOTTOM; - else - //memcpy(buf_tmp, buf, sizeof(void*)); - *buf_tmp=*buf; + if(*buf == (void*) A_MPI_IN_PLACE) + *buf_tmp= (void*) R_MPI_IN_PLACE; + + else if( *buf == (void*) A_MPI_BOTTOM ) + *buf_tmp= (void*) R_MPI_BOTTOM; + else + //memcpy(buf_tmp, buf, sizeof(void*)); + *buf_tmp=*buf; } static inline void buffer_conv_a2r(void** buf,void** buf_tmp) { - if(*buf == (void*) A_MPI_IN_PLACE) - *buf_tmp= (void*) R_MPI_IN_PLACE; - - else if( *buf == (void*) A_MPI_BOTTOM ) - *buf_tmp= (void*) R_MPI_BOTTOM; - else - //memcpy(buf_tmp, buf, sizeof(void*)); - *buf_tmp=*buf; + if(*buf == (void*) A_MPI_IN_PLACE) + *buf_tmp= (void*) R_MPI_IN_PLACE; + + else if( *buf == (void*) A_MPI_BOTTOM ) + *buf_tmp= (void*) R_MPI_BOTTOM; + else + //memcpy(buf_tmp, buf, sizeof(void*)); + *buf_tmp=*buf; } static inline void buffer_conv_r2a(void **buf_tmp, void **buf) { - if(*buf == (void*) R_MPI_IN_PLACE) - *buf= (void*) A_MPI_IN_PLACE; - - else if( *buf == (void*) R_MPI_BOTTOM ) - *buf= (void*) A_MPI_BOTTOM; - - else - //memcpy(buf_tmp, buf, sizeof(void*)); - *buf=*buf_tmp; - + if(*buf == (void*) R_MPI_IN_PLACE) + *buf= (void*) A_MPI_IN_PLACE; + + else if( *buf == (void*) R_MPI_BOTTOM ) + *buf= (void*) A_MPI_BOTTOM; + + else + //memcpy(buf_tmp, buf, sizeof(void*)); + *buf=*buf_tmp; + } /* Mappers Comm a2r - r2a */ gen_hash_conv(comm,MPI_Comm,communicator) -/* Mappers Datatype a2r - r2a */ + /* Mappers Datatype a2r - r2a */ gen_hash_conv(datatype,MPI_Datatype,datatype) -/* Mappers Tag a2r - r2a*/ + /* Mappers Tag a2r - r2a*/ static inline void tag_conv_a2r(int* tag,int* tag_tmp) { - switch (*tag) - { - case A_MPI_ANY_TAG: - *tag_tmp=R_MPI_ANY_TAG; - break; + switch (*tag) + { + case A_MPI_ANY_TAG: + *tag_tmp=R_MPI_ANY_TAG; + break; #if R_MPI_ANY_TAG != A_MPI_ANY_TAG - case R_MPI_ANY_TAG: - *tag_tmp=A_MPI_ANY_TAG; - break; + case R_MPI_ANY_TAG: + *tag_tmp=A_MPI_ANY_TAG; + break; #endif - default: - *tag_tmp=*tag; - break; - } + default: + *tag_tmp=*tag; + break; + } } static inline void tag_conv_r2a(int* tag,int* tag_tmp) { - switch (*tag_tmp) - { - case R_MPI_ANY_TAG: - *tag=A_MPI_ANY_TAG; - break; - #if R_MPI_ANY_TAG != A_MPI_ANY_TAG - case A_MPI_ANY_TAG: - *tag=R_MPI_ANY_TAG; - break; + switch (*tag_tmp) + { + case R_MPI_ANY_TAG: + *tag=A_MPI_ANY_TAG; + break; +#if R_MPI_ANY_TAG != A_MPI_ANY_TAG + case A_MPI_ANY_TAG: + *tag=R_MPI_ANY_TAG; + break; #endif - default: - *tag=*tag_tmp; - break; - } + default: + *tag=*tag_tmp; + break; + } } /* Mappers Error a2r -r2a */ static inline int error_code_conv_r2a(int ret_tmp) { - switch (ret_tmp) - { - /* Utils && pt2pt bloquant-non bloquant */ - case_R_A(SUCCESS); - case_R_A(ERR_OTHER); - case_R_A(ERR_COMM); - case_R_A(ERR_ARG); - case_R_A(ERR_TYPE); - case_R_A(ERR_COUNT); - case_R_A(ERR_TAG); - case_R_A(ERR_RANK); - case_R_A(ERR_INTERN); /*MPICH*/ - case_R_A(ERR_REQUEST); - case_R_A(ERR_IN_STATUS); - case_R_A(ERR_TRUNCATE); - case_R_A(ERR_BUFFER); - case_R_A(ERR_ROOT); - case_R_A(ERR_OP); - case_R_A(ERR_GROUP); - case_R_A(ERR_TOPOLOGY); - case_R_A(ERR_DIMS); - case_R_A(ERR_UNKNOWN); - case_R_A(ERR_PENDING); - case_R_A(ERR_ASSERT); - case_R_A(ERR_BASE); - case_R_A(ERR_DISP); - case_R_A(ERR_INFO_KEY); - case_R_A(ERR_INFO_NOKEY); - case_R_A(ERR_INFO_VALUE); - case_R_A(ERR_INFO); - case_R_A(ERR_KEYVAL); - case_R_A(ERR_LOCKTYPE); - case_R_A(ERR_NAME); - case_R_A(ERR_NO_MEM); - case_R_A(ERR_PORT); - case_R_A(ERR_RMA_CONFLICT); - case_R_A(ERR_RMA_SYNC); - case_R_A(ERR_SERVICE); - case_R_A(ERR_SIZE); - case_R_A(ERR_SPAWN); - case_R_A(ERR_WIN); - //case_R_A(ERR_LASTCODE); - case_A_R(ERR_RMA_RANGE); - case_A_R(ERR_RMA_ATTACH); - case_A_R(ERR_RMA_SHARED); - case_R_A(ERR_RMA_FLAVOR); - - default: - return ret_tmp; - } + switch (ret_tmp) + { + /* Utils && pt2pt bloquant-non bloquant */ + case_R_A(SUCCESS); + case_R_A(ERR_OTHER); + case_R_A(ERR_COMM); + case_R_A(ERR_ARG); + case_R_A(ERR_TYPE); + case_R_A(ERR_COUNT); + case_R_A(ERR_TAG); + case_R_A(ERR_RANK); + case_R_A(ERR_INTERN); /*MPICH*/ + case_R_A(ERR_REQUEST); + case_R_A(ERR_IN_STATUS); + case_R_A(ERR_TRUNCATE); + case_R_A(ERR_BUFFER); + case_R_A(ERR_ROOT); + case_R_A(ERR_OP); + case_R_A(ERR_GROUP); + case_R_A(ERR_TOPOLOGY); + case_R_A(ERR_DIMS); + case_R_A(ERR_UNKNOWN); + case_R_A(ERR_PENDING); + case_R_A(ERR_ASSERT); + case_R_A(ERR_BASE); + case_R_A(ERR_DISP); + case_R_A(ERR_INFO_KEY); + case_R_A(ERR_INFO_NOKEY); + case_R_A(ERR_INFO_VALUE); + case_R_A(ERR_INFO); + case_R_A(ERR_KEYVAL); + case_R_A(ERR_LOCKTYPE); + case_R_A(ERR_NAME); + case_R_A(ERR_NO_MEM); + case_R_A(ERR_PORT); + case_R_A(ERR_RMA_CONFLICT); + case_R_A(ERR_RMA_SYNC); + case_R_A(ERR_SERVICE); + case_R_A(ERR_SIZE); + case_R_A(ERR_SPAWN); + case_R_A(ERR_WIN); + //case_R_A(ERR_LASTCODE); + case_A_R(ERR_RMA_RANGE); + case_A_R(ERR_RMA_ATTACH); + case_A_R(ERR_RMA_SHARED); + case_R_A(ERR_RMA_FLAVOR); + + default: + return ret_tmp; + } } static inline int error_code_conv_a2r(int ret_tmp) { - switch (ret_tmp) - { - case_A_R(SUCCESS); - case_A_R(ERR_OTHER); - case_A_R(ERR_COMM); - case_A_R(ERR_ARG); - case_A_R(ERR_TYPE); - case_A_R(ERR_COUNT); - case_A_R(ERR_TAG); - case_A_R(ERR_RANK); - case_A_R(ERR_INTERN); /*MPICH*/ - case_A_R(ERR_REQUEST); - case_A_R(ERR_IN_STATUS); - case_A_R(ERR_TRUNCATE); - case_A_R(ERR_BUFFER); - case_A_R(ERR_ROOT); - case_A_R(ERR_OP); - case_A_R(ERR_GROUP); - case_A_R(ERR_TOPOLOGY); - case_A_R(ERR_DIMS); - case_A_R(ERR_UNKNOWN); - case_A_R(ERR_PENDING); - case_A_R(ERR_ASSERT); - case_A_R(ERR_BASE); - case_A_R(ERR_DISP); - case_A_R(ERR_INFO_KEY); - case_A_R(ERR_INFO_NOKEY); - case_A_R(ERR_INFO_VALUE); - case_A_R(ERR_INFO); - case_A_R(ERR_KEYVAL); - case_A_R(ERR_LOCKTYPE); - case_A_R(ERR_NAME); - case_A_R(ERR_NO_MEM); - case_A_R(ERR_PORT); - case_A_R(ERR_RMA_CONFLICT); - case_A_R(ERR_RMA_SYNC); - case_A_R(ERR_SERVICE); - case_A_R(ERR_SIZE); - case_A_R(ERR_SPAWN); - case_A_R(ERR_WIN); - //case_A_R(ERR_LASTCODE); - case_A_R(ERR_RMA_RANGE); - case_A_R(ERR_RMA_ATTACH); - case_A_R(ERR_RMA_SHARED); - case_A_R(ERR_RMA_FLAVOR); - default: - return ret_tmp; - } + switch (ret_tmp) + { + case_A_R(SUCCESS); + case_A_R(ERR_OTHER); + case_A_R(ERR_COMM); + case_A_R(ERR_ARG); + case_A_R(ERR_TYPE); + case_A_R(ERR_COUNT); + case_A_R(ERR_TAG); + case_A_R(ERR_RANK); + case_A_R(ERR_INTERN); /*MPICH*/ + case_A_R(ERR_REQUEST); + case_A_R(ERR_IN_STATUS); + case_A_R(ERR_TRUNCATE); + case_A_R(ERR_BUFFER); + case_A_R(ERR_ROOT); + case_A_R(ERR_OP); + case_A_R(ERR_GROUP); + case_A_R(ERR_TOPOLOGY); + case_A_R(ERR_DIMS); + case_A_R(ERR_UNKNOWN); + case_A_R(ERR_PENDING); + case_A_R(ERR_ASSERT); + case_A_R(ERR_BASE); + case_A_R(ERR_DISP); + case_A_R(ERR_INFO_KEY); + case_A_R(ERR_INFO_NOKEY); + case_A_R(ERR_INFO_VALUE); + case_A_R(ERR_INFO); + case_A_R(ERR_KEYVAL); + case_A_R(ERR_LOCKTYPE); + case_A_R(ERR_NAME); + case_A_R(ERR_NO_MEM); + case_A_R(ERR_PORT); + case_A_R(ERR_RMA_CONFLICT); + case_A_R(ERR_RMA_SYNC); + case_A_R(ERR_SERVICE); + case_A_R(ERR_SIZE); + case_A_R(ERR_SPAWN); + case_A_R(ERR_WIN); + //case_A_R(ERR_LASTCODE); + case_A_R(ERR_RMA_RANGE); + case_A_R(ERR_RMA_ATTACH); + case_A_R(ERR_RMA_SHARED); + case_A_R(ERR_RMA_FLAVOR); + default: + return ret_tmp; + } } /* Mappers Source a2r - r2a */ static inline void source_conv_a2r(int *source,int *source_tmp) { - switch(*source) - { - case A_MPI_ANY_SOURCE: - *source_tmp=R_MPI_ANY_SOURCE; - break; - - case A_MPI_PROC_NULL: - *source_tmp=R_MPI_PROC_NULL; - break; - - default: - if(*source == R_MPI_PROC_NULL || *source == R_MPI_ANY_SOURCE) - *source_tmp = -424242; //OpenMPI - else - *source_tmp = *source; - break; - } + switch(*source) + { + case A_MPI_ANY_SOURCE: + *source_tmp=R_MPI_ANY_SOURCE; + break; + + case A_MPI_PROC_NULL: + *source_tmp=R_MPI_PROC_NULL; + break; + + default: + if(*source == R_MPI_PROC_NULL || *source == R_MPI_ANY_SOURCE) + *source_tmp = -424242; //OpenMPI + else + *source_tmp = *source; + break; + } } static inline void source_conv_r2a(int *source,int *source_tmp) { - switch(*source_tmp) - { - case R_MPI_ANY_SOURCE: - *source=A_MPI_ANY_SOURCE; - break; - - case R_MPI_PROC_NULL: - *source=A_MPI_PROC_NULL; - break; - - default: - *source = *source_tmp; //OpenMPI - break; - } - + switch(*source_tmp) + { + case R_MPI_ANY_SOURCE: + *source=A_MPI_ANY_SOURCE; + break; + + case R_MPI_PROC_NULL: + *source=A_MPI_PROC_NULL; + break; + + default: + *source = *source_tmp; //OpenMPI + break; + } + } /*Mappers Dest a2r - r2a*/ static inline void dest_conv_a2r(int *dest,int *dest_tmp) { - switch(*dest) - { - case A_MPI_ANY_SOURCE: - *dest_tmp=R_MPI_ANY_SOURCE; - break; - - case A_MPI_PROC_NULL: - *dest_tmp=R_MPI_PROC_NULL; - break; - - default: - if(*dest == R_MPI_PROC_NULL || *dest == R_MPI_ANY_SOURCE) - *dest_tmp = -424242; //OpenMPI - else - *dest_tmp = *dest; - break; - } + switch(*dest) + { + case A_MPI_ANY_SOURCE: + *dest_tmp=R_MPI_ANY_SOURCE; + break; + + case A_MPI_PROC_NULL: + *dest_tmp=R_MPI_PROC_NULL; + break; + + default: + if(*dest == R_MPI_PROC_NULL || *dest == R_MPI_ANY_SOURCE) + *dest_tmp = -424242; //OpenMPI + else + *dest_tmp = *dest; + break; + } } static inline void dest_conv_r2a(int *dest,int *dest_tmp) { - switch(*dest_tmp) - { - case R_MPI_ANY_SOURCE: - *dest=A_MPI_ANY_SOURCE; - break; - - case R_MPI_PROC_NULL: - *dest=A_MPI_PROC_NULL; - break; - - default: - *dest = *dest_tmp; //OpenMPI - break; - } + switch(*dest_tmp) + { + case R_MPI_ANY_SOURCE: + *dest=A_MPI_ANY_SOURCE; + break; + + case R_MPI_PROC_NULL: + *dest=A_MPI_PROC_NULL; + break; + + default: + *dest = *dest_tmp; //OpenMPI + break; + } +} + + +/*Mappers Dest a2r - r2a*/ + +static inline void combiner_conv_a2r(int *combiner,int *combiner_tmp) +{ + switch(*combiner) + { + case A_MPI_COMBINER_NAMED : *combiner_tmp = R_MPI_COMBINER_NAMED ; break; + case A_MPI_COMBINER_DUP : *combiner_tmp = R_MPI_COMBINER_DUP ; break; + case A_MPI_COMBINER_CONTIGUOUS : *combiner_tmp = R_MPI_COMBINER_CONTIGUOUS ; break; + case A_MPI_COMBINER_VECTOR : *combiner_tmp = R_MPI_COMBINER_VECTOR ; break; + case A_MPI_COMBINER_HVECTOR : *combiner_tmp = R_MPI_COMBINER_HVECTOR ; break; + case A_MPI_COMBINER_INDEXED : *combiner_tmp = R_MPI_COMBINER_INDEXED ; break; + case A_MPI_COMBINER_HINDEXED : *combiner_tmp = R_MPI_COMBINER_HINDEXED ; break; + case A_MPI_COMBINER_INDEXED_BLOCK : *combiner_tmp = R_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_MPI_COMBINER_STRUCT : *combiner_tmp = R_MPI_COMBINER_STRUCT ; break; + case A_MPI_COMBINER_DARRAY : *combiner_tmp = R_MPI_COMBINER_DARRAY ; break; + case A_MPI_COMBINER_F90_REAL : *combiner_tmp = R_MPI_COMBINER_F90_REAL ; break; + case A_MPI_COMBINER_F90_COMPLEX : *combiner_tmp = R_MPI_COMBINER_F90_COMPLEX ; break; + case A_MPI_COMBINER_F90_INTEGER : *combiner_tmp = R_MPI_COMBINER_F90_INTEGER ; break; + case A_MPI_COMBINER_RESIZED : *combiner_tmp = R_MPI_COMBINER_RESIZED ; break; + default: + *combiner_tmp = *combiner; + break; + } +} + +static inline void combiner_conv_r2a(int *combiner,int *combiner_tmp) +{ + switch(*combiner_tmp) + { + case R_MPI_COMBINER_NAMED : *combiner_tmp = A_MPI_COMBINER_NAMED ; break; + case R_MPI_COMBINER_DUP : *combiner_tmp = A_MPI_COMBINER_DUP ; break; + case R_MPI_COMBINER_CONTIGUOUS : *combiner_tmp = A_MPI_COMBINER_CONTIGUOUS ; break; + case R_MPI_COMBINER_VECTOR : *combiner_tmp = A_MPI_COMBINER_VECTOR ; break; + case R_MPI_COMBINER_HVECTOR : *combiner_tmp = A_MPI_COMBINER_HVECTOR ; break; + case R_MPI_COMBINER_INDEXED : *combiner_tmp = A_MPI_COMBINER_INDEXED ; break; + case R_MPI_COMBINER_HINDEXED : *combiner_tmp = A_MPI_COMBINER_HINDEXED ; break; + case R_MPI_COMBINER_INDEXED_BLOCK : *combiner_tmp = A_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_MPI_COMBINER_STRUCT : *combiner_tmp = A_MPI_COMBINER_STRUCT ; break; + case R_MPI_COMBINER_DARRAY : *combiner_tmp = A_MPI_COMBINER_DARRAY ; break; + case R_MPI_COMBINER_F90_REAL : *combiner_tmp = A_MPI_COMBINER_F90_REAL ; break; + case R_MPI_COMBINER_F90_COMPLEX : *combiner_tmp = A_MPI_COMBINER_F90_COMPLEX ; break; + case R_MPI_COMBINER_F90_INTEGER : *combiner_tmp = A_MPI_COMBINER_F90_INTEGER ; break; + case R_MPI_COMBINER_RESIZED : *combiner_tmp = A_MPI_COMBINER_RESIZED ; break; + default: + *combiner = *combiner_tmp; //OpenMPI + break; + } } /*Mappers Status a2r - r2a*/ static inline void status_prt_conv_a2r(A_MPI_Status **status_tmp, R_MPI_Status **status) { - if(*status_tmp == (A_MPI_Status*)A_MPI_STATUS_IGNORE) - { - *status = (R_MPI_Status*)R_MPI_STATUS_IGNORE; - } - else - { - source_conv_a2r(&((**status_tmp).A_MPI_SOURCE),&((**status).R_MPI_SOURCE)); - tag_conv_a2r(&((**status_tmp).A_MPI_TAG),&((**status).R_MPI_TAG)); - (*status)->R_MPI_ERROR = error_code_conv_a2r(((**status_tmp).A_MPI_ERROR)); - - #if defined(OMPI_OMPI) || defined(_OMPI) - (*status)->_ucount = (*status_tmp)->_ucount; - (*status)->_cancelled = (*status_tmp)->_cancelled; - #elif INTEL_INTEL - (*status)->count_lo = (*status_tmp)->count_lo; - (*status)->count_hi_and_cancelled = (*status_tmp)->count_hi_and_cancelled; - #elif MPC_MPC - (*status)->size = (*status_tmp)->size; - (*status)->cancelled = (*status_tmp)->cancelled; - #elif HPMPI_HPMPI - (*status)->st_cancel = (*status_tmp)->st_cancel; - (*status)->st_count = (*status_tmp)->st_count; - #elif INTEL_OMPI - (*status)->_ucount = ((((size_t)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)(*status_tmp)->count_lo); - (*status)->_cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; - #elif defined(OMPI_INTEL) || defined(_INTEL) - /* Decoupage de count */ - - (*status)->count_lo = ((*status_tmp)->_ucount) & ~(((size_t)-1) << 32); - (*status)->count_hi_and_cancelled &= 1; - (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->_ucount) >> sizeof(int)*8 << 1); - - /* Set de cancelled*/ - (*status)->count_hi_and_cancelled &= ~1; - (*status)->count_hi_and_cancelled |= (*status_tmp)->_cancelled; - #elif INTEL_MPC - (*status)->size = ((((int)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((int)(*status_tmp)->count_lo); - (*status)->cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; - #elif MPC_INTEL - /* Decoupage de count */ - - (*status)->count_lo = (*status_tmp)->size; - (*status)->count_hi_and_cancelled &= 1; - (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->size) >> sizeof(int)*8 << 1); - - /* Set de cancelled*/ - (*status)->count_hi_and_cancelled &= ~1; - (*status)->count_hi_and_cancelled |= (*status_tmp)->cancelled; - #elif defined(OMPI_MPC) || defined(_MPC) - (*status)->size = (*status_tmp)->_ucount; - (*status)->cancelled = (*status_tmp)->_cancelled; - #elif MPC_OMPI - (*status)->_ucount = (*status_tmp)->size; - (*status)->_cancelled = (*status_tmp)->cancelled; - #elif INTEL_HPMPI - (*status)->st_count=((((long long)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((long long)(*status_tmp)->count_lo); - (*status)->st_cancel=((*status_tmp)->count_hi_and_cancelled) & 1; - #elif HPMPI_INTEL - /* Decoupage de count */ - - (*status)->count_lo = ((*status_tmp)->st_count) & ~(((long long)-1) << 32); - (*status)->count_hi_and_cancelled &= 1; - (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->st_count) >> sizeof(int)*8 << 1); - - /* Set de cancelled*/ - (*status)->count_hi_and_cancelled &= ~1; - (*status)->count_hi_and_cancelled |= (*status_tmp)->st_cancel; - #elif defined(OMPI_HPMPI) || defined(_HPMPI) - (*status)->st_count= (long long)((*status_tmp)->_ucount); - (*status)->st_cancelled = (*status_tmp)->_cancelled; - #elif HPMPI_OMPI - (*status)->_ucount = (size_t)((*status_tmp)->st_count); - (*status)->_cancelled = (*status_tmp)->st_cancel; - #elif MPC_HPMPI - (*status)->st_count= (long long)((*status_tmp)->size); - (*status)->st_cancelled = (*status_tmp)->_cancelled; - #elif HPMPI_MPC - (*status)->size = (int)((*status_tmp)->st_count); - (*status)->cancelled = (*status_tmp)->st_cancel; - #endif - } + if(*status_tmp == (A_MPI_Status*)A_MPI_STATUS_IGNORE) + { + *status = (R_MPI_Status*)R_MPI_STATUS_IGNORE; + } + else + { + source_conv_a2r(&((**status_tmp).A_MPI_SOURCE),&((**status).R_MPI_SOURCE)); + tag_conv_a2r(&((**status_tmp).A_MPI_TAG),&((**status).R_MPI_TAG)); + (*status)->R_MPI_ERROR = error_code_conv_a2r(((**status_tmp).A_MPI_ERROR)); + +#if defined(OMPI_OMPI) || defined(_OMPI) + (*status)->_ucount = (*status_tmp)->_ucount; + (*status)->_cancelled = (*status_tmp)->_cancelled; +#elif INTEL_INTEL + (*status)->count_lo = (*status_tmp)->count_lo; + (*status)->count_hi_and_cancelled = (*status_tmp)->count_hi_and_cancelled; +#elif MPC_MPC + (*status)->size = (*status_tmp)->size; + (*status)->cancelled = (*status_tmp)->cancelled; +#elif HPMPI_HPMPI + (*status)->st_cancel = (*status_tmp)->st_cancel; + (*status)->st_count = (*status_tmp)->st_count; +#elif INTEL_OMPI + (*status)->_ucount = ((((size_t)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((unsigned int)(*status_tmp)->count_lo); + (*status)->_cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; +#elif defined(OMPI_INTEL) || defined(_INTEL) + /* Decoupage de count */ + + (*status)->count_lo = ((*status_tmp)->_ucount) & ~(((size_t)-1) << 32); + (*status)->count_hi_and_cancelled &= 1; + (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->_ucount) >> sizeof(int)*8 << 1); + + /* Set de cancelled*/ + (*status)->count_hi_and_cancelled &= ~1; + (*status)->count_hi_and_cancelled |= (*status_tmp)->_cancelled; +#elif INTEL_MPC + (*status)->size = ((((int)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((int)(*status_tmp)->count_lo); + (*status)->cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; +#elif MPC_INTEL + /* Decoupage de count */ + + (*status)->count_lo = (*status_tmp)->size; + (*status)->count_hi_and_cancelled &= 1; + (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->size) >> sizeof(int)*8 << 1); + + /* Set de cancelled*/ + (*status)->count_hi_and_cancelled &= ~1; + (*status)->count_hi_and_cancelled |= (*status_tmp)->cancelled; +#elif defined(OMPI_MPC) || defined(_MPC) + (*status)->size = (*status_tmp)->_ucount; + (*status)->cancelled = (*status_tmp)->_cancelled; +#elif MPC_OMPI + (*status)->_ucount = (*status_tmp)->size; + (*status)->_cancelled = (*status_tmp)->cancelled; +#elif INTEL_HPMPI + (*status)->st_count=((((long long)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((long long)(*status_tmp)->count_lo); + (*status)->st_cancel=((*status_tmp)->count_hi_and_cancelled) & 1; +#elif HPMPI_INTEL + /* Decoupage de count */ + + (*status)->count_lo = ((*status_tmp)->st_count) & ~(((long long)-1) << 32); + (*status)->count_hi_and_cancelled &= 1; + (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->st_count) >> sizeof(int)*8 << 1); + + /* Set de cancelled*/ + (*status)->count_hi_and_cancelled &= ~1; + (*status)->count_hi_and_cancelled |= (*status_tmp)->st_cancel; +#elif defined(OMPI_HPMPI) || defined(_HPMPI) + (*status)->st_count= (long long)((*status_tmp)->_ucount); + (*status)->st_cancelled = (*status_tmp)->_cancelled; +#elif HPMPI_OMPI + (*status)->_ucount = (size_t)((*status_tmp)->st_count); + (*status)->_cancelled = (*status_tmp)->st_cancel; +#elif MPC_HPMPI + (*status)->st_count= (long long)((*status_tmp)->size); + (*status)->st_cancelled = (*status_tmp)->_cancelled; +#elif HPMPI_MPC + (*status)->size = (int)((*status_tmp)->st_count); + (*status)->cancelled = (*status_tmp)->st_cancel; +#endif + } } static void status_prt_conv_r2a(A_MPI_Status **status, R_MPI_Status **status_tmp) { - if(*status == (A_MPI_Status*)A_MPI_STATUS_IGNORE) //here: status and not status_tmp - { //evenif r2a; otherwise segfault for - //obvious reasons : tying to acces to - *status = (A_MPI_Status*)A_MPI_STATUS_IGNORE; // non allocated struct in the else - } - else - { - source_conv_r2a(&((**status).A_MPI_SOURCE), (&((**status_tmp).R_MPI_SOURCE))); - tag_conv_r2a(&((**status).A_MPI_TAG), &((**status_tmp).R_MPI_TAG)); - (**status).A_MPI_ERROR = error_code_conv_r2a(((**status_tmp).R_MPI_ERROR)); - - #if defined(OMPI_OMPI) || defined(_OMPI) + if(*status == (A_MPI_Status*)A_MPI_STATUS_IGNORE) //here: status and not status_tmp + { //evenif r2a; otherwise segfault for + //obvious reasons : tying to acces to + *status = (A_MPI_Status*)A_MPI_STATUS_IGNORE; // non allocated struct in the else + } + else + { + source_conv_r2a(&((**status).A_MPI_SOURCE), (&((**status_tmp).R_MPI_SOURCE))); + tag_conv_r2a(&((**status).A_MPI_TAG), &((**status_tmp).R_MPI_TAG)); + (**status).A_MPI_ERROR = error_code_conv_r2a(((**status_tmp).R_MPI_ERROR)); + +#if defined(OMPI_OMPI) || defined(_OMPI) (*status)->_ucount = (*status_tmp)->_ucount; - (*status)->_cancelled = (*status_tmp)->_cancelled; - #elif INTEL_INTEL + (*status)->_cancelled = (*status_tmp)->_cancelled; +#elif INTEL_INTEL (*status)->count_lo = (*status_tmp)->count_lo; (*status)->count_hi_and_cancelled = (*status_tmp)->count_hi_and_cancelled; - #elif MPC_MPC +#elif MPC_MPC (*status)->size = (*status_tmp)->size; (*status)->cancelled = (*status_tmp)->cancelled; - #elif HPMPI_HPMPI +#elif HPMPI_HPMPI (*status)->st_cancel = (*status_tmp)->st_cancel; (*status)->st_count = (*status_tmp)->st_count; - #elif INTEL_OMPI - /* Découpage de cout*/ - - (*status)->count_lo = ((*status_tmp)->_ucount) & ~(((size_t)-1) << 32); - (*status)->count_hi_and_cancelled &= 1; - (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->_ucount) >> sizeof(int)*8 << 1); - - /* Set de cancelled*/ - (*status)->count_hi_and_cancelled &= ~1; - (*status)->count_hi_and_cancelled |= (*status_tmp)->_cancelled; - #elif defined(OMPI_INTEL) || (_INTEL) - (*status)->_ucount = (((((size_t)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)((*status_tmp)->count_lo))); - (*status)->_cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; - #elif INTEL_MPC - (*status)->count_lo = (*status_tmp)->size; - (*status)->count_hi_and_cancelled &= 1; - (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->size) >> sizeof(int)*8 << 1); - - (*status)->count_hi_and_cancelled &= ~1; - (*status)->count_hi_and_cancelled |= (*status_tmp)->cancelled; - #elif MPC_INTEL - (*status)->size = ((((size_t)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)(*status_tmp)->count_lo); - (*status)->cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; - #elif defined(OMPI_MPC) || defined(_MPC) - (*status)->_ucount = (*status_tmp)->size; - (*status)->_cancelled = (*status_tmp)->cancelled; - #elif MPC_OMPI - (*status)->size = (*status_tmp)->_ucount; - (*status)->cancelled = (*status_tmp)->_cancelled; - #elif INTEL_HPMPI - (*status)->count_lo = (int)((*status_tmp)->st_count); - (*status)->count_hi_and_cancelled &= 1; - (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->st_count) >> sizeof(int)*8 << 1); - - (*status)->count_hi_and_cancelled &= ~1; - (*status)->count_hi_and_cancelled |= (*status_tmp)->st_cancel; - #elif HPMPI_INTEL - (*status)->st_count = (((((long long)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)((*status_tmp)->count_lo))); - (*status)->st_cancel = ((*status_tmp)->count_hi_and_cancelled) & 1; - #elif defined(OMPI_HPMPI) || defined(_HPMPI) - (*status)->_ucount = (size_t)((*status_tmp)->st_count); - (*status)->_cancelled = (*status_tmp)->st_cancel; - #elif HPMPI_OMPI - (*status)->st_count = (long long)((*status_tmp)->_ucount); - (*status)->st_cancel = (*status_tmp)->_cancelled; - #elif MPC_HPMPI - (*status)->size = (int)((*status_tmp)->st_count); - (*status)->cancelled = (*status_tmp)->st_cancel; - #elif HPMPI_MPC - (*status)->st_count = (long long)((*status_tmp)->size); - (*status)->st_cancel = (*status_tmp)->cancelled; - #endif - } +#elif INTEL_OMPI + /* Découpage de cout*/ + + (*status)->count_lo = ((*status_tmp)->_ucount) & ~(((size_t)-1) << 32); + (*status)->count_hi_and_cancelled &= 1; + (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->_ucount) >> sizeof(int)*8 << 1); + + /* Set de cancelled*/ + (*status)->count_hi_and_cancelled &= ~1; + (*status)->count_hi_and_cancelled |= (*status_tmp)->_cancelled; +#elif defined(OMPI_INTEL) || (_INTEL) + (*status)->_ucount = (((((size_t)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((unsigned int)((*status_tmp)->count_lo))); + (*status)->_cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; +#elif INTEL_MPC + (*status)->count_lo = (*status_tmp)->size; + (*status)->count_hi_and_cancelled &= 1; + (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->size) >> sizeof(int)*8 << 1); + + (*status)->count_hi_and_cancelled &= ~1; + (*status)->count_hi_and_cancelled |= (*status_tmp)->cancelled; +#elif MPC_INTEL + (*status)->size = ((((size_t)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((unsigned int)(*status_tmp)->count_lo); + (*status)->cancelled = ((*status_tmp)->count_hi_and_cancelled) & 1; +#elif defined(OMPI_MPC) || defined(_MPC) + (*status)->_ucount = (*status_tmp)->size; + (*status)->_cancelled = (*status_tmp)->cancelled; +#elif MPC_OMPI + (*status)->size = (*status_tmp)->_ucount; + (*status)->cancelled = (*status_tmp)->_cancelled; +#elif INTEL_HPMPI + (*status)->count_lo = (int)((*status_tmp)->st_count); + (*status)->count_hi_and_cancelled &= 1; + (*status)->count_hi_and_cancelled |= (int) (((*status_tmp)->st_count) >> sizeof(int)*8 << 1); + + (*status)->count_hi_and_cancelled &= ~1; + (*status)->count_hi_and_cancelled |= (*status_tmp)->st_cancel; +#elif HPMPI_INTEL + (*status)->st_count = (((((long long)((*status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((unsigned int)((*status_tmp)->count_lo))); + (*status)->st_cancel = ((*status_tmp)->count_hi_and_cancelled) & 1; +#elif defined(OMPI_HPMPI) || defined(_HPMPI) + (*status)->_ucount = (size_t)((*status_tmp)->st_count); + (*status)->_cancelled = (*status_tmp)->st_cancel; +#elif HPMPI_OMPI + (*status)->st_count = (long long)((*status_tmp)->_ucount); + (*status)->st_cancel = (*status_tmp)->_cancelled; +#elif MPC_HPMPI + (*status)->size = (int)((*status_tmp)->st_count); + (*status)->cancelled = (*status_tmp)->st_cancel; +#elif HPMPI_MPC + (*status)->st_count = (long long)((*status_tmp)->size); + (*status)->st_cancel = (*status_tmp)->cancelled; +#endif + } } static inline void status_tab_conv_r2a(A_MPI_Status *status, R_MPI_Status *status_tmp) { - if(status == (A_MPI_Status*)A_MPI_STATUS_IGNORE) //here: status and not status_tmp - { //for the same reason than previously - status = (A_MPI_Status*)A_MPI_STATUS_IGNORE; //MPI_STATUS_IGNORE - } - else - { - source_conv_r2a(&((*status).A_MPI_SOURCE), (&((*status_tmp).R_MPI_SOURCE))); - tag_conv_r2a(&((*status).A_MPI_TAG), &((*status_tmp).R_MPI_TAG)); - (*status).A_MPI_ERROR = error_code_conv_r2a(((*status_tmp).R_MPI_ERROR)); - - #if defined(OMPI_OMPI) || defined(_OMPI) - (status)->_ucount = (status_tmp)->_ucount; - (status)->_cancelled = (status_tmp)->_cancelled; - #elif INTEL_INTEL - (status)->count_lo = (status_tmp)->count_lo; - (status)->count_hi_and_cancelled = (status_tmp)->count_hi_and_cancelled; - #elif MPC_MPC - (status)->size = (status_tmp)->size; - (status)->cancelled = (status_tmp)->cancelled; - #elif HPMPI_HPMPI - (status)->st_cancel = (status_tmp)->st_cancel; - (status)->st_count = (status_tmp)->st_count; - #elif INTEL_OMPI - - (status)->count_lo = ((status_tmp)->_ucount) & ~(((size_t)-1) << 32); - (status)->count_hi_and_cancelled &= 1; - (status)->count_hi_and_cancelled |= (int) (((status_tmp)->_ucount) >> sizeof(int)*8 << 1); - /* Set de cancelled*/ - (status)->count_hi_and_cancelled &= ~1; - (status)->count_hi_and_cancelled |= (status_tmp)->_cancelled; - #elif defined(OMPI_INTEL) || defined(_INTEL) + if(status == (A_MPI_Status*)A_MPI_STATUS_IGNORE) //here: status and not status_tmp + { //for the same reason than previously + status = (A_MPI_Status*)A_MPI_STATUS_IGNORE; //MPI_STATUS_IGNORE + } + else + { + source_conv_r2a(&((*status).A_MPI_SOURCE), (&((*status_tmp).R_MPI_SOURCE))); + tag_conv_r2a(&((*status).A_MPI_TAG), &((*status_tmp).R_MPI_TAG)); + (*status).A_MPI_ERROR = error_code_conv_r2a(((*status_tmp).R_MPI_ERROR)); + +#if defined(OMPI_OMPI) || defined(_OMPI) + (status)->_ucount = (status_tmp)->_ucount; + (status)->_cancelled = (status_tmp)->_cancelled; +#elif INTEL_INTEL + (status)->count_lo = (status_tmp)->count_lo; + (status)->count_hi_and_cancelled = (status_tmp)->count_hi_and_cancelled; +#elif MPC_MPC + (status)->size = (status_tmp)->size; + (status)->cancelled = (status_tmp)->cancelled; +#elif HPMPI_HPMPI + (status)->st_cancel = (status_tmp)->st_cancel; + (status)->st_count = (status_tmp)->st_count; +#elif INTEL_OMPI + + (status)->count_lo = ((status_tmp)->_ucount) & ~(((size_t)-1) << 32); + (status)->count_hi_and_cancelled &= 1; + (status)->count_hi_and_cancelled |= (int) (((status_tmp)->_ucount) >> sizeof(int)*8 << 1); + /* Set de cancelled*/ + (status)->count_hi_and_cancelled &= ~1; + (status)->count_hi_and_cancelled |= (status_tmp)->_cancelled; +#elif defined(OMPI_INTEL) || defined(_INTEL) (status)->_ucount = (((((size_t)((status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)((status_tmp)->count_lo))); + + ((unsigned int)((status_tmp)->count_lo))); (status)->_cancelled = ((status_tmp)->count_hi_and_cancelled) & 1; - #elif INTEL_MPC - (status)->count_lo = (status_tmp)->size; - (status)->count_hi_and_cancelled &= 1; - (status)->count_hi_and_cancelled |= (int) (((status_tmp)->size) >> sizeof(int)*8 << 1); - - (status)->count_hi_and_cancelled &= ~1; - (status)->count_hi_and_cancelled |= (status_tmp)->cancelled; - #elif MPC_INTEL - (status)->size = ((((size_t)((status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)(status_tmp)->count_lo); - (status)->cancelled = ((status_tmp)->count_hi_and_cancelled) & 1; - #elif defined(OMPI_MPC) || defined(_MPC) - (status)->_ucount = (status_tmp)->size; - (status)->_cancelled = (status_tmp)->cancelled; - #elif MPC_OMPI - (status)->size = (status_tmp)->_ucount; - (status)->cancelled = (status_tmp)->_cancelled; - #elif INTEL_HPMPI - (status)->count_lo = (int)((status_tmp)->st_count); - (status)->count_hi_and_cancelled &= 1; - (status)->count_hi_and_cancelled |= (int) (((status_tmp)->st_count) >> sizeof(int)*8 << 1); - - (status)->count_hi_and_cancelled &= ~1; - (status)->count_hi_and_cancelled |= (status_tmp)->st_cancel; - #elif HPMPI_INTEL - (status)->st_count = (((((long long)((status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) - + ((unsigned int)((*status_tmp)->count_lo))); - (status)->st_cancel = ((status_tmp)->count_hi_and_cancelled) & 1; - #elif defined(OMPI_HPMPI) || defined(_HPMPI) - (status)->_ucount = (size_t)((status_tmp)->st_count); - (status)->_cancelled = (status_tmp)->st_cancel; - #elif HPMPI_OMPI - (status)->st_count = (long long)((status_tmp)->_ucount); - (status)->st_cancel = (status_tmp)->_cancelled; - #elif MPC_HPMPI - (status)->size = (int)((status_tmp)->st_count); - (status)->cancelled = (status_tmp)->st_cancel; - #elif HPMPI_MPC - (status)->st_count = (long long)((status_tmp)->size); - (status)->st_cancel = (status_tmp)->cancelled; - #endif - } +#elif INTEL_MPC + (status)->count_lo = (status_tmp)->size; + (status)->count_hi_and_cancelled &= 1; + (status)->count_hi_and_cancelled |= (int) (((status_tmp)->size) >> sizeof(int)*8 << 1); + + (status)->count_hi_and_cancelled &= ~1; + (status)->count_hi_and_cancelled |= (status_tmp)->cancelled; +#elif MPC_INTEL + (status)->size = ((((size_t)((status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((unsigned int)(status_tmp)->count_lo); + (status)->cancelled = ((status_tmp)->count_hi_and_cancelled) & 1; +#elif defined(OMPI_MPC) || defined(_MPC) + (status)->_ucount = (status_tmp)->size; + (status)->_cancelled = (status_tmp)->cancelled; +#elif MPC_OMPI + (status)->size = (status_tmp)->_ucount; + (status)->cancelled = (status_tmp)->_cancelled; +#elif INTEL_HPMPI + (status)->count_lo = (int)((status_tmp)->st_count); + (status)->count_hi_and_cancelled &= 1; + (status)->count_hi_and_cancelled |= (int) (((status_tmp)->st_count) >> sizeof(int)*8 << 1); + + (status)->count_hi_and_cancelled &= ~1; + (status)->count_hi_and_cancelled |= (status_tmp)->st_cancel; +#elif HPMPI_INTEL + (status)->st_count = (((((long long)((status_tmp)->count_hi_and_cancelled)) >> 1) << sizeof(int)*8) + + ((unsigned int)((*status_tmp)->count_lo))); + (status)->st_cancel = ((status_tmp)->count_hi_and_cancelled) & 1; +#elif defined(OMPI_HPMPI) || defined(_HPMPI) + (status)->_ucount = (size_t)((status_tmp)->st_count); + (status)->_cancelled = (status_tmp)->st_cancel; +#elif HPMPI_OMPI + (status)->st_count = (long long)((status_tmp)->_ucount); + (status)->st_cancel = (status_tmp)->_cancelled; +#elif MPC_HPMPI + (status)->size = (int)((status_tmp)->st_count); + (status)->cancelled = (status_tmp)->st_cancel; +#elif HPMPI_MPC + (status)->st_count = (long long)((status_tmp)->size); + (status)->st_cancel = (status_tmp)->cancelled; +#endif + } } static inline void int_ptr_conv_a2r(int **argc,int **argc_tmp) { *argc_tmp=*argc; - //inutile + //inutile } static inline void char_ppp_conv_a2r(char ****argv,char ****argv_tmp) { *argv_tmp=*argv; - //inutile + //inutile } static inline void int_ptr_conv_r2a(int **rank_tmp,int **rank) { **rank_tmp=**rank; - //inutile + //inutile } static inline void int_conv_a2r(int *count, int *count_tmp) @@ -790,8 +841,8 @@ static inline void request_ptr_conv_r2a(A_MPI_Request **request, R_MPI_Request * static inline void request_ptr_conv_a2r(A_MPI_Request **request, R_MPI_Request **request_tmp) { - int non_blocking; - request_translation_get(**request, *request_tmp, &non_blocking); + int non_blocking; + request_translation_get(**request, *request_tmp, &non_blocking); } /* Request converter a2r - r2a for non blocking communication (array)*/ @@ -800,11 +851,11 @@ static inline void request_tab_conv_r2a(A_MPI_Request *request, R_MPI_Request *r int non_blocking = 1; request_translation_update(request,*request_tmp, non_blocking); } - + static inline void request_tab_conv_a2r(A_MPI_Request *request, R_MPI_Request *request_tmp) { - int non_blocking; - request_translation_get(*request, request_tmp, &non_blocking); + int non_blocking; + request_translation_get(*request, request_tmp, &non_blocking); } /* Request converter a2r - r2a for persistent request */ @@ -817,81 +868,81 @@ static inline void request_pers_ptr_conv_r2a(A_MPI_Request **request, R_MPI_Requ static inline void request_pers_ptr_conv_a2r(A_MPI_Request **request, R_MPI_Request **request_tmp) { - int non_blocking; - request_translation_get(**request, *request_tmp, &non_blocking); + int non_blocking; + request_translation_get(**request, *request_tmp, &non_blocking); } /*Special mapper r2a (use by MPI_Cancel)*/ /*Need to know which kind of request we have to update*/ static inline void request_cancel_r2a(A_MPI_Request **request, R_MPI_Request **request_tmp) { - int non_blocking; - - R_MPI_Request request_ltmp_intra; - R_MPI_Request *request_tmp_intra=&request_ltmp_intra; + int non_blocking; + + R_MPI_Request request_ltmp_intra; + R_MPI_Request *request_tmp_intra=&request_ltmp_intra; - request_translation_get(**request, request_tmp_intra, &non_blocking); - request_translation_update(*request,**request_tmp, non_blocking); + request_translation_get(**request, request_tmp_intra, &non_blocking); + request_translation_update(*request,**request_tmp, non_blocking); } /* Mappers for deleting a request from the hashtable*/ /*Non-blocking request */ static inline void request_ptr_delete(A_MPI_Request **request, R_MPI_Request ** request_tmp) { - int non_blocking; + int non_blocking; - R_MPI_Request request_ltmp_intra; - R_MPI_Request *request_tmp_intra=&request_ltmp_intra; + R_MPI_Request request_ltmp_intra; + R_MPI_Request *request_tmp_intra=&request_ltmp_intra; - request_translation_get(**request, request_tmp_intra, &non_blocking); - if(non_blocking == 1) - request_translation_del(*request); + request_translation_get(**request, request_tmp_intra, &non_blocking); + if(non_blocking == 1) + request_translation_del(*request); - **request = A_MPI_REQUEST_NULL; + **request = A_MPI_REQUEST_NULL; } static inline void request_array_delete(A_MPI_Request *request, R_MPI_Request *request_tmp) { - int non_blocking; + int non_blocking; - R_MPI_Request request_ltmp_intra; - R_MPI_Request *request_tmp_intra=&request_ltmp_intra; + R_MPI_Request request_ltmp_intra; + R_MPI_Request *request_tmp_intra=&request_ltmp_intra; - request_translation_get(*request, request_tmp_intra, &non_blocking); - if(non_blocking == 1) - request_translation_del(request); + request_translation_get(*request, request_tmp_intra, &non_blocking); + if(non_blocking == 1) + request_translation_del(request); - *request = A_MPI_REQUEST_NULL; + *request = A_MPI_REQUEST_NULL; } /*Persistent request*/ static inline void request_pers_ptr_delete(A_MPI_Request **request, R_MPI_Request ** request_tmp) { - int non_blocking; + int non_blocking; - R_MPI_Request request_ltmp_intra; - R_MPI_Request *request_tmp_intra=&request_ltmp_intra; + R_MPI_Request request_ltmp_intra; + R_MPI_Request *request_tmp_intra=&request_ltmp_intra; - request_translation_get(**request, request_tmp_intra, &non_blocking); - if(non_blocking == 0) - request_translation_del(*request); + request_translation_get(**request, request_tmp_intra, &non_blocking); + if(non_blocking == 0) + request_translation_del(*request); - **request = A_MPI_REQUEST_NULL; + **request = A_MPI_REQUEST_NULL; } static inline void request_pers_array_delete(A_MPI_Request *request, R_MPI_Request * request_tmp) { - int non_blocking; + int non_blocking; - R_MPI_Request request_ltmp_intra; - R_MPI_Request *request_tmp_intra=&request_ltmp_intra; + R_MPI_Request request_ltmp_intra; + R_MPI_Request *request_tmp_intra=&request_ltmp_intra; - request_translation_get(*request, request_tmp_intra, &non_blocking); - if(non_blocking == 0) - request_translation_del(request); + request_translation_get(*request, request_tmp_intra, &non_blocking); + if(non_blocking == 0) + request_translation_del(request); - *request = A_MPI_REQUEST_NULL; + *request = A_MPI_REQUEST_NULL; } #include @@ -901,7 +952,7 @@ extern void user_fn_wrapper_template(void *a,void *b,int *c,R_MPI_Datatype *d,vo #endif static inline void reduce_user_fn_a2r(A_MPI_User_function **fa,R_MPI_User_function **fr) { - void *fh; + void *fh; char fname[256]; char command[4096]; char soname[256]; @@ -926,19 +977,19 @@ static inline void reduce_user_fn_a2r(A_MPI_User_function **fa,R_MPI_User_functi printf("%s\n",dlerror()); } *fr=dlsym(fh,func_name); - if(!*fr) - { - fprintf(stderr,"error in loading wrapped user function %s \n",func_name); - } + if(!*fr) + { + fprintf(stderr,"error in loading wrapped user function %s \n",func_name); + } #elif !defined(_WI4MPI_GCC_JIT) - + void* ptr = mmap(0, 1024, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); memcpy(((char *)ptr+0x10),user_fn_wrapper_template,0x100); ((void **)ptr)[0]=*fa; - + ((void **)ptr)[1]=user_func_resolved; *fr=ptr+0x10; #endif @@ -950,9 +1001,9 @@ extern void user_datarep_extent_function_template(R_MPI_Datatype a, R_MPI_Aint * static inline void datarep_extent_function_converter_a2r(A_MPI_Datarep_extent_function **fa, R_MPI_Datarep_extent_function **fr) { - void* ptr = mmap(0, 1024, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + void* ptr = mmap(0, 1024, + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); memcpy(((char *)ptr+0x10),user_datarep_extent_function_template,0x100); ((void **)ptr)[0]=*fa; @@ -966,9 +1017,9 @@ extern void user_datarep_conversion_function_template(void *a, R_MPI_Datatype b, static inline void datarep_conversion_function_a2r(A_MPI_Datarep_conversion_function **fa,R_MPI_Datarep_conversion_function **fr) { - void* ptr = mmap(0, 1024, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + void* ptr = mmap(0, 1024, + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); memcpy(((char *)ptr+0x10),user_datarep_conversion_function_template,0x100); ((void **)ptr)[0]=*fa; @@ -982,9 +1033,9 @@ extern int qrequest_query_func_resolved(void *a, R_MPI_Status *b, int (*pf)(void static inline void grequest_query_fn_a2r(A_MPI_Grequest_query_function **fa, R_MPI_Grequest_query_function **fr) { - void* ptr = mmap(0, 1024, - PROT_READ | PROT_WRITE | PROT_EXEC, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + void* ptr = mmap(0, 1024, + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); memcpy(((char *)ptr+0x10),user_qrequest_query_function_template,0x100); ((void **)ptr)[0]=*fa; @@ -1011,75 +1062,75 @@ static A_MPI_Type_delete_attr_function *ptr_type_dlt_attr_fn = NULL; //gen_hash_conv(op,MPI_Op,operation) static inline void op_conv_a2r(A_MPI_Op * op, R_MPI_Op * op_tmp) { - A_MPI_User_function * function; - int type_op=0; - - if((*op == A_MPI_OP_NULL ) || - (*op == A_MPI_MAX ) || - (*op == A_MPI_MIN ) || - (*op == A_MPI_SUM ) || - (*op == A_MPI_PROD ) || - (*op == A_MPI_LAND ) || - (*op == A_MPI_BAND ) || - (*op == A_MPI_LOR ) || - (*op == A_MPI_BOR ) || - (*op == A_MPI_LXOR ) || - (*op == A_MPI_BXOR ) || - (*op == A_MPI_MINLOC ) || - (*op == A_MPI_MAXLOC ) || - (*op == A_MPI_REPLACE ) ) + A_MPI_User_function * function; + int type_op=0; + + if((*op == A_MPI_OP_NULL ) || + (*op == A_MPI_MAX ) || + (*op == A_MPI_MIN ) || + (*op == A_MPI_SUM ) || + (*op == A_MPI_PROD ) || + (*op == A_MPI_LAND ) || + (*op == A_MPI_BAND ) || + (*op == A_MPI_LOR ) || + (*op == A_MPI_BOR ) || + (*op == A_MPI_LXOR ) || + (*op == A_MPI_BXOR ) || + (*op == A_MPI_MINLOC ) || + (*op == A_MPI_MAXLOC ) || + (*op == A_MPI_REPLACE ) ) type_op =1; - - //case where a collective is called by R_MPI implementation itself - //example MPICH use MPI_Allreduce in MPI_File_open in order to make sure - //that all process open the file with the same mode: MPI_OP = ADIO_same_mode = MPI_MAX - //Works only for OMPI_INTEL MPI_File_open - //if((*op == A_ADIO_same_amode) || - // (*op == A_UNDEFINED_OP ) || - // (*op == A_ADIO_MIN )) - // type_op = 2; - - if(type_op==1) - operation_translation_get(*op,op_tmp); - else if(type_op == 2) - operation_translation_get(*op,op_tmp); - else if(type_op == 0) - { - operation_translation_get(*op,op_tmp); - /* operation_fn_translation_get(*op, &function); - if (function != NULL) + + //case where a collective is called by R_MPI implementation itself + //example MPICH use MPI_Allreduce in MPI_File_open in order to make sure + //that all process open the file with the same mode: MPI_OP = ADIO_same_mode = MPI_MAX + //Works only for OMPI_INTEL MPI_File_open + //if((*op == A_ADIO_same_amode) || + // (*op == A_UNDEFINED_OP ) || + // (*op == A_ADIO_MIN )) + // type_op = 2; + + if(type_op==1) + operation_translation_get(*op,op_tmp); + else if(type_op == 2) + operation_translation_get(*op,op_tmp); + else if(type_op == 0) { - ptr_user_func = function; - }*/ - } + operation_translation_get(*op,op_tmp); + /* operation_fn_translation_get(*op, &function); + if (function != NULL) + { + ptr_user_func = function; + }*/ + } } static inline void op_conv_r2a(A_MPI_Op * op, R_MPI_Op * op_tmp) { - int type_op=0; - if((*op_tmp == R_MPI_OP_NULL ) || - (*op_tmp == R_MPI_MAX ) || - (*op_tmp == R_MPI_MIN ) || - (*op_tmp == R_MPI_SUM ) || - (*op_tmp == R_MPI_PROD ) || - (*op_tmp == R_MPI_LAND ) || - (*op_tmp == R_MPI_BAND ) || - (*op_tmp == R_MPI_LOR ) || - (*op_tmp == R_MPI_BOR ) || - (*op_tmp == R_MPI_LXOR ) || - (*op_tmp == R_MPI_BXOR ) || - (*op_tmp == R_MPI_MINLOC ) || - (*op_tmp == R_MPI_MAXLOC ) || - (*op_tmp == R_MPI_REPLACE) ) + int type_op=0; + if((*op_tmp == R_MPI_OP_NULL ) || + (*op_tmp == R_MPI_MAX ) || + (*op_tmp == R_MPI_MIN ) || + (*op_tmp == R_MPI_SUM ) || + (*op_tmp == R_MPI_PROD ) || + (*op_tmp == R_MPI_LAND ) || + (*op_tmp == R_MPI_BAND ) || + (*op_tmp == R_MPI_LOR ) || + (*op_tmp == R_MPI_BOR ) || + (*op_tmp == R_MPI_LXOR ) || + (*op_tmp == R_MPI_BXOR ) || + (*op_tmp == R_MPI_MINLOC ) || + (*op_tmp == R_MPI_MAXLOC ) || + (*op_tmp == R_MPI_REPLACE) ) type_op =1; - - if(type_op==1) - operation_translation_update(op,*op_tmp); - else - { - operation_translation_update(op,*op_tmp); -// operation_fn_translation_update(*op,ptr_user_func); - } + + if(type_op==1) + operation_translation_update(op,*op_tmp); + else + { + operation_translation_update(op,*op_tmp); + // operation_fn_translation_update(*op,ptr_user_func); + } } @@ -1087,15 +1138,15 @@ static inline void op_conv_r2a(A_MPI_Op * op, R_MPI_Op * op_tmp) static inline void errhandler_conv_a2r(A_MPI_Errhandler *errhandler, R_MPI_Errhandler *errhandler_tmp) { - errhandler_translation_get(*errhandler, errhandler_tmp); + errhandler_translation_get(*errhandler, errhandler_tmp); } // for create //comm static inline void errhandler_comm_ptr_conv_r2a(A_MPI_Errhandler **errhandler, R_MPI_Errhandler **errhandler_tmp) { - errhandler_translation_update(*errhandler, **errhandler_tmp); - errhandler_fn_translation_update(**errhandler, ptr_comm_fn_handler); + errhandler_translation_update(*errhandler, **errhandler_tmp); + errhandler_fn_translation_update(**errhandler, ptr_comm_fn_handler); } //deprecated one static inline void errhandler_ptr_conv_r2a(A_MPI_Errhandler **errhandler, R_MPI_Errhandler **errhandler_tmp) @@ -1118,14 +1169,14 @@ static inline void errhandler_ptr_conv_r2a(A_MPI_Errhandler **errhandler, R_MPI_ return; } - errhandler_translation_update(*errhandler, **errhandler_tmp); - errhandler_fn_translation_update(**errhandler, ptr_handler_fn); + errhandler_translation_update(*errhandler, **errhandler_tmp); + errhandler_fn_translation_update(**errhandler, ptr_handler_fn); } //dell static inline void errhandler_del(A_MPI_Errhandler *errhandler, R_MPI_Errhandler *errhandler_tmp) { - errhandler_translation_del(errhandler); - *errhandler = A_MPI_ERRHANDLER_NULL; + errhandler_translation_del(errhandler); + *errhandler = A_MPI_ERRHANDLER_NULL; } @@ -1167,40 +1218,40 @@ gen_hash_conv(info,MPI_Info,info); /* Topo_status converter r2a */ static inline void topo_status_mapper(int * status, int* status_tmp) { - switch(*status_tmp) - { - case R_MPI_GRAPH: - *status= A_MPI_GRAPH; - break; - - case R_MPI_CART: - *status= A_MPI_CART; - break; - - default: - *status = A_MPI_UNDEFINED; - break; - } + switch(*status_tmp) + { + case R_MPI_GRAPH: + *status= A_MPI_GRAPH; + break; + + case R_MPI_CART: + *status= A_MPI_CART; + break; + + default: + *status = A_MPI_UNDEFINED; + break; + } } /* split_type (MPI_Comm_split_type)*/ static inline void splittype_conv_a2r(int * split_type, int * split_type_tmp) { - if(*split_type == A_MPI_UNDEFINED) - *split_type_tmp = R_MPI_UNDEFINED; - else if (*split_type == A_MPI_COMM_TYPE_SHARED) - *split_type_tmp = R_MPI_COMM_TYPE_SHARED; - else *split_type_tmp = *split_type; + if(*split_type == A_MPI_UNDEFINED) + *split_type_tmp = R_MPI_UNDEFINED; + else if (*split_type == A_MPI_COMM_TYPE_SHARED) + *split_type_tmp = R_MPI_COMM_TYPE_SHARED; + else *split_type_tmp = *split_type; } static inline void splittype_conv_r2a(int * split_type, int * split_type_tmp) { - if(*split_type_tmp == R_MPI_UNDEFINED) - *split_type = A_MPI_UNDEFINED; - else if (*split_type_tmp == R_MPI_COMM_TYPE_SHARED) - *split_type = A_MPI_COMM_TYPE_SHARED; - else *split_type = *split_type_tmp; + if(*split_type_tmp == R_MPI_UNDEFINED) + *split_type = A_MPI_UNDEFINED; + else if (*split_type_tmp == R_MPI_COMM_TYPE_SHARED) + *split_type = A_MPI_COMM_TYPE_SHARED; + else *split_type = *split_type_tmp; } /* MPI_Win */ @@ -1211,49 +1262,49 @@ gen_hash_conv(win,MPI_Win,win); static inline void assert_mode_a2r(int *assert, int *assert_tmp) { - if(*assert & A_MPI_MODE_NOCHECK ) - *assert_tmp |= R_MPI_MODE_NOCHECK; - if(*assert & A_MPI_MODE_NOPRECEDE) - *assert_tmp |= R_MPI_MODE_NOPRECEDE ; - if(*assert & A_MPI_MODE_NOPUT ) - *assert_tmp |= R_MPI_MODE_NOPUT ; - if(*assert & A_MPI_MODE_NOSTORE ) - *assert_tmp |= R_MPI_MODE_NOSTORE; - if(*assert & A_MPI_MODE_NOSUCCEED) - *assert_tmp |= R_MPI_MODE_NOSUCCEED ; - if(*assert == 0) - *assert_tmp =0; + if(*assert & A_MPI_MODE_NOCHECK ) + *assert_tmp |= R_MPI_MODE_NOCHECK; + if(*assert & A_MPI_MODE_NOPRECEDE) + *assert_tmp |= R_MPI_MODE_NOPRECEDE ; + if(*assert & A_MPI_MODE_NOPUT ) + *assert_tmp |= R_MPI_MODE_NOPUT ; + if(*assert & A_MPI_MODE_NOSTORE ) + *assert_tmp |= R_MPI_MODE_NOSTORE; + if(*assert & A_MPI_MODE_NOSUCCEED) + *assert_tmp |= R_MPI_MODE_NOSUCCEED ; + if(*assert == 0) + *assert_tmp =0; } static inline void assert_mode_r2a(int *assert, int *assert_tmp) { - if(*assert_tmp & R_MPI_MODE_NOCHECK ) - *assert |= A_MPI_MODE_NOCHECK; - if(*assert_tmp & R_MPI_MODE_NOPRECEDE) - *assert |= A_MPI_MODE_NOPRECEDE ; - if(*assert_tmp & R_MPI_MODE_NOPUT ) - *assert |= A_MPI_MODE_NOPUT ; - if(*assert_tmp & R_MPI_MODE_NOSTORE ) - *assert |= A_MPI_MODE_NOSTORE; - if(*assert_tmp & R_MPI_MODE_NOSUCCEED) - *assert |= A_MPI_MODE_NOSUCCEED ; - if(*assert ==0) - *assert = 0; + if(*assert_tmp & R_MPI_MODE_NOCHECK ) + *assert |= A_MPI_MODE_NOCHECK; + if(*assert_tmp & R_MPI_MODE_NOPRECEDE) + *assert |= A_MPI_MODE_NOPRECEDE ; + if(*assert_tmp & R_MPI_MODE_NOPUT ) + *assert |= A_MPI_MODE_NOPUT ; + if(*assert_tmp & R_MPI_MODE_NOSTORE ) + *assert |= A_MPI_MODE_NOSTORE; + if(*assert_tmp & R_MPI_MODE_NOSUCCEED) + *assert |= A_MPI_MODE_NOSUCCEED ; + if(*assert ==0) + *assert = 0; } /* Lock type */ static inline void lock_conv_a2r(int *lock_type, int *lock_type_tmp) { - switch(*lock_type) - { - case A_MPI_LOCK_EXCLUSIVE: - *lock_type_tmp= R_MPI_LOCK_EXCLUSIVE; - break; - case A_MPI_LOCK_SHARED: - *lock_type_tmp= R_MPI_LOCK_SHARED; - break; - } + switch(*lock_type) + { + case A_MPI_LOCK_EXCLUSIVE: + *lock_type_tmp= R_MPI_LOCK_EXCLUSIVE; + break; + case A_MPI_LOCK_SHARED: + *lock_type_tmp= R_MPI_LOCK_SHARED; + break; + } } static inline void lock_conv_r2a(int *lock_type, int *lock_type_tmp) @@ -1273,21 +1324,21 @@ static inline void lock_conv_r2a(int *lock_type, int *lock_type_tmp) static inline void win_attr_flavor_conv_a2r(int *attr, int *attr_tmp) { - switch (*attr) - { - /* keyval MPI_WIN_CREATE_FLAVOR */ - case A_MPI_WIN_FLAVOR_CREATE: - *attr_tmp = R_MPI_WIN_FLAVOR_CREATE; - case A_MPI_WIN_FLAVOR_ALLOCATE: - *attr_tmp = R_MPI_WIN_FLAVOR_ALLOCATE; - case A_MPI_WIN_FLAVOR_DYNAMIC : - *attr_tmp = R_MPI_WIN_FLAVOR_DYNAMIC; - case A_MPI_WIN_FLAVOR_SHARED : - *attr_tmp = R_MPI_WIN_FLAVOR_SHARED; - - default: /* in case this is an user's attribute or a non constant var (need to check the behavior)*/ - *attr_tmp = *attr; - } + switch (*attr) + { + /* keyval MPI_WIN_CREATE_FLAVOR */ + case A_MPI_WIN_FLAVOR_CREATE: + *attr_tmp = R_MPI_WIN_FLAVOR_CREATE; + case A_MPI_WIN_FLAVOR_ALLOCATE: + *attr_tmp = R_MPI_WIN_FLAVOR_ALLOCATE; + case A_MPI_WIN_FLAVOR_DYNAMIC : + *attr_tmp = R_MPI_WIN_FLAVOR_DYNAMIC; + case A_MPI_WIN_FLAVOR_SHARED : + *attr_tmp = R_MPI_WIN_FLAVOR_SHARED; + + default: /* in case this is an user's attribute or a non constant var (need to check the behavior)*/ + *attr_tmp = *attr; + } } static inline void win_attr_flavor_conv_r2a(int *attr, int *attr_tmp) @@ -1303,7 +1354,7 @@ static inline void win_attr_flavor_conv_r2a(int *attr, int *attr_tmp) *attr = A_MPI_WIN_FLAVOR_DYNAMIC; case R_MPI_WIN_FLAVOR_SHARED : *attr = A_MPI_WIN_FLAVOR_SHARED; - + default: /* in case this is an user's attribute or a non constant var (need to check the behavior)*/ *attr = *attr_tmp; } @@ -1311,24 +1362,24 @@ static inline void win_attr_flavor_conv_r2a(int *attr, int *attr_tmp) static inline void win_attr_model_conv_a2r(int *attr, int *attr_tmp) { - switch (*attr) - { - /* keyval MPI_WIN_MODEL */ - case A_MPI_WIN_UNIFIED : - *attr_tmp = R_MPI_WIN_UNIFIED; - case A_MPI_WIN_SEPARATE : - *attr_tmp = R_MPI_WIN_SEPARATE; - - default: /* in case this is an user's attribute or a non constant var (need to check the behavior)*/ - *attr_tmp = *attr; - } + switch (*attr) + { + /* keyval MPI_WIN_MODEL */ + case A_MPI_WIN_UNIFIED : + *attr_tmp = R_MPI_WIN_UNIFIED; + case A_MPI_WIN_SEPARATE : + *attr_tmp = R_MPI_WIN_SEPARATE; + + default: /* in case this is an user's attribute or a non constant var (need to check the behavior)*/ + *attr_tmp = *attr; + } } static inline void win_attr_model_conv_r2a(int *attr, int *attr_tmp) { switch (*attr_tmp) { - /* keyval MPI_WIN_MODEL */ + /* keyval MPI_WIN_MODEL */ case A_MPI_WIN_UNIFIED : *attr_tmp = R_MPI_WIN_UNIFIED; case A_MPI_WIN_SEPARATE : @@ -1343,66 +1394,66 @@ static inline void win_attr_model_conv_r2a(int *attr, int *attr_tmp) static inline void weight_conv_a2r(int ** buf,int** buf_tmp) { - if(*buf == (void*) A_MPI_UNWEIGHTED) - *buf_tmp= (void*) R_MPI_UNWEIGHTED; - - else if( *buf == (void*) A_MPI_WEIGHTS_EMPTY ) - *buf_tmp= (void*) R_MPI_WEIGHTS_EMPTY; - else - //memcpy(buf_tmp, buf, sizeof(void*)); - *buf_tmp=*buf; + if(*buf == (void*) A_MPI_UNWEIGHTED) + *buf_tmp= (void*) R_MPI_UNWEIGHTED; + + else if( *buf == (void*) A_MPI_WEIGHTS_EMPTY ) + *buf_tmp= (void*) R_MPI_WEIGHTS_EMPTY; + else + //memcpy(buf_tmp, buf, sizeof(void*)); + *buf_tmp=*buf; } static inline void weight_conv_r2a(int **buf_tmp, int **buf) { - if(*buf == (void*) R_MPI_UNWEIGHTED) - *buf= (void*) A_MPI_UNWEIGHTED; - - else if( *buf == (void*) R_MPI_WEIGHTS_EMPTY ) - *buf= (void*) A_MPI_WEIGHTS_EMPTY; - - else - //memcpy(buf_tmp, buf, sizeof(void*)); - *buf=*buf_tmp; + if(*buf == (void*) R_MPI_UNWEIGHTED) + *buf= (void*) A_MPI_UNWEIGHTED; + + else if( *buf == (void*) R_MPI_WEIGHTS_EMPTY ) + *buf= (void*) A_MPI_WEIGHTS_EMPTY; + + else + //memcpy(buf_tmp, buf, sizeof(void*)); + *buf=*buf_tmp; } /* Other */ /* -R_MPI_TYPECLASS_REAL -R_MPI_TYPECLASS_INTEGER -R_MPI_TYPECLASS_COMPLEX -*/ + R_MPI_TYPECLASS_REAL + R_MPI_TYPECLASS_INTEGER + R_MPI_TYPECLASS_COMPLEX + */ static inline void typeclass_conv_a2r(int *typeclass, int *typeclass_tmp) { - switch(*typeclass) - { - case A_MPI_TYPECLASS_REAL: - *typeclass_tmp= R_MPI_TYPECLASS_REAL; - break; - case A_MPI_TYPECLASS_INTEGER: - *typeclass_tmp= R_MPI_TYPECLASS_INTEGER; - break; - case A_MPI_TYPECLASS_COMPLEX: - *typeclass_tmp= R_MPI_TYPECLASS_COMPLEX; - break; - - } + switch(*typeclass) + { + case A_MPI_TYPECLASS_REAL: + *typeclass_tmp= R_MPI_TYPECLASS_REAL; + break; + case A_MPI_TYPECLASS_INTEGER: + *typeclass_tmp= R_MPI_TYPECLASS_INTEGER; + break; + case A_MPI_TYPECLASS_COMPLEX: + *typeclass_tmp= R_MPI_TYPECLASS_COMPLEX; + break; + + } } static inline void typeclass_conv_r2a(int *typeclass, int *typeclass_tmp) { - switch(*typeclass_tmp) - { - case R_MPI_TYPECLASS_REAL: - *typeclass= A_MPI_TYPECLASS_REAL; - break; - case R_MPI_TYPECLASS_INTEGER: - *typeclass= A_MPI_TYPECLASS_INTEGER; - break; - case R_MPI_TYPECLASS_COMPLEX: - *typeclass= A_MPI_TYPECLASS_COMPLEX; - break; - } + switch(*typeclass_tmp) + { + case R_MPI_TYPECLASS_REAL: + *typeclass= A_MPI_TYPECLASS_REAL; + break; + case R_MPI_TYPECLASS_INTEGER: + *typeclass= A_MPI_TYPECLASS_INTEGER; + break; + case R_MPI_TYPECLASS_COMPLEX: + *typeclass= A_MPI_TYPECLASS_COMPLEX; + break; + } } /* MPI_T */ @@ -1417,46 +1468,46 @@ gen_hash_conv(pvar_handle, MPI_T_pvar_handle, pvar_handle); /* Amode converter a2r - r2a */ static inline void amode_conv_a2r(int *amode, int *amode_tmp) { - if(*amode & A_MPI_MODE_RDONLY) - *amode_tmp |= R_MPI_MODE_RDONLY; - if(*amode & A_MPI_MODE_RDWR) - *amode_tmp |= R_MPI_MODE_RDWR; - if(*amode & A_MPI_MODE_WRONLY) - *amode_tmp |= R_MPI_MODE_WRONLY; - if(*amode & A_MPI_MODE_CREATE) - *amode_tmp |= R_MPI_MODE_CREATE; - if(*amode & A_MPI_MODE_EXCL) - *amode_tmp |= R_MPI_MODE_EXCL; - if(*amode & A_MPI_MODE_DELETE_ON_CLOSE) - *amode_tmp |= R_MPI_MODE_DELETE_ON_CLOSE; - if(*amode & A_MPI_MODE_UNIQUE_OPEN) - *amode_tmp |= R_MPI_MODE_UNIQUE_OPEN; - if(*amode & A_MPI_MODE_SEQUENTIAL) - *amode_tmp |= R_MPI_MODE_SEQUENTIAL; - if(*amode & A_MPI_MODE_APPEND) - *amode_tmp |= R_MPI_MODE_APPEND; + if(*amode & A_MPI_MODE_RDONLY) + *amode_tmp |= R_MPI_MODE_RDONLY; + if(*amode & A_MPI_MODE_RDWR) + *amode_tmp |= R_MPI_MODE_RDWR; + if(*amode & A_MPI_MODE_WRONLY) + *amode_tmp |= R_MPI_MODE_WRONLY; + if(*amode & A_MPI_MODE_CREATE) + *amode_tmp |= R_MPI_MODE_CREATE; + if(*amode & A_MPI_MODE_EXCL) + *amode_tmp |= R_MPI_MODE_EXCL; + if(*amode & A_MPI_MODE_DELETE_ON_CLOSE) + *amode_tmp |= R_MPI_MODE_DELETE_ON_CLOSE; + if(*amode & A_MPI_MODE_UNIQUE_OPEN) + *amode_tmp |= R_MPI_MODE_UNIQUE_OPEN; + if(*amode & A_MPI_MODE_SEQUENTIAL) + *amode_tmp |= R_MPI_MODE_SEQUENTIAL; + if(*amode & A_MPI_MODE_APPEND) + *amode_tmp |= R_MPI_MODE_APPEND; } static inline void amode_conv_r2a(int *amode, int *amode_tmp) { - if(*amode_tmp & A_MPI_MODE_RDONLY) - *amode |= R_MPI_MODE_RDONLY; - if(*amode_tmp & A_MPI_MODE_RDWR) - *amode |= R_MPI_MODE_RDWR; - if(*amode_tmp & A_MPI_MODE_WRONLY) - *amode |= R_MPI_MODE_WRONLY; - if(*amode_tmp & A_MPI_MODE_CREATE) - *amode |= R_MPI_MODE_CREATE; - if(*amode_tmp & A_MPI_MODE_EXCL) - *amode |= R_MPI_MODE_EXCL; - if(*amode_tmp & A_MPI_MODE_DELETE_ON_CLOSE) - *amode |= R_MPI_MODE_DELETE_ON_CLOSE; - if(*amode_tmp & A_MPI_MODE_UNIQUE_OPEN) - *amode |= R_MPI_MODE_UNIQUE_OPEN; - if(*amode_tmp & A_MPI_MODE_SEQUENTIAL) - *amode |= R_MPI_MODE_SEQUENTIAL; - if(*amode_tmp & A_MPI_MODE_APPEND) - *amode |= R_MPI_MODE_APPEND; + if(*amode_tmp & A_MPI_MODE_RDONLY) + *amode |= R_MPI_MODE_RDONLY; + if(*amode_tmp & A_MPI_MODE_RDWR) + *amode |= R_MPI_MODE_RDWR; + if(*amode_tmp & A_MPI_MODE_WRONLY) + *amode |= R_MPI_MODE_WRONLY; + if(*amode_tmp & A_MPI_MODE_CREATE) + *amode |= R_MPI_MODE_CREATE; + if(*amode_tmp & A_MPI_MODE_EXCL) + *amode |= R_MPI_MODE_EXCL; + if(*amode_tmp & A_MPI_MODE_DELETE_ON_CLOSE) + *amode |= R_MPI_MODE_DELETE_ON_CLOSE; + if(*amode_tmp & A_MPI_MODE_UNIQUE_OPEN) + *amode |= R_MPI_MODE_UNIQUE_OPEN; + if(*amode_tmp & A_MPI_MODE_SEQUENTIAL) + *amode |= R_MPI_MODE_SEQUENTIAL; + if(*amode_tmp & A_MPI_MODE_APPEND) + *amode |= R_MPI_MODE_APPEND; } /* File converter a2r - r2a */ @@ -1465,36 +1516,36 @@ gen_hash_conv(file,MPI_File,file); static inline void order_conv_a2r(int *order,int *order_tmp) { - if(A_MPI_ORDER_FORTRAN==*order) - { - *order_tmp=(int )R_MPI_ORDER_FORTRAN; - } - else if(A_MPI_ORDER_C==*order) - { - *order_tmp=(int )R_MPI_ORDER_C; - } + if(A_MPI_ORDER_FORTRAN==*order) + { + *order_tmp=(int )R_MPI_ORDER_FORTRAN; + } + else if(A_MPI_ORDER_C==*order) + { + *order_tmp=(int )R_MPI_ORDER_C; + } } static inline void order2_conv_a2r(int *order,int *order_tmp) { - if(A_MPI_DISTRIBUTE_DFLT_DARG==*order) - { - *order_tmp=(int )R_MPI_DISTRIBUTE_DFLT_DARG; - } - else if(A_MPI_DISTRIBUTE_BLOCK==*order) - { - *order_tmp=(int )R_MPI_DISTRIBUTE_BLOCK; - } - else if(A_MPI_DISTRIBUTE_CYCLIC==*order) - { - *order_tmp=(int )R_MPI_DISTRIBUTE_CYCLIC; - } - else if(A_MPI_DISTRIBUTE_NONE==*order) - { - *order_tmp=(int )R_MPI_DISTRIBUTE_NONE; - } - else - *order_tmp=*order; + if(A_MPI_DISTRIBUTE_DFLT_DARG==*order) + { + *order_tmp=(int )R_MPI_DISTRIBUTE_DFLT_DARG; + } + else if(A_MPI_DISTRIBUTE_BLOCK==*order) + { + *order_tmp=(int )R_MPI_DISTRIBUTE_BLOCK; + } + else if(A_MPI_DISTRIBUTE_CYCLIC==*order) + { + *order_tmp=(int )R_MPI_DISTRIBUTE_CYCLIC; + } + else if(A_MPI_DISTRIBUTE_NONE==*order) + { + *order_tmp=(int )R_MPI_DISTRIBUTE_NONE; + } + else + *order_tmp=*order; } #endif /*MAPPERS_HEADERS */ From 109ca79045dee1c97c312fe70077061f346d3faf Mon Sep 17 00:00:00 2001 From: Clement FONTENAILLE Date: Wed, 27 Sep 2023 18:36:45 +0200 Subject: [PATCH 2/3] clang-formatted fortran wrapper headers for preload --- src/preload/header/INTEL_INTEL/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/INTEL_MPICH/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/INTEL_OMPI/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/MPICH_INTEL/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/MPICH_MPICH/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/MPICH_OMPI/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/OMPI_INTEL/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/OMPI_MPICH/wrapper_f.h | 3041 ++++++++++---------- src/preload/header/OMPI_OMPI/wrapper_f.h | 3041 ++++++++++---------- 9 files changed, 14346 insertions(+), 13023 deletions(-) diff --git a/src/preload/header/INTEL_INTEL/wrapper_f.h b/src/preload/header/INTEL_INTEL/wrapper_f.h index 5ed3434..d89db48 100644 --- a/src/preload/header/INTEL_INTEL/wrapper_f.h +++ b/src/preload/header/INTEL_INTEL/wrapper_f.h @@ -1,31 +1,31 @@ -#define A_f_MPI_UNWEIGHTED (((int*)&mpifcmb5_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpifcmb5_)) int mpifcmb5_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpifcmb9_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpifcmb9_)) int mpifcmb9_; -#define A_f_MPI_BOTTOM (((int*)&mpipriv1_[0])) -#define A_f_MPI_IN_PLACE (((int*)&mpipriv1_[1])) -#define A_f_MPI_STATUS_IGNORE (((int*)&mpipriv1_[2])) +#define A_f_MPI_BOTTOM (((int *)&mpipriv1_[0])) +#define A_f_MPI_IN_PLACE (((int *)&mpipriv1_[1])) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpipriv1_[2])) int mpipriv1_[3]; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpipriv2_[0])) -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpipriv2_[1])) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpipriv2_[0])) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpipriv2_[1])) int mpipriv2_[2]; -#define A_f_MPI_ARGVS_NULL (((int*)&mpiprivc_[0])) -#define A_f_MPI_ARGV_NULL (((int*)&mpiprivc_[1])) +#define A_f_MPI_ARGVS_NULL (((int *)&mpiprivc_[0])) +#define A_f_MPI_ARGV_NULL (((int *)&mpiprivc_[1])) int mpiprivc_[2]; int *ptr_mpifcmb5_; -#define R_f_MPI_UNWEIGHTED (((int*)ptr_mpifcmb5_)) +#define R_f_MPI_UNWEIGHTED (((int *)ptr_mpifcmb5_)) int *ptr_mpifcmb9_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)ptr_mpifcmb9_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)ptr_mpifcmb9_)) extern int *ptr_mpipriv1_; -#define R_f_MPI_BOTTOM (((int*)ptr_mpipriv1_[0])) -#define R_f_MPI_IN_PLACE (((int*)ptr_mpipriv1_[1])) -#define R_f_MPI_STATUS_IGNORE (((int*)ptr_mpipriv1_[2])) +#define R_f_MPI_BOTTOM (((int *)ptr_mpipriv1_[0])) +#define R_f_MPI_IN_PLACE (((int *)ptr_mpipriv1_[1])) +#define R_f_MPI_STATUS_IGNORE (((int *)ptr_mpipriv1_[2])) extern int *ptr_mpipriv2_; -#define R_f_MPI_STATUSES_IGNORE (((int*)ptr_mpipriv2_[0])) -#define R_f_MPI_ERRCODES_IGNORE (((int*)ptr_mpipriv2_[1])) +#define R_f_MPI_STATUSES_IGNORE (((int *)ptr_mpipriv2_[0])) +#define R_f_MPI_ERRCODES_IGNORE (((int *)ptr_mpipriv2_[1])) extern int *ptr_mpiprivc_; -#define R_f_MPI_ARGVS_NULL (((int*)ptr_mpiprivc_[0])) -#define R_f_MPI_ARGV_NULL (((int*)ptr_mpiprivc_[1])) +#define R_f_MPI_ARGVS_NULL (((int *)ptr_mpiprivc_[0])) +#define R_f_MPI_ARGV_NULL (((int *)ptr_mpiprivc_[1])) //############################# Wi4MPI License ########################### //# `04/04/2016` # //# Copyright or (C) or Copr. Commissariat a l'Energie Atomique # @@ -60,44 +60,48 @@ extern int *ptr_mpiprivc_; #define R_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_WIN 45 @@ -315,503 +319,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_IO 32 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2REAL 1275070497 @@ -893,197 +952,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_OP_NULL 402653184 @@ -1137,136 +1217,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_SUM 1476395011 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1276,88 +1370,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 738197504 #define R_f_MPI_REQUEST_NULL 738197504 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1207959552 @@ -1367,35 +1468,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 134217728 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define A_f_MPI_ERRORS_RETURN 1409286145 @@ -1409,44 +1513,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_GRAPH 1 @@ -1460,31 +1568,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_OP_NULL 402653184 @@ -1538,144 +1647,153 @@ else #define R_f_MPI_SUM 1476395011 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define A_f_MPI_ERRORS_RETURN 1409286145 #define R_f_MPI_ERRORS_RETURN 1409286145 @@ -1688,44 +1806,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_WIN_SIZE 1711276036 @@ -1771,116 +1893,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1890,50 +2024,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 469762048 #define R_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 57 @@ -1943,25 +2080,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define A_f_MPI_DISTRIBUTE_DFLT_DARG -49767 @@ -1979,37 +2117,38 @@ else #define R_f_MPI_DISTRIBUTE_NONE 123 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 234 @@ -2019,50 +2158,53 @@ else #define R_f_MPI_LOCK_SHARED 235 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 536870912 #define R_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NULL 738197504 @@ -2072,70 +2214,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NO_PROC 1811939328 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 5 - #define A_f_MPI_SOURCE 3 - #define A_f_MPI_TAG 4 - #define A_f_MPI_ERROR 5 - - #define R_f_MPI_STATUS_SIZE 5 - #define R_f_MPI_SOURCE 3 - #define R_f_MPI_TAG 4 - #define R_f_MPI_ERROR 5 +#define A_f_MPI_STATUS_SIZE 5 +#define A_f_MPI_SOURCE 3 +#define A_f_MPI_TAG 4 +#define A_f_MPI_ERROR 5 + +#define R_f_MPI_STATUS_SIZE 5 +#define R_f_MPI_SOURCE 3 +#define R_f_MPI_TAG 4 +#define R_f_MPI_ERROR 5 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/INTEL_MPICH/wrapper_f.h b/src/preload/header/INTEL_MPICH/wrapper_f.h index 5ed3434..d89db48 100644 --- a/src/preload/header/INTEL_MPICH/wrapper_f.h +++ b/src/preload/header/INTEL_MPICH/wrapper_f.h @@ -1,31 +1,31 @@ -#define A_f_MPI_UNWEIGHTED (((int*)&mpifcmb5_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpifcmb5_)) int mpifcmb5_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpifcmb9_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpifcmb9_)) int mpifcmb9_; -#define A_f_MPI_BOTTOM (((int*)&mpipriv1_[0])) -#define A_f_MPI_IN_PLACE (((int*)&mpipriv1_[1])) -#define A_f_MPI_STATUS_IGNORE (((int*)&mpipriv1_[2])) +#define A_f_MPI_BOTTOM (((int *)&mpipriv1_[0])) +#define A_f_MPI_IN_PLACE (((int *)&mpipriv1_[1])) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpipriv1_[2])) int mpipriv1_[3]; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpipriv2_[0])) -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpipriv2_[1])) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpipriv2_[0])) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpipriv2_[1])) int mpipriv2_[2]; -#define A_f_MPI_ARGVS_NULL (((int*)&mpiprivc_[0])) -#define A_f_MPI_ARGV_NULL (((int*)&mpiprivc_[1])) +#define A_f_MPI_ARGVS_NULL (((int *)&mpiprivc_[0])) +#define A_f_MPI_ARGV_NULL (((int *)&mpiprivc_[1])) int mpiprivc_[2]; int *ptr_mpifcmb5_; -#define R_f_MPI_UNWEIGHTED (((int*)ptr_mpifcmb5_)) +#define R_f_MPI_UNWEIGHTED (((int *)ptr_mpifcmb5_)) int *ptr_mpifcmb9_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)ptr_mpifcmb9_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)ptr_mpifcmb9_)) extern int *ptr_mpipriv1_; -#define R_f_MPI_BOTTOM (((int*)ptr_mpipriv1_[0])) -#define R_f_MPI_IN_PLACE (((int*)ptr_mpipriv1_[1])) -#define R_f_MPI_STATUS_IGNORE (((int*)ptr_mpipriv1_[2])) +#define R_f_MPI_BOTTOM (((int *)ptr_mpipriv1_[0])) +#define R_f_MPI_IN_PLACE (((int *)ptr_mpipriv1_[1])) +#define R_f_MPI_STATUS_IGNORE (((int *)ptr_mpipriv1_[2])) extern int *ptr_mpipriv2_; -#define R_f_MPI_STATUSES_IGNORE (((int*)ptr_mpipriv2_[0])) -#define R_f_MPI_ERRCODES_IGNORE (((int*)ptr_mpipriv2_[1])) +#define R_f_MPI_STATUSES_IGNORE (((int *)ptr_mpipriv2_[0])) +#define R_f_MPI_ERRCODES_IGNORE (((int *)ptr_mpipriv2_[1])) extern int *ptr_mpiprivc_; -#define R_f_MPI_ARGVS_NULL (((int*)ptr_mpiprivc_[0])) -#define R_f_MPI_ARGV_NULL (((int*)ptr_mpiprivc_[1])) +#define R_f_MPI_ARGVS_NULL (((int *)ptr_mpiprivc_[0])) +#define R_f_MPI_ARGV_NULL (((int *)ptr_mpiprivc_[1])) //############################# Wi4MPI License ########################### //# `04/04/2016` # //# Copyright or (C) or Copr. Commissariat a l'Energie Atomique # @@ -60,44 +60,48 @@ extern int *ptr_mpiprivc_; #define R_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_WIN 45 @@ -315,503 +319,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_IO 32 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2REAL 1275070497 @@ -893,197 +952,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_OP_NULL 402653184 @@ -1137,136 +1217,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_SUM 1476395011 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1276,88 +1370,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 738197504 #define R_f_MPI_REQUEST_NULL 738197504 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1207959552 @@ -1367,35 +1468,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 134217728 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define A_f_MPI_ERRORS_RETURN 1409286145 @@ -1409,44 +1513,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_GRAPH 1 @@ -1460,31 +1568,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_OP_NULL 402653184 @@ -1538,144 +1647,153 @@ else #define R_f_MPI_SUM 1476395011 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define A_f_MPI_ERRORS_RETURN 1409286145 #define R_f_MPI_ERRORS_RETURN 1409286145 @@ -1688,44 +1806,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_WIN_SIZE 1711276036 @@ -1771,116 +1893,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1890,50 +2024,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 469762048 #define R_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 57 @@ -1943,25 +2080,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define A_f_MPI_DISTRIBUTE_DFLT_DARG -49767 @@ -1979,37 +2117,38 @@ else #define R_f_MPI_DISTRIBUTE_NONE 123 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 234 @@ -2019,50 +2158,53 @@ else #define R_f_MPI_LOCK_SHARED 235 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 536870912 #define R_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NULL 738197504 @@ -2072,70 +2214,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NO_PROC 1811939328 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 5 - #define A_f_MPI_SOURCE 3 - #define A_f_MPI_TAG 4 - #define A_f_MPI_ERROR 5 - - #define R_f_MPI_STATUS_SIZE 5 - #define R_f_MPI_SOURCE 3 - #define R_f_MPI_TAG 4 - #define R_f_MPI_ERROR 5 +#define A_f_MPI_STATUS_SIZE 5 +#define A_f_MPI_SOURCE 3 +#define A_f_MPI_TAG 4 +#define A_f_MPI_ERROR 5 + +#define R_f_MPI_STATUS_SIZE 5 +#define R_f_MPI_SOURCE 3 +#define R_f_MPI_TAG 4 +#define R_f_MPI_ERROR 5 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/INTEL_OMPI/wrapper_f.h b/src/preload/header/INTEL_OMPI/wrapper_f.h index d48ff3b..fadef41 100644 --- a/src/preload/header/INTEL_OMPI/wrapper_f.h +++ b/src/preload/header/INTEL_OMPI/wrapper_f.h @@ -1,34 +1,34 @@ -#define A_f_MPI_UNWEIGHTED (((int*)&mpifcmb5_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpifcmb5_)) int mpifcmb5_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpifcmb9_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpifcmb9_)) int mpifcmb9_; -#define A_f_MPI_BOTTOM (((int*)&mpipriv1_[0])) -#define A_f_MPI_IN_PLACE (((int*)&mpipriv1_[1])) -#define A_f_MPI_STATUS_IGNORE (((int*)&mpipriv1_[2])) +#define A_f_MPI_BOTTOM (((int *)&mpipriv1_[0])) +#define A_f_MPI_IN_PLACE (((int *)&mpipriv1_[1])) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpipriv1_[2])) int mpipriv1_[3]; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpipriv2_[0])) -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpipriv2_[1])) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpipriv2_[0])) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpipriv2_[1])) int mpipriv2_[2]; -#define A_f_MPI_ARGVS_NULL (((int*)&mpiprivc_[0])) -#define A_f_MPI_ARGV_NULL (((int*)&mpiprivc_[1])) +#define A_f_MPI_ARGVS_NULL (((int *)&mpiprivc_[0])) +#define A_f_MPI_ARGV_NULL (((int *)&mpiprivc_[1])) int mpiprivc_[2]; -#define R_f_MPI_BOTTOM (((int*)&mpi_fortran_bottom_)) +#define R_f_MPI_BOTTOM (((int *)&mpi_fortran_bottom_)) extern int mpi_fortran_bottom_; -#define R_f_MPI_IN_PLACE (((int*)&mpi_fortran_in_place_)) +#define R_f_MPI_IN_PLACE (((int *)&mpi_fortran_in_place_)) extern int mpi_fortran_in_place_; -#define R_f_MPI_ARGV_NULL (((int*)&mpi_fortran_argv_null_)) +#define R_f_MPI_ARGV_NULL (((int *)&mpi_fortran_argv_null_)) extern int mpi_fortran_argv_null_; -#define R_f_MPI_ARGVS_NULL (((int*)&mpi_fortran_argvs_null_)) +#define R_f_MPI_ARGVS_NULL (((int *)&mpi_fortran_argvs_null_)) extern int mpi_fortran_argvs_null_; -#define R_f_MPI_ERRCODES_IGNORE (((int*)&mpi_fortran_errcodes_ignore_)) +#define R_f_MPI_ERRCODES_IGNORE (((int *)&mpi_fortran_errcodes_ignore_)) extern int mpi_fortran_errcodes_ignore_; -#define R_f_MPI_STATUS_IGNORE (((int*)&mpi_fortran_status_ignore_)) +#define R_f_MPI_STATUS_IGNORE (((int *)&mpi_fortran_status_ignore_)) extern int mpi_fortran_status_ignore_; -#define R_f_MPI_STATUSES_IGNORE (((int*)&mpi_fortran_statuses_ignore_)) +#define R_f_MPI_STATUSES_IGNORE (((int *)&mpi_fortran_statuses_ignore_)) extern int mpi_fortran_statuses_ignore_; -#define R_f_MPI_UNWEIGHTED (((int*)&mpi_fortran_unweighted_)) +#define R_f_MPI_UNWEIGHTED (((int *)&mpi_fortran_unweighted_)) extern int mpi_fortran_unweighted_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)&mpi_fortran_weights_empty_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)&mpi_fortran_weights_empty_)) extern int mpi_fortran_weights_empty_; //############################# Wi4MPI License ########################### //# `04/04/2016` # @@ -64,44 +64,48 @@ extern int mpi_fortran_weights_empty_; #define A_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_WIN 45 @@ -319,503 +323,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_INFO_NOKEY 32 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2REAL 1275070497 @@ -897,197 +956,218 @@ error_translation_update_f(*cr,ca); #define A_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_MAX 1476395009 @@ -1141,136 +1221,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_MINLOC 12 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1280,88 +1374,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_PROC_NULL -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 738197504 #define R_f_MPI_REQUEST_NULL 0 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define R_f_MPI_GROUP_EMPTY 1 @@ -1371,35 +1472,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 0 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define R_f_MPI_ERRORS_ARE_FATAL 1 @@ -1413,44 +1517,48 @@ group_translation_update_f(*cr,ca); #define A_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_GRAPH 1 @@ -1464,31 +1572,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_MAX 1476395009 @@ -1542,144 +1651,153 @@ else #define R_f_MPI_MINLOC 12 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define R_f_MPI_ERRORS_ARE_FATAL 1 #define R_f_MPI_ERRHANDLER_NULL 0 @@ -1692,44 +1810,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define A_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define R_f_MPI_HOST 1 @@ -1775,116 +1897,128 @@ errhandler_translation_update_f(*cr,ca); #define A_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1894,50 +2028,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_PROC_NULL -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define R_f_MPI_INFO_NULL 0 #define A_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define R_f_MPI_ORDER_FORTRAN 1 @@ -1947,25 +2084,26 @@ info_translation_update_f(*cr,ca); #define A_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define R_f_MPI_DISTRIBUTE_BLOCK 0 @@ -1983,37 +2121,38 @@ else #define R_f_MPI_DISTRIBUTE_NONE 2 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 234 @@ -2023,50 +2162,53 @@ else #define R_f_MPI_LOCK_EXCLUSIVE 1 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else + *ca = *cr; } #define R_f_MPI_WIN_NULL 0 #define A_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define R_f_MPI_MESSAGE_NO_PROC 1 @@ -2076,70 +2218,75 @@ win_translation_update_f(*cr,ca); #define A_f_MPI_MESSAGE_NO_PROC 1811939328 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 5 - #define A_f_MPI_SOURCE 3 - #define A_f_MPI_TAG 4 - #define A_f_MPI_ERROR 5 - - #define R_f_MPI_STATUS_SIZE 6 - #define R_f_MPI_SOURCE 1 - #define R_f_MPI_TAG 2 - #define R_f_MPI_ERROR 3 +#define A_f_MPI_STATUS_SIZE 5 +#define A_f_MPI_SOURCE 3 +#define A_f_MPI_TAG 4 +#define A_f_MPI_ERROR 5 + +#define R_f_MPI_STATUS_SIZE 6 +#define R_f_MPI_SOURCE 1 +#define R_f_MPI_TAG 2 +#define R_f_MPI_ERROR 3 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/MPICH_INTEL/wrapper_f.h b/src/preload/header/MPICH_INTEL/wrapper_f.h index 5ed3434..d89db48 100644 --- a/src/preload/header/MPICH_INTEL/wrapper_f.h +++ b/src/preload/header/MPICH_INTEL/wrapper_f.h @@ -1,31 +1,31 @@ -#define A_f_MPI_UNWEIGHTED (((int*)&mpifcmb5_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpifcmb5_)) int mpifcmb5_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpifcmb9_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpifcmb9_)) int mpifcmb9_; -#define A_f_MPI_BOTTOM (((int*)&mpipriv1_[0])) -#define A_f_MPI_IN_PLACE (((int*)&mpipriv1_[1])) -#define A_f_MPI_STATUS_IGNORE (((int*)&mpipriv1_[2])) +#define A_f_MPI_BOTTOM (((int *)&mpipriv1_[0])) +#define A_f_MPI_IN_PLACE (((int *)&mpipriv1_[1])) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpipriv1_[2])) int mpipriv1_[3]; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpipriv2_[0])) -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpipriv2_[1])) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpipriv2_[0])) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpipriv2_[1])) int mpipriv2_[2]; -#define A_f_MPI_ARGVS_NULL (((int*)&mpiprivc_[0])) -#define A_f_MPI_ARGV_NULL (((int*)&mpiprivc_[1])) +#define A_f_MPI_ARGVS_NULL (((int *)&mpiprivc_[0])) +#define A_f_MPI_ARGV_NULL (((int *)&mpiprivc_[1])) int mpiprivc_[2]; int *ptr_mpifcmb5_; -#define R_f_MPI_UNWEIGHTED (((int*)ptr_mpifcmb5_)) +#define R_f_MPI_UNWEIGHTED (((int *)ptr_mpifcmb5_)) int *ptr_mpifcmb9_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)ptr_mpifcmb9_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)ptr_mpifcmb9_)) extern int *ptr_mpipriv1_; -#define R_f_MPI_BOTTOM (((int*)ptr_mpipriv1_[0])) -#define R_f_MPI_IN_PLACE (((int*)ptr_mpipriv1_[1])) -#define R_f_MPI_STATUS_IGNORE (((int*)ptr_mpipriv1_[2])) +#define R_f_MPI_BOTTOM (((int *)ptr_mpipriv1_[0])) +#define R_f_MPI_IN_PLACE (((int *)ptr_mpipriv1_[1])) +#define R_f_MPI_STATUS_IGNORE (((int *)ptr_mpipriv1_[2])) extern int *ptr_mpipriv2_; -#define R_f_MPI_STATUSES_IGNORE (((int*)ptr_mpipriv2_[0])) -#define R_f_MPI_ERRCODES_IGNORE (((int*)ptr_mpipriv2_[1])) +#define R_f_MPI_STATUSES_IGNORE (((int *)ptr_mpipriv2_[0])) +#define R_f_MPI_ERRCODES_IGNORE (((int *)ptr_mpipriv2_[1])) extern int *ptr_mpiprivc_; -#define R_f_MPI_ARGVS_NULL (((int*)ptr_mpiprivc_[0])) -#define R_f_MPI_ARGV_NULL (((int*)ptr_mpiprivc_[1])) +#define R_f_MPI_ARGVS_NULL (((int *)ptr_mpiprivc_[0])) +#define R_f_MPI_ARGV_NULL (((int *)ptr_mpiprivc_[1])) //############################# Wi4MPI License ########################### //# `04/04/2016` # //# Copyright or (C) or Copr. Commissariat a l'Energie Atomique # @@ -60,44 +60,48 @@ extern int *ptr_mpiprivc_; #define R_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_WIN 45 @@ -315,503 +319,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_IO 32 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2REAL 1275070497 @@ -893,197 +952,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_OP_NULL 402653184 @@ -1137,136 +1217,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_SUM 1476395011 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1276,88 +1370,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 738197504 #define R_f_MPI_REQUEST_NULL 738197504 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1207959552 @@ -1367,35 +1468,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 134217728 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define A_f_MPI_ERRORS_RETURN 1409286145 @@ -1409,44 +1513,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_GRAPH 1 @@ -1460,31 +1568,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_OP_NULL 402653184 @@ -1538,144 +1647,153 @@ else #define R_f_MPI_SUM 1476395011 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define A_f_MPI_ERRORS_RETURN 1409286145 #define R_f_MPI_ERRORS_RETURN 1409286145 @@ -1688,44 +1806,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_WIN_SIZE 1711276036 @@ -1771,116 +1893,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1890,50 +2024,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 469762048 #define R_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 57 @@ -1943,25 +2080,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define A_f_MPI_DISTRIBUTE_DFLT_DARG -49767 @@ -1979,37 +2117,38 @@ else #define R_f_MPI_DISTRIBUTE_NONE 123 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 234 @@ -2019,50 +2158,53 @@ else #define R_f_MPI_LOCK_SHARED 235 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 536870912 #define R_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NULL 738197504 @@ -2072,70 +2214,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NO_PROC 1811939328 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 5 - #define A_f_MPI_SOURCE 3 - #define A_f_MPI_TAG 4 - #define A_f_MPI_ERROR 5 - - #define R_f_MPI_STATUS_SIZE 5 - #define R_f_MPI_SOURCE 3 - #define R_f_MPI_TAG 4 - #define R_f_MPI_ERROR 5 +#define A_f_MPI_STATUS_SIZE 5 +#define A_f_MPI_SOURCE 3 +#define A_f_MPI_TAG 4 +#define A_f_MPI_ERROR 5 + +#define R_f_MPI_STATUS_SIZE 5 +#define R_f_MPI_SOURCE 3 +#define R_f_MPI_TAG 4 +#define R_f_MPI_ERROR 5 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/MPICH_MPICH/wrapper_f.h b/src/preload/header/MPICH_MPICH/wrapper_f.h index 5ed3434..d89db48 100644 --- a/src/preload/header/MPICH_MPICH/wrapper_f.h +++ b/src/preload/header/MPICH_MPICH/wrapper_f.h @@ -1,31 +1,31 @@ -#define A_f_MPI_UNWEIGHTED (((int*)&mpifcmb5_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpifcmb5_)) int mpifcmb5_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpifcmb9_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpifcmb9_)) int mpifcmb9_; -#define A_f_MPI_BOTTOM (((int*)&mpipriv1_[0])) -#define A_f_MPI_IN_PLACE (((int*)&mpipriv1_[1])) -#define A_f_MPI_STATUS_IGNORE (((int*)&mpipriv1_[2])) +#define A_f_MPI_BOTTOM (((int *)&mpipriv1_[0])) +#define A_f_MPI_IN_PLACE (((int *)&mpipriv1_[1])) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpipriv1_[2])) int mpipriv1_[3]; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpipriv2_[0])) -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpipriv2_[1])) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpipriv2_[0])) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpipriv2_[1])) int mpipriv2_[2]; -#define A_f_MPI_ARGVS_NULL (((int*)&mpiprivc_[0])) -#define A_f_MPI_ARGV_NULL (((int*)&mpiprivc_[1])) +#define A_f_MPI_ARGVS_NULL (((int *)&mpiprivc_[0])) +#define A_f_MPI_ARGV_NULL (((int *)&mpiprivc_[1])) int mpiprivc_[2]; int *ptr_mpifcmb5_; -#define R_f_MPI_UNWEIGHTED (((int*)ptr_mpifcmb5_)) +#define R_f_MPI_UNWEIGHTED (((int *)ptr_mpifcmb5_)) int *ptr_mpifcmb9_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)ptr_mpifcmb9_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)ptr_mpifcmb9_)) extern int *ptr_mpipriv1_; -#define R_f_MPI_BOTTOM (((int*)ptr_mpipriv1_[0])) -#define R_f_MPI_IN_PLACE (((int*)ptr_mpipriv1_[1])) -#define R_f_MPI_STATUS_IGNORE (((int*)ptr_mpipriv1_[2])) +#define R_f_MPI_BOTTOM (((int *)ptr_mpipriv1_[0])) +#define R_f_MPI_IN_PLACE (((int *)ptr_mpipriv1_[1])) +#define R_f_MPI_STATUS_IGNORE (((int *)ptr_mpipriv1_[2])) extern int *ptr_mpipriv2_; -#define R_f_MPI_STATUSES_IGNORE (((int*)ptr_mpipriv2_[0])) -#define R_f_MPI_ERRCODES_IGNORE (((int*)ptr_mpipriv2_[1])) +#define R_f_MPI_STATUSES_IGNORE (((int *)ptr_mpipriv2_[0])) +#define R_f_MPI_ERRCODES_IGNORE (((int *)ptr_mpipriv2_[1])) extern int *ptr_mpiprivc_; -#define R_f_MPI_ARGVS_NULL (((int*)ptr_mpiprivc_[0])) -#define R_f_MPI_ARGV_NULL (((int*)ptr_mpiprivc_[1])) +#define R_f_MPI_ARGVS_NULL (((int *)ptr_mpiprivc_[0])) +#define R_f_MPI_ARGV_NULL (((int *)ptr_mpiprivc_[1])) //############################# Wi4MPI License ########################### //# `04/04/2016` # //# Copyright or (C) or Copr. Commissariat a l'Energie Atomique # @@ -60,44 +60,48 @@ extern int *ptr_mpiprivc_; #define R_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_WIN 45 @@ -315,503 +319,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_IO 32 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2REAL 1275070497 @@ -893,197 +952,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_OP_NULL 402653184 @@ -1137,136 +1217,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_SUM 1476395011 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1276,88 +1370,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 738197504 #define R_f_MPI_REQUEST_NULL 738197504 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1207959552 @@ -1367,35 +1468,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 134217728 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define A_f_MPI_ERRORS_RETURN 1409286145 @@ -1409,44 +1513,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_GRAPH 1 @@ -1460,31 +1568,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_OP_NULL 402653184 @@ -1538,144 +1647,153 @@ else #define R_f_MPI_SUM 1476395011 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define A_f_MPI_ERRORS_RETURN 1409286145 #define R_f_MPI_ERRORS_RETURN 1409286145 @@ -1688,44 +1806,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_WIN_SIZE 1711276036 @@ -1771,116 +1893,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1890,50 +2024,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 469762048 #define R_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 57 @@ -1943,25 +2080,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define A_f_MPI_DISTRIBUTE_DFLT_DARG -49767 @@ -1979,37 +2117,38 @@ else #define R_f_MPI_DISTRIBUTE_NONE 123 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 234 @@ -2019,50 +2158,53 @@ else #define R_f_MPI_LOCK_SHARED 235 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 536870912 #define R_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NULL 738197504 @@ -2072,70 +2214,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NO_PROC 1811939328 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 5 - #define A_f_MPI_SOURCE 3 - #define A_f_MPI_TAG 4 - #define A_f_MPI_ERROR 5 - - #define R_f_MPI_STATUS_SIZE 5 - #define R_f_MPI_SOURCE 3 - #define R_f_MPI_TAG 4 - #define R_f_MPI_ERROR 5 +#define A_f_MPI_STATUS_SIZE 5 +#define A_f_MPI_SOURCE 3 +#define A_f_MPI_TAG 4 +#define A_f_MPI_ERROR 5 + +#define R_f_MPI_STATUS_SIZE 5 +#define R_f_MPI_SOURCE 3 +#define R_f_MPI_TAG 4 +#define R_f_MPI_ERROR 5 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/MPICH_OMPI/wrapper_f.h b/src/preload/header/MPICH_OMPI/wrapper_f.h index d48ff3b..fadef41 100644 --- a/src/preload/header/MPICH_OMPI/wrapper_f.h +++ b/src/preload/header/MPICH_OMPI/wrapper_f.h @@ -1,34 +1,34 @@ -#define A_f_MPI_UNWEIGHTED (((int*)&mpifcmb5_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpifcmb5_)) int mpifcmb5_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpifcmb9_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpifcmb9_)) int mpifcmb9_; -#define A_f_MPI_BOTTOM (((int*)&mpipriv1_[0])) -#define A_f_MPI_IN_PLACE (((int*)&mpipriv1_[1])) -#define A_f_MPI_STATUS_IGNORE (((int*)&mpipriv1_[2])) +#define A_f_MPI_BOTTOM (((int *)&mpipriv1_[0])) +#define A_f_MPI_IN_PLACE (((int *)&mpipriv1_[1])) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpipriv1_[2])) int mpipriv1_[3]; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpipriv2_[0])) -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpipriv2_[1])) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpipriv2_[0])) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpipriv2_[1])) int mpipriv2_[2]; -#define A_f_MPI_ARGVS_NULL (((int*)&mpiprivc_[0])) -#define A_f_MPI_ARGV_NULL (((int*)&mpiprivc_[1])) +#define A_f_MPI_ARGVS_NULL (((int *)&mpiprivc_[0])) +#define A_f_MPI_ARGV_NULL (((int *)&mpiprivc_[1])) int mpiprivc_[2]; -#define R_f_MPI_BOTTOM (((int*)&mpi_fortran_bottom_)) +#define R_f_MPI_BOTTOM (((int *)&mpi_fortran_bottom_)) extern int mpi_fortran_bottom_; -#define R_f_MPI_IN_PLACE (((int*)&mpi_fortran_in_place_)) +#define R_f_MPI_IN_PLACE (((int *)&mpi_fortran_in_place_)) extern int mpi_fortran_in_place_; -#define R_f_MPI_ARGV_NULL (((int*)&mpi_fortran_argv_null_)) +#define R_f_MPI_ARGV_NULL (((int *)&mpi_fortran_argv_null_)) extern int mpi_fortran_argv_null_; -#define R_f_MPI_ARGVS_NULL (((int*)&mpi_fortran_argvs_null_)) +#define R_f_MPI_ARGVS_NULL (((int *)&mpi_fortran_argvs_null_)) extern int mpi_fortran_argvs_null_; -#define R_f_MPI_ERRCODES_IGNORE (((int*)&mpi_fortran_errcodes_ignore_)) +#define R_f_MPI_ERRCODES_IGNORE (((int *)&mpi_fortran_errcodes_ignore_)) extern int mpi_fortran_errcodes_ignore_; -#define R_f_MPI_STATUS_IGNORE (((int*)&mpi_fortran_status_ignore_)) +#define R_f_MPI_STATUS_IGNORE (((int *)&mpi_fortran_status_ignore_)) extern int mpi_fortran_status_ignore_; -#define R_f_MPI_STATUSES_IGNORE (((int*)&mpi_fortran_statuses_ignore_)) +#define R_f_MPI_STATUSES_IGNORE (((int *)&mpi_fortran_statuses_ignore_)) extern int mpi_fortran_statuses_ignore_; -#define R_f_MPI_UNWEIGHTED (((int*)&mpi_fortran_unweighted_)) +#define R_f_MPI_UNWEIGHTED (((int *)&mpi_fortran_unweighted_)) extern int mpi_fortran_unweighted_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)&mpi_fortran_weights_empty_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)&mpi_fortran_weights_empty_)) extern int mpi_fortran_weights_empty_; //############################# Wi4MPI License ########################### //# `04/04/2016` # @@ -64,44 +64,48 @@ extern int mpi_fortran_weights_empty_; #define A_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_WIN 45 @@ -319,503 +323,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_INFO_NOKEY 32 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2REAL 1275070497 @@ -897,197 +956,218 @@ error_translation_update_f(*cr,ca); #define A_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_MAX 1476395009 @@ -1141,136 +1221,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_MINLOC 12 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1280,88 +1374,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_PROC_NULL -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 738197504 #define R_f_MPI_REQUEST_NULL 0 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define R_f_MPI_GROUP_EMPTY 1 @@ -1371,35 +1472,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 0 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define R_f_MPI_ERRORS_ARE_FATAL 1 @@ -1413,44 +1517,48 @@ group_translation_update_f(*cr,ca); #define A_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_GRAPH 1 @@ -1464,31 +1572,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_MAX 1476395009 @@ -1542,144 +1651,153 @@ else #define R_f_MPI_MINLOC 12 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define R_f_MPI_ERRORS_ARE_FATAL 1 #define R_f_MPI_ERRHANDLER_NULL 0 @@ -1692,44 +1810,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define A_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define R_f_MPI_HOST 1 @@ -1775,116 +1897,128 @@ errhandler_translation_update_f(*cr,ca); #define A_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_PROC_NULL -1 @@ -1894,50 +2028,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_PROC_NULL -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define R_f_MPI_INFO_NULL 0 #define A_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define R_f_MPI_ORDER_FORTRAN 1 @@ -1947,25 +2084,26 @@ info_translation_update_f(*cr,ca); #define A_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define R_f_MPI_DISTRIBUTE_BLOCK 0 @@ -1983,37 +2121,38 @@ else #define R_f_MPI_DISTRIBUTE_NONE 2 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 234 @@ -2023,50 +2162,53 @@ else #define R_f_MPI_LOCK_EXCLUSIVE 1 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else + *ca = *cr; } #define R_f_MPI_WIN_NULL 0 #define A_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define R_f_MPI_MESSAGE_NO_PROC 1 @@ -2076,70 +2218,75 @@ win_translation_update_f(*cr,ca); #define A_f_MPI_MESSAGE_NO_PROC 1811939328 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 5 - #define A_f_MPI_SOURCE 3 - #define A_f_MPI_TAG 4 - #define A_f_MPI_ERROR 5 - - #define R_f_MPI_STATUS_SIZE 6 - #define R_f_MPI_SOURCE 1 - #define R_f_MPI_TAG 2 - #define R_f_MPI_ERROR 3 +#define A_f_MPI_STATUS_SIZE 5 +#define A_f_MPI_SOURCE 3 +#define A_f_MPI_TAG 4 +#define A_f_MPI_ERROR 5 + +#define R_f_MPI_STATUS_SIZE 6 +#define R_f_MPI_SOURCE 1 +#define R_f_MPI_TAG 2 +#define R_f_MPI_ERROR 3 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/OMPI_INTEL/wrapper_f.h b/src/preload/header/OMPI_INTEL/wrapper_f.h index a5eb641..dbdb282 100644 --- a/src/preload/header/OMPI_INTEL/wrapper_f.h +++ b/src/preload/header/OMPI_INTEL/wrapper_f.h @@ -1,35 +1,35 @@ -#define A_f_MPI_BOTTOM (((int*)&mpi_fortran_bottom_)) +#define A_f_MPI_BOTTOM (((int *)&mpi_fortran_bottom_)) int mpi_fortran_bottom_; -#define A_f_MPI_IN_PLACE (((int*)&mpi_fortran_in_place_)) +#define A_f_MPI_IN_PLACE (((int *)&mpi_fortran_in_place_)) int mpi_fortran_in_place_; -#define A_f_MPI_ARGV_NULL (((int*)&mpi_fortran_argv_null_)) +#define A_f_MPI_ARGV_NULL (((int *)&mpi_fortran_argv_null_)) int mpi_fortran_argv_null_; -#define A_f_MPI_ARGVS_NULL (((int*)&mpi_fortran_argvs_null_)) +#define A_f_MPI_ARGVS_NULL (((int *)&mpi_fortran_argvs_null_)) int mpi_fortran_argvs_null_; -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpi_fortran_errcodes_ignore_)) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpi_fortran_errcodes_ignore_)) int mpi_fortran_errcodes_ignore_; -#define A_f_MPI_STATUS_IGNORE (((int*)&mpi_fortran_status_ignore_)) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpi_fortran_status_ignore_)) int mpi_fortran_status_ignore_; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpi_fortran_statuses_ignore_)) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpi_fortran_statuses_ignore_)) int mpi_fortran_statuses_ignore_; -#define A_f_MPI_UNWEIGHTED (((int*)&mpi_fortran_unweighted_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpi_fortran_unweighted_)) int mpi_fortran_unweighted_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpi_fortran_weights_empty_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpi_fortran_weights_empty_)) int mpi_fortran_weights_empty_; int *ptr_mpifcmb5_; -#define R_f_MPI_UNWEIGHTED (((int*)ptr_mpifcmb5_)) +#define R_f_MPI_UNWEIGHTED (((int *)ptr_mpifcmb5_)) int *ptr_mpifcmb9_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)ptr_mpifcmb9_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)ptr_mpifcmb9_)) extern int *ptr_mpipriv1_; -#define R_f_MPI_BOTTOM (((int*)ptr_mpipriv1_[0])) -#define R_f_MPI_IN_PLACE (((int*)ptr_mpipriv1_[1])) -#define R_f_MPI_STATUS_IGNORE (((int*)ptr_mpipriv1_[2])) +#define R_f_MPI_BOTTOM (((int *)ptr_mpipriv1_[0])) +#define R_f_MPI_IN_PLACE (((int *)ptr_mpipriv1_[1])) +#define R_f_MPI_STATUS_IGNORE (((int *)ptr_mpipriv1_[2])) extern int *ptr_mpipriv2_; -#define R_f_MPI_STATUSES_IGNORE (((int*)ptr_mpipriv2_[0])) -#define R_f_MPI_ERRCODES_IGNORE (((int*)ptr_mpipriv2_[1])) +#define R_f_MPI_STATUSES_IGNORE (((int *)ptr_mpipriv2_[0])) +#define R_f_MPI_ERRCODES_IGNORE (((int *)ptr_mpipriv2_[1])) extern int *ptr_mpiprivc_; -#define R_f_MPI_ARGVS_NULL (((int*)ptr_mpiprivc_[0])) -#define R_f_MPI_ARGV_NULL (((int*)ptr_mpiprivc_[1])) +#define R_f_MPI_ARGVS_NULL (((int *)ptr_mpiprivc_[0])) +#define R_f_MPI_ARGV_NULL (((int *)ptr_mpiprivc_[1])) //############################# Wi4MPI License ########################### //# `04/04/2016` # //# Copyright or (C) or Copr. Commissariat a l'Energie Atomique # @@ -64,44 +64,48 @@ extern int *ptr_mpiprivc_; #define R_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_NO_SUCH_FILE 42 @@ -319,503 +323,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_RMA_SYNC 50 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else + error_translation_update_f(*cr, ca); } #define R_f_MPI_2REAL 1275070497 @@ -897,197 +956,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_f(*cr, ca); } #define R_f_MPI_MAX 1476395009 @@ -1141,136 +1221,150 @@ datatype_translation_update_f(*cr,ca); #define A_f_MPI_MINLOC 12 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_ANY_SOURCE -1 @@ -1280,88 +1374,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 0 #define R_f_MPI_REQUEST_NULL 738197504 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1 @@ -1371,35 +1472,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_EMPTY 1207959552 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else + group_translation_update_f(*cr, ca); } #define R_f_MPI_ERRORS_RETURN 1409286145 @@ -1413,44 +1517,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_CART 1 @@ -1464,31 +1572,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define R_f_MPI_MAX 1476395009 @@ -1542,144 +1651,153 @@ else #define A_f_MPI_MINLOC 12 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define R_f_MPI_ERRORS_RETURN 1409286145 #define R_f_MPI_ERRORS_ARE_FATAL 1409286144 @@ -1692,44 +1810,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_HOST 1 @@ -1775,116 +1897,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_ANY_SOURCE -1 @@ -1894,50 +2028,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 0 #define R_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 1 @@ -1947,25 +2084,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define R_f_MPI_DISTRIBUTE_NONE 123 @@ -1983,37 +2121,38 @@ else #define A_f_MPI_DISTRIBUTE_DFLT_DARG -1 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 1 @@ -2023,50 +2162,53 @@ else #define R_f_MPI_LOCK_SHARED 235 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 0 #define R_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NO_PROC 1 @@ -2076,70 +2218,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NULL 738197504 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 6 - #define A_f_MPI_SOURCE 1 - #define A_f_MPI_TAG 2 - #define A_f_MPI_ERROR 3 - - #define R_f_MPI_STATUS_SIZE 5 - #define R_f_MPI_SOURCE 3 - #define R_f_MPI_TAG 4 - #define R_f_MPI_ERROR 5 +#define A_f_MPI_STATUS_SIZE 6 +#define A_f_MPI_SOURCE 1 +#define A_f_MPI_TAG 2 +#define A_f_MPI_ERROR 3 + +#define R_f_MPI_STATUS_SIZE 5 +#define R_f_MPI_SOURCE 3 +#define R_f_MPI_TAG 4 +#define R_f_MPI_ERROR 5 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/OMPI_MPICH/wrapper_f.h b/src/preload/header/OMPI_MPICH/wrapper_f.h index a5eb641..dbdb282 100644 --- a/src/preload/header/OMPI_MPICH/wrapper_f.h +++ b/src/preload/header/OMPI_MPICH/wrapper_f.h @@ -1,35 +1,35 @@ -#define A_f_MPI_BOTTOM (((int*)&mpi_fortran_bottom_)) +#define A_f_MPI_BOTTOM (((int *)&mpi_fortran_bottom_)) int mpi_fortran_bottom_; -#define A_f_MPI_IN_PLACE (((int*)&mpi_fortran_in_place_)) +#define A_f_MPI_IN_PLACE (((int *)&mpi_fortran_in_place_)) int mpi_fortran_in_place_; -#define A_f_MPI_ARGV_NULL (((int*)&mpi_fortran_argv_null_)) +#define A_f_MPI_ARGV_NULL (((int *)&mpi_fortran_argv_null_)) int mpi_fortran_argv_null_; -#define A_f_MPI_ARGVS_NULL (((int*)&mpi_fortran_argvs_null_)) +#define A_f_MPI_ARGVS_NULL (((int *)&mpi_fortran_argvs_null_)) int mpi_fortran_argvs_null_; -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpi_fortran_errcodes_ignore_)) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpi_fortran_errcodes_ignore_)) int mpi_fortran_errcodes_ignore_; -#define A_f_MPI_STATUS_IGNORE (((int*)&mpi_fortran_status_ignore_)) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpi_fortran_status_ignore_)) int mpi_fortran_status_ignore_; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpi_fortran_statuses_ignore_)) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpi_fortran_statuses_ignore_)) int mpi_fortran_statuses_ignore_; -#define A_f_MPI_UNWEIGHTED (((int*)&mpi_fortran_unweighted_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpi_fortran_unweighted_)) int mpi_fortran_unweighted_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpi_fortran_weights_empty_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpi_fortran_weights_empty_)) int mpi_fortran_weights_empty_; int *ptr_mpifcmb5_; -#define R_f_MPI_UNWEIGHTED (((int*)ptr_mpifcmb5_)) +#define R_f_MPI_UNWEIGHTED (((int *)ptr_mpifcmb5_)) int *ptr_mpifcmb9_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)ptr_mpifcmb9_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)ptr_mpifcmb9_)) extern int *ptr_mpipriv1_; -#define R_f_MPI_BOTTOM (((int*)ptr_mpipriv1_[0])) -#define R_f_MPI_IN_PLACE (((int*)ptr_mpipriv1_[1])) -#define R_f_MPI_STATUS_IGNORE (((int*)ptr_mpipriv1_[2])) +#define R_f_MPI_BOTTOM (((int *)ptr_mpipriv1_[0])) +#define R_f_MPI_IN_PLACE (((int *)ptr_mpipriv1_[1])) +#define R_f_MPI_STATUS_IGNORE (((int *)ptr_mpipriv1_[2])) extern int *ptr_mpipriv2_; -#define R_f_MPI_STATUSES_IGNORE (((int*)ptr_mpipriv2_[0])) -#define R_f_MPI_ERRCODES_IGNORE (((int*)ptr_mpipriv2_[1])) +#define R_f_MPI_STATUSES_IGNORE (((int *)ptr_mpipriv2_[0])) +#define R_f_MPI_ERRCODES_IGNORE (((int *)ptr_mpipriv2_[1])) extern int *ptr_mpiprivc_; -#define R_f_MPI_ARGVS_NULL (((int*)ptr_mpiprivc_[0])) -#define R_f_MPI_ARGV_NULL (((int*)ptr_mpiprivc_[1])) +#define R_f_MPI_ARGVS_NULL (((int *)ptr_mpiprivc_[0])) +#define R_f_MPI_ARGV_NULL (((int *)ptr_mpiprivc_[1])) //############################# Wi4MPI License ########################### //# `04/04/2016` # //# Copyright or (C) or Copr. Commissariat a l'Energie Atomique # @@ -64,44 +64,48 @@ extern int *ptr_mpiprivc_; #define R_f_MPI_COMM_WORLD 1140850688 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_NO_SUCH_FILE 42 @@ -319,503 +323,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_RMA_SYNC 50 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else + error_translation_update_f(*cr, ca); } #define R_f_MPI_2REAL 1275070497 @@ -897,197 +956,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER 1275069467 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else + datatype_translation_update_f(*cr, ca); } #define R_f_MPI_MAX 1476395009 @@ -1141,136 +1221,150 @@ datatype_translation_update_f(*cr,ca); #define A_f_MPI_MINLOC 12 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_ANY_SOURCE -1 @@ -1280,88 +1374,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 0 #define R_f_MPI_REQUEST_NULL 738197504 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1 @@ -1371,35 +1472,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_EMPTY 1207959552 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else + group_translation_update_f(*cr, ca); } #define R_f_MPI_ERRORS_RETURN 1409286145 @@ -1413,44 +1517,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_CART 1 @@ -1464,31 +1572,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define R_f_MPI_MAX 1476395009 @@ -1542,144 +1651,153 @@ else #define A_f_MPI_MINLOC 12 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define R_f_MPI_ERRORS_RETURN 1409286145 #define R_f_MPI_ERRORS_ARE_FATAL 1409286144 @@ -1692,44 +1810,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRHANDLER_NULL 335544320 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_HOST 1 @@ -1775,116 +1897,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WTIME_IS_GLOBAL 1681915912 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_ANY_SOURCE -1 @@ -1894,50 +2028,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_ANY_SOURCE -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 0 #define R_f_MPI_INFO_NULL 469762048 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 1 @@ -1947,25 +2084,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 56 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define R_f_MPI_DISTRIBUTE_NONE 123 @@ -1983,37 +2121,38 @@ else #define A_f_MPI_DISTRIBUTE_DFLT_DARG -1 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 1 @@ -2023,50 +2162,53 @@ else #define R_f_MPI_LOCK_SHARED 235 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 0 #define R_f_MPI_WIN_NULL 536870912 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NO_PROC 1 @@ -2076,70 +2218,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NULL 738197504 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 6 - #define A_f_MPI_SOURCE 1 - #define A_f_MPI_TAG 2 - #define A_f_MPI_ERROR 3 - - #define R_f_MPI_STATUS_SIZE 5 - #define R_f_MPI_SOURCE 3 - #define R_f_MPI_TAG 4 - #define R_f_MPI_ERROR 5 +#define A_f_MPI_STATUS_SIZE 6 +#define A_f_MPI_SOURCE 1 +#define A_f_MPI_TAG 2 +#define A_f_MPI_ERROR 3 + +#define R_f_MPI_STATUS_SIZE 5 +#define R_f_MPI_SOURCE 3 +#define R_f_MPI_TAG 4 +#define R_f_MPI_ERROR 5 #include "manual_wrapper.h" #endif diff --git a/src/preload/header/OMPI_OMPI/wrapper_f.h b/src/preload/header/OMPI_OMPI/wrapper_f.h index 0b76ab7..ea2386a 100644 --- a/src/preload/header/OMPI_OMPI/wrapper_f.h +++ b/src/preload/header/OMPI_OMPI/wrapper_f.h @@ -1,38 +1,38 @@ -#define A_f_MPI_BOTTOM (((int*)&mpi_fortran_bottom_)) +#define A_f_MPI_BOTTOM (((int *)&mpi_fortran_bottom_)) int mpi_fortran_bottom_; -#define A_f_MPI_IN_PLACE (((int*)&mpi_fortran_in_place_)) +#define A_f_MPI_IN_PLACE (((int *)&mpi_fortran_in_place_)) int mpi_fortran_in_place_; -#define A_f_MPI_ARGV_NULL (((int*)&mpi_fortran_argv_null_)) +#define A_f_MPI_ARGV_NULL (((int *)&mpi_fortran_argv_null_)) int mpi_fortran_argv_null_; -#define A_f_MPI_ARGVS_NULL (((int*)&mpi_fortran_argvs_null_)) +#define A_f_MPI_ARGVS_NULL (((int *)&mpi_fortran_argvs_null_)) int mpi_fortran_argvs_null_; -#define A_f_MPI_ERRCODES_IGNORE (((int*)&mpi_fortran_errcodes_ignore_)) +#define A_f_MPI_ERRCODES_IGNORE (((int *)&mpi_fortran_errcodes_ignore_)) int mpi_fortran_errcodes_ignore_; -#define A_f_MPI_STATUS_IGNORE (((int*)&mpi_fortran_status_ignore_)) +#define A_f_MPI_STATUS_IGNORE (((int *)&mpi_fortran_status_ignore_)) int mpi_fortran_status_ignore_; -#define A_f_MPI_STATUSES_IGNORE (((int*)&mpi_fortran_statuses_ignore_)) +#define A_f_MPI_STATUSES_IGNORE (((int *)&mpi_fortran_statuses_ignore_)) int mpi_fortran_statuses_ignore_; -#define A_f_MPI_UNWEIGHTED (((int*)&mpi_fortran_unweighted_)) +#define A_f_MPI_UNWEIGHTED (((int *)&mpi_fortran_unweighted_)) int mpi_fortran_unweighted_; -#define A_f_MPI_WEIGHTS_EMPTY (((int*)&mpi_fortran_weights_empty_)) +#define A_f_MPI_WEIGHTS_EMPTY (((int *)&mpi_fortran_weights_empty_)) int mpi_fortran_weights_empty_; -#define R_f_MPI_BOTTOM (((int*)&mpi_fortran_bottom_)) +#define R_f_MPI_BOTTOM (((int *)&mpi_fortran_bottom_)) extern int mpi_fortran_bottom_; -#define R_f_MPI_IN_PLACE (((int*)&mpi_fortran_in_place_)) +#define R_f_MPI_IN_PLACE (((int *)&mpi_fortran_in_place_)) extern int mpi_fortran_in_place_; -#define R_f_MPI_ARGV_NULL (((int*)&mpi_fortran_argv_null_)) +#define R_f_MPI_ARGV_NULL (((int *)&mpi_fortran_argv_null_)) extern int mpi_fortran_argv_null_; -#define R_f_MPI_ARGVS_NULL (((int*)&mpi_fortran_argvs_null_)) +#define R_f_MPI_ARGVS_NULL (((int *)&mpi_fortran_argvs_null_)) extern int mpi_fortran_argvs_null_; -#define R_f_MPI_ERRCODES_IGNORE (((int*)&mpi_fortran_errcodes_ignore_)) +#define R_f_MPI_ERRCODES_IGNORE (((int *)&mpi_fortran_errcodes_ignore_)) extern int mpi_fortran_errcodes_ignore_; -#define R_f_MPI_STATUS_IGNORE (((int*)&mpi_fortran_status_ignore_)) +#define R_f_MPI_STATUS_IGNORE (((int *)&mpi_fortran_status_ignore_)) extern int mpi_fortran_status_ignore_; -#define R_f_MPI_STATUSES_IGNORE (((int*)&mpi_fortran_statuses_ignore_)) +#define R_f_MPI_STATUSES_IGNORE (((int *)&mpi_fortran_statuses_ignore_)) extern int mpi_fortran_statuses_ignore_; -#define R_f_MPI_UNWEIGHTED (((int*)&mpi_fortran_unweighted_)) +#define R_f_MPI_UNWEIGHTED (((int *)&mpi_fortran_unweighted_)) extern int mpi_fortran_unweighted_; -#define R_f_MPI_WEIGHTS_EMPTY (((int*)&mpi_fortran_weights_empty_)) +#define R_f_MPI_WEIGHTS_EMPTY (((int *)&mpi_fortran_weights_empty_)) extern int mpi_fortran_weights_empty_; //############################# Wi4MPI License ########################### //# `04/04/2016` # @@ -68,44 +68,48 @@ extern int mpi_fortran_weights_empty_; #define R_f_MPI_COMM_NULL 2 -static inline void comm_a2r(int *ca,int *cr){ -if(A_f_MPI_COMM_SELF==*ca){ -*cr=(int )R_f_MPI_COMM_SELF;return;} -else -if(A_f_MPI_COMM_WORLD==*ca){ -*cr=(int )R_f_MPI_COMM_WORLD;return;} -else -if(A_f_MPI_COMM_NULL==*ca){ -*cr=(int )R_f_MPI_COMM_NULL;return;} -else -communicator_translation_get_f(*ca,cr); +static inline void comm_a2r(int *ca, int *cr) { + if (A_f_MPI_COMM_SELF == *ca) { + *cr = (int)R_f_MPI_COMM_SELF; + return; + } else if (A_f_MPI_COMM_WORLD == *ca) { + *cr = (int)R_f_MPI_COMM_WORLD; + return; + } else if (A_f_MPI_COMM_NULL == *ca) { + *cr = (int)R_f_MPI_COMM_NULL; + return; + } else + communicator_translation_get_f(*ca, cr); } -static inline void comm_r2a(int *ca,int *cr){ -if(R_f_MPI_COMM_SELF==*cr){ -*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -if(R_f_MPI_COMM_NULL==*cr){ -*ca=(int )A_f_MPI_COMM_NULL;return;} -else -communicator_translation_update_alloc_f(*cr,ca); - +static inline void comm_r2a(int *ca, int *cr) { + if (R_f_MPI_COMM_SELF == *cr) { + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else if (R_f_MPI_COMM_NULL == *cr) { + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else + communicator_translation_update_alloc_f(*cr, ca); } -static inline void comm_r2au(int *ca,int *cr){ -if(R_f_MPI_COMM_SELF==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_SELF;return;} -else -if(R_f_MPI_COMM_WORLD==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_WORLD;return;} -else -if(R_f_MPI_COMM_NULL==*cr){ -communicator_translation_del_f(*ca);*ca=(int )A_f_MPI_COMM_NULL;return;} -else -communicator_translation_update_f(*cr,ca); - +static inline void comm_r2au(int *ca, int *cr) { + if (R_f_MPI_COMM_SELF == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_SELF; + return; + } else if (R_f_MPI_COMM_WORLD == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_WORLD; + return; + } else if (R_f_MPI_COMM_NULL == *cr) { + communicator_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMM_NULL; + return; + } else + communicator_translation_update_f(*cr, ca); } #define A_f_MPI_ERR_NO_SUCH_FILE 42 @@ -323,503 +327,558 @@ communicator_translation_update_f(*cr,ca); #define R_f_MPI_ERR_SPAWN 50 -static inline void error_a2r(int *ca,int *cr){ -if(A_f_MPI_ERR_NO_SUCH_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(A_f_MPI_ERR_PORT==*ca){ -*cr=(int )R_f_MPI_ERR_PORT;return;} -else -if(A_f_MPI_ERR_SIZE==*ca){ -*cr=(int )R_f_MPI_ERR_SIZE;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_OPERATION==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(A_f_MPI_ERR_WIN==*ca){ -*cr=(int )R_f_MPI_ERR_WIN;return;} -else -if(A_f_MPI_ERR_BASE==*ca){ -*cr=(int )R_f_MPI_ERR_BASE;return;} -else -if(A_f_MPI_ERR_CONVERSION==*ca){ -*cr=(int )R_f_MPI_ERR_CONVERSION;return;} -else -if(A_f_MPI_ERR_DISP==*ca){ -*cr=(int )R_f_MPI_ERR_DISP;return;} -else -if(A_f_MPI_ERR_DUP_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_DUP_DATAREP;return;} -else -if(A_f_MPI_ERR_ACCESS==*ca){ -*cr=(int )R_f_MPI_ERR_ACCESS;return;} -else -if(A_f_MPI_ERR_AMODE==*ca){ -*cr=(int )R_f_MPI_ERR_AMODE;return;} -else -if(A_f_MPI_ERR_ASSERT==*ca){ -*cr=(int )R_f_MPI_ERR_ASSERT;return;} -else -if(A_f_MPI_ERR_BAD_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_BAD_FILE;return;} -else -if(A_f_MPI_ERR_RMA_CONFLICT==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(A_f_MPI_ERR_RMA_SYNC==*ca){ -*cr=(int )R_f_MPI_ERR_RMA_SYNC;return;} -else -if(A_f_MPI_ERR_QUOTA==*ca){ -*cr=(int )R_f_MPI_ERR_QUOTA;return;} -else -if(A_f_MPI_ERR_READ_ONLY==*ca){ -*cr=(int )R_f_MPI_ERR_READ_ONLY;return;} -else -if(A_f_MPI_ERR_FILE_EXISTS==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_EXISTS;return;} -else -if(A_f_MPI_ERR_FILE_IN_USE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE_IN_USE;return;} -else -if(A_f_MPI_ERR_NOT_SAME==*ca){ -*cr=(int )R_f_MPI_ERR_NOT_SAME;return;} -else -if(A_f_MPI_ERR_NO_SPACE==*ca){ -*cr=(int )R_f_MPI_ERR_NO_SPACE;return;} -else -if(A_f_MPI_ERR_BUFFER==*ca){ -*cr=(int )R_f_MPI_ERR_BUFFER;return;} -else -if(A_f_MPI_SUCCESS==*ca){ -*cr=(int )R_f_MPI_SUCCESS;return;} -else -if(A_f_MPI_ERR_TYPE==*ca){ -*cr=(int )R_f_MPI_ERR_TYPE;return;} -else -if(A_f_MPI_ERR_COUNT==*ca){ -*cr=(int )R_f_MPI_ERR_COUNT;return;} -else -if(A_f_MPI_ERR_COMM==*ca){ -*cr=(int )R_f_MPI_ERR_COMM;return;} -else -if(A_f_MPI_ERR_TAG==*ca){ -*cr=(int )R_f_MPI_ERR_TAG;return;} -else -if(A_f_MPI_ERR_REQUEST==*ca){ -*cr=(int )R_f_MPI_ERR_REQUEST;return;} -else -if(A_f_MPI_ERR_RANK==*ca){ -*cr=(int )R_f_MPI_ERR_RANK;return;} -else -if(A_f_MPI_ERR_GROUP==*ca){ -*cr=(int )R_f_MPI_ERR_GROUP;return;} -else -if(A_f_MPI_ERR_ROOT==*ca){ -*cr=(int )R_f_MPI_ERR_ROOT;return;} -else -if(A_f_MPI_ERR_UNSUPPORTED_DATAREP==*ca){ -*cr=(int )R_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(A_f_MPI_ERR_NO_MEM==*ca){ -*cr=(int )R_f_MPI_ERR_NO_MEM;return;} -else -if(A_f_MPI_ERR_NAME==*ca){ -*cr=(int )R_f_MPI_ERR_NAME;return;} -else -if(A_f_MPI_ERR_LASTCODE==*ca){ -*cr=(int )R_f_MPI_ERR_LASTCODE;return;} -else -if(A_f_MPI_ERR_TOPOLOGY==*ca){ -*cr=(int )R_f_MPI_ERR_TOPOLOGY;return;} -else -if(A_f_MPI_ERR_OP==*ca){ -*cr=(int )R_f_MPI_ERR_OP;return;} -else -if(A_f_MPI_ERR_ARG==*ca){ -*cr=(int )R_f_MPI_ERR_ARG;return;} -else -if(A_f_MPI_ERR_DIMS==*ca){ -*cr=(int )R_f_MPI_ERR_DIMS;return;} -else -if(A_f_MPI_ERR_TRUNCATE==*ca){ -*cr=(int )R_f_MPI_ERR_TRUNCATE;return;} -else -if(A_f_MPI_ERR_UNKNOWN==*ca){ -*cr=(int )R_f_MPI_ERR_UNKNOWN;return;} -else -if(A_f_MPI_ERR_INTERN==*ca){ -*cr=(int )R_f_MPI_ERR_INTERN;return;} -else -if(A_f_MPI_ERR_OTHER==*ca){ -*cr=(int )R_f_MPI_ERR_OTHER;return;} -else -if(A_f_MPI_ERR_PENDING==*ca){ -*cr=(int )R_f_MPI_ERR_PENDING;return;} -else -if(A_f_MPI_ERR_IN_STATUS==*ca){ -*cr=(int )R_f_MPI_ERR_IN_STATUS;return;} -else -if(A_f_MPI_ERR_INFO_KEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_KEY;return;} -else -if(A_f_MPI_ERR_FILE==*ca){ -*cr=(int )R_f_MPI_ERR_FILE;return;} -else -if(A_f_MPI_ERR_LOCKTYPE==*ca){ -*cr=(int )R_f_MPI_ERR_LOCKTYPE;return;} -else -if(A_f_MPI_ERR_KEYVAL==*ca){ -*cr=(int )R_f_MPI_ERR_KEYVAL;return;} -else -if(A_f_MPI_ERR_IO==*ca){ -*cr=(int )R_f_MPI_ERR_IO;return;} -else -if(A_f_MPI_ERR_INFO==*ca){ -*cr=(int )R_f_MPI_ERR_INFO;return;} -else -if(A_f_MPI_ERR_INFO_VALUE==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_VALUE;return;} -else -if(A_f_MPI_ERR_INFO_NOKEY==*ca){ -*cr=(int )R_f_MPI_ERR_INFO_NOKEY;return;} -else -if(A_f_MPI_ERR_SPAWN==*ca){ -*cr=(int )R_f_MPI_ERR_SPAWN;return;} -else -error_translation_get_f(*ca,cr); +static inline void error_a2r(int *ca, int *cr) { + if (A_f_MPI_ERR_NO_SUCH_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (A_f_MPI_ERR_PORT == *ca) { + *cr = (int)R_f_MPI_ERR_PORT; + return; + } else if (A_f_MPI_ERR_SIZE == *ca) { + *cr = (int)R_f_MPI_ERR_SIZE; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_OPERATION == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (A_f_MPI_ERR_WIN == *ca) { + *cr = (int)R_f_MPI_ERR_WIN; + return; + } else if (A_f_MPI_ERR_BASE == *ca) { + *cr = (int)R_f_MPI_ERR_BASE; + return; + } else if (A_f_MPI_ERR_CONVERSION == *ca) { + *cr = (int)R_f_MPI_ERR_CONVERSION; + return; + } else if (A_f_MPI_ERR_DISP == *ca) { + *cr = (int)R_f_MPI_ERR_DISP; + return; + } else if (A_f_MPI_ERR_DUP_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_DUP_DATAREP; + return; + } else if (A_f_MPI_ERR_ACCESS == *ca) { + *cr = (int)R_f_MPI_ERR_ACCESS; + return; + } else if (A_f_MPI_ERR_AMODE == *ca) { + *cr = (int)R_f_MPI_ERR_AMODE; + return; + } else if (A_f_MPI_ERR_ASSERT == *ca) { + *cr = (int)R_f_MPI_ERR_ASSERT; + return; + } else if (A_f_MPI_ERR_BAD_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_BAD_FILE; + return; + } else if (A_f_MPI_ERR_RMA_CONFLICT == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (A_f_MPI_ERR_RMA_SYNC == *ca) { + *cr = (int)R_f_MPI_ERR_RMA_SYNC; + return; + } else if (A_f_MPI_ERR_QUOTA == *ca) { + *cr = (int)R_f_MPI_ERR_QUOTA; + return; + } else if (A_f_MPI_ERR_READ_ONLY == *ca) { + *cr = (int)R_f_MPI_ERR_READ_ONLY; + return; + } else if (A_f_MPI_ERR_FILE_EXISTS == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_EXISTS; + return; + } else if (A_f_MPI_ERR_FILE_IN_USE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE_IN_USE; + return; + } else if (A_f_MPI_ERR_NOT_SAME == *ca) { + *cr = (int)R_f_MPI_ERR_NOT_SAME; + return; + } else if (A_f_MPI_ERR_NO_SPACE == *ca) { + *cr = (int)R_f_MPI_ERR_NO_SPACE; + return; + } else if (A_f_MPI_ERR_BUFFER == *ca) { + *cr = (int)R_f_MPI_ERR_BUFFER; + return; + } else if (A_f_MPI_SUCCESS == *ca) { + *cr = (int)R_f_MPI_SUCCESS; + return; + } else if (A_f_MPI_ERR_TYPE == *ca) { + *cr = (int)R_f_MPI_ERR_TYPE; + return; + } else if (A_f_MPI_ERR_COUNT == *ca) { + *cr = (int)R_f_MPI_ERR_COUNT; + return; + } else if (A_f_MPI_ERR_COMM == *ca) { + *cr = (int)R_f_MPI_ERR_COMM; + return; + } else if (A_f_MPI_ERR_TAG == *ca) { + *cr = (int)R_f_MPI_ERR_TAG; + return; + } else if (A_f_MPI_ERR_REQUEST == *ca) { + *cr = (int)R_f_MPI_ERR_REQUEST; + return; + } else if (A_f_MPI_ERR_RANK == *ca) { + *cr = (int)R_f_MPI_ERR_RANK; + return; + } else if (A_f_MPI_ERR_GROUP == *ca) { + *cr = (int)R_f_MPI_ERR_GROUP; + return; + } else if (A_f_MPI_ERR_ROOT == *ca) { + *cr = (int)R_f_MPI_ERR_ROOT; + return; + } else if (A_f_MPI_ERR_UNSUPPORTED_DATAREP == *ca) { + *cr = (int)R_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (A_f_MPI_ERR_NO_MEM == *ca) { + *cr = (int)R_f_MPI_ERR_NO_MEM; + return; + } else if (A_f_MPI_ERR_NAME == *ca) { + *cr = (int)R_f_MPI_ERR_NAME; + return; + } else if (A_f_MPI_ERR_LASTCODE == *ca) { + *cr = (int)R_f_MPI_ERR_LASTCODE; + return; + } else if (A_f_MPI_ERR_TOPOLOGY == *ca) { + *cr = (int)R_f_MPI_ERR_TOPOLOGY; + return; + } else if (A_f_MPI_ERR_OP == *ca) { + *cr = (int)R_f_MPI_ERR_OP; + return; + } else if (A_f_MPI_ERR_ARG == *ca) { + *cr = (int)R_f_MPI_ERR_ARG; + return; + } else if (A_f_MPI_ERR_DIMS == *ca) { + *cr = (int)R_f_MPI_ERR_DIMS; + return; + } else if (A_f_MPI_ERR_TRUNCATE == *ca) { + *cr = (int)R_f_MPI_ERR_TRUNCATE; + return; + } else if (A_f_MPI_ERR_UNKNOWN == *ca) { + *cr = (int)R_f_MPI_ERR_UNKNOWN; + return; + } else if (A_f_MPI_ERR_INTERN == *ca) { + *cr = (int)R_f_MPI_ERR_INTERN; + return; + } else if (A_f_MPI_ERR_OTHER == *ca) { + *cr = (int)R_f_MPI_ERR_OTHER; + return; + } else if (A_f_MPI_ERR_PENDING == *ca) { + *cr = (int)R_f_MPI_ERR_PENDING; + return; + } else if (A_f_MPI_ERR_IN_STATUS == *ca) { + *cr = (int)R_f_MPI_ERR_IN_STATUS; + return; + } else if (A_f_MPI_ERR_INFO_KEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_KEY; + return; + } else if (A_f_MPI_ERR_FILE == *ca) { + *cr = (int)R_f_MPI_ERR_FILE; + return; + } else if (A_f_MPI_ERR_LOCKTYPE == *ca) { + *cr = (int)R_f_MPI_ERR_LOCKTYPE; + return; + } else if (A_f_MPI_ERR_KEYVAL == *ca) { + *cr = (int)R_f_MPI_ERR_KEYVAL; + return; + } else if (A_f_MPI_ERR_IO == *ca) { + *cr = (int)R_f_MPI_ERR_IO; + return; + } else if (A_f_MPI_ERR_INFO == *ca) { + *cr = (int)R_f_MPI_ERR_INFO; + return; + } else if (A_f_MPI_ERR_INFO_VALUE == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_VALUE; + return; + } else if (A_f_MPI_ERR_INFO_NOKEY == *ca) { + *cr = (int)R_f_MPI_ERR_INFO_NOKEY; + return; + } else if (A_f_MPI_ERR_SPAWN == *ca) { + *cr = (int)R_f_MPI_ERR_SPAWN; + return; + } else + error_translation_get_f(*ca, cr); } -static inline void error_r2a(int *ca,int *cr){ -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -error_translation_update_alloc_f(*cr,ca); - +static inline void error_r2a(int *ca, int *cr) { + if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else + error_translation_update_alloc_f(*cr, ca); } -static inline void error_r2au(int *ca,int *cr){ -if(R_f_MPI_ERR_NO_SUCH_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SUCH_FILE;return;} -else -if(R_f_MPI_ERR_PORT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PORT;return;} -else -if(R_f_MPI_ERR_SIZE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SIZE;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_OPERATION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_OPERATION;return;} -else -if(R_f_MPI_ERR_WIN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_WIN;return;} -else -if(R_f_MPI_ERR_BASE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BASE;return;} -else -if(R_f_MPI_ERR_CONVERSION==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_CONVERSION;return;} -else -if(R_f_MPI_ERR_DISP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DISP;return;} -else -if(R_f_MPI_ERR_DUP_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DUP_DATAREP;return;} -else -if(R_f_MPI_ERR_ACCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ACCESS;return;} -else -if(R_f_MPI_ERR_AMODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_AMODE;return;} -else -if(R_f_MPI_ERR_ASSERT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ASSERT;return;} -else -if(R_f_MPI_ERR_BAD_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BAD_FILE;return;} -else -if(R_f_MPI_ERR_RMA_CONFLICT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_CONFLICT;return;} -else -if(R_f_MPI_ERR_RMA_SYNC==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RMA_SYNC;return;} -else -if(R_f_MPI_ERR_QUOTA==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_QUOTA;return;} -else -if(R_f_MPI_ERR_READ_ONLY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_READ_ONLY;return;} -else -if(R_f_MPI_ERR_FILE_EXISTS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_EXISTS;return;} -else -if(R_f_MPI_ERR_FILE_IN_USE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE_IN_USE;return;} -else -if(R_f_MPI_ERR_NOT_SAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NOT_SAME;return;} -else -if(R_f_MPI_ERR_NO_SPACE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_SPACE;return;} -else -if(R_f_MPI_ERR_BUFFER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_BUFFER;return;} -else -if(R_f_MPI_SUCCESS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_SUCCESS;return;} -else -if(R_f_MPI_ERR_TYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TYPE;return;} -else -if(R_f_MPI_ERR_COUNT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COUNT;return;} -else -if(R_f_MPI_ERR_COMM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_COMM;return;} -else -if(R_f_MPI_ERR_TAG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TAG;return;} -else -if(R_f_MPI_ERR_REQUEST==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_REQUEST;return;} -else -if(R_f_MPI_ERR_RANK==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_RANK;return;} -else -if(R_f_MPI_ERR_GROUP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_GROUP;return;} -else -if(R_f_MPI_ERR_ROOT==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ROOT;return;} -else -if(R_f_MPI_ERR_UNSUPPORTED_DATAREP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNSUPPORTED_DATAREP;return;} -else -if(R_f_MPI_ERR_NO_MEM==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NO_MEM;return;} -else -if(R_f_MPI_ERR_NAME==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_NAME;return;} -else -if(R_f_MPI_ERR_LASTCODE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LASTCODE;return;} -else -if(R_f_MPI_ERR_TOPOLOGY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TOPOLOGY;return;} -else -if(R_f_MPI_ERR_OP==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OP;return;} -else -if(R_f_MPI_ERR_ARG==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_ARG;return;} -else -if(R_f_MPI_ERR_DIMS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_DIMS;return;} -else -if(R_f_MPI_ERR_TRUNCATE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_TRUNCATE;return;} -else -if(R_f_MPI_ERR_UNKNOWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_UNKNOWN;return;} -else -if(R_f_MPI_ERR_INTERN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INTERN;return;} -else -if(R_f_MPI_ERR_OTHER==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_OTHER;return;} -else -if(R_f_MPI_ERR_PENDING==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_PENDING;return;} -else -if(R_f_MPI_ERR_IN_STATUS==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IN_STATUS;return;} -else -if(R_f_MPI_ERR_INFO_KEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_KEY;return;} -else -if(R_f_MPI_ERR_FILE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_FILE;return;} -else -if(R_f_MPI_ERR_LOCKTYPE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_LOCKTYPE;return;} -else -if(R_f_MPI_ERR_KEYVAL==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_KEYVAL;return;} -else -if(R_f_MPI_ERR_IO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_IO;return;} -else -if(R_f_MPI_ERR_INFO==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO;return;} -else -if(R_f_MPI_ERR_INFO_VALUE==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_VALUE;return;} -else -if(R_f_MPI_ERR_INFO_NOKEY==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_INFO_NOKEY;return;} -else -if(R_f_MPI_ERR_SPAWN==*cr){ -error_translation_del_f(*ca);*ca=(int )A_f_MPI_ERR_SPAWN;return;} -else -error_translation_update_f(*cr,ca); - +static inline void error_r2au(int *ca, int *cr) { + if (R_f_MPI_ERR_NO_SUCH_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SUCH_FILE; + return; + } else if (R_f_MPI_ERR_PORT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PORT; + return; + } else if (R_f_MPI_ERR_SIZE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SIZE; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_OPERATION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_OPERATION; + return; + } else if (R_f_MPI_ERR_WIN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_WIN; + return; + } else if (R_f_MPI_ERR_BASE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BASE; + return; + } else if (R_f_MPI_ERR_CONVERSION == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_CONVERSION; + return; + } else if (R_f_MPI_ERR_DISP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DISP; + return; + } else if (R_f_MPI_ERR_DUP_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DUP_DATAREP; + return; + } else if (R_f_MPI_ERR_ACCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ACCESS; + return; + } else if (R_f_MPI_ERR_AMODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_AMODE; + return; + } else if (R_f_MPI_ERR_ASSERT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ASSERT; + return; + } else if (R_f_MPI_ERR_BAD_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BAD_FILE; + return; + } else if (R_f_MPI_ERR_RMA_CONFLICT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_CONFLICT; + return; + } else if (R_f_MPI_ERR_RMA_SYNC == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RMA_SYNC; + return; + } else if (R_f_MPI_ERR_QUOTA == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_QUOTA; + return; + } else if (R_f_MPI_ERR_READ_ONLY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_READ_ONLY; + return; + } else if (R_f_MPI_ERR_FILE_EXISTS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_EXISTS; + return; + } else if (R_f_MPI_ERR_FILE_IN_USE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE_IN_USE; + return; + } else if (R_f_MPI_ERR_NOT_SAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NOT_SAME; + return; + } else if (R_f_MPI_ERR_NO_SPACE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_SPACE; + return; + } else if (R_f_MPI_ERR_BUFFER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_BUFFER; + return; + } else if (R_f_MPI_SUCCESS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUCCESS; + return; + } else if (R_f_MPI_ERR_TYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TYPE; + return; + } else if (R_f_MPI_ERR_COUNT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COUNT; + return; + } else if (R_f_MPI_ERR_COMM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_COMM; + return; + } else if (R_f_MPI_ERR_TAG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TAG; + return; + } else if (R_f_MPI_ERR_REQUEST == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_REQUEST; + return; + } else if (R_f_MPI_ERR_RANK == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_RANK; + return; + } else if (R_f_MPI_ERR_GROUP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_GROUP; + return; + } else if (R_f_MPI_ERR_ROOT == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ROOT; + return; + } else if (R_f_MPI_ERR_UNSUPPORTED_DATAREP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNSUPPORTED_DATAREP; + return; + } else if (R_f_MPI_ERR_NO_MEM == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NO_MEM; + return; + } else if (R_f_MPI_ERR_NAME == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_NAME; + return; + } else if (R_f_MPI_ERR_LASTCODE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LASTCODE; + return; + } else if (R_f_MPI_ERR_TOPOLOGY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TOPOLOGY; + return; + } else if (R_f_MPI_ERR_OP == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OP; + return; + } else if (R_f_MPI_ERR_ARG == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_ARG; + return; + } else if (R_f_MPI_ERR_DIMS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_DIMS; + return; + } else if (R_f_MPI_ERR_TRUNCATE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_TRUNCATE; + return; + } else if (R_f_MPI_ERR_UNKNOWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_UNKNOWN; + return; + } else if (R_f_MPI_ERR_INTERN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INTERN; + return; + } else if (R_f_MPI_ERR_OTHER == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_OTHER; + return; + } else if (R_f_MPI_ERR_PENDING == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_PENDING; + return; + } else if (R_f_MPI_ERR_IN_STATUS == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IN_STATUS; + return; + } else if (R_f_MPI_ERR_INFO_KEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_KEY; + return; + } else if (R_f_MPI_ERR_FILE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_FILE; + return; + } else if (R_f_MPI_ERR_LOCKTYPE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_LOCKTYPE; + return; + } else if (R_f_MPI_ERR_KEYVAL == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_KEYVAL; + return; + } else if (R_f_MPI_ERR_IO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_IO; + return; + } else if (R_f_MPI_ERR_INFO == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO; + return; + } else if (R_f_MPI_ERR_INFO_VALUE == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_VALUE; + return; + } else if (R_f_MPI_ERR_INFO_NOKEY == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_INFO_NOKEY; + return; + } else if (R_f_MPI_ERR_SPAWN == *cr) { + error_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERR_SPAWN; + return; + } else + error_translation_update_f(*cr, ca); } #define A_f_MPI_2DOUBLE_PRECISION 24 @@ -901,197 +960,218 @@ error_translation_update_f(*cr,ca); #define R_f_MPI_INTEGER4 10 -static inline void datatype_a2r(int *ca,int *cr){ -if(A_f_MPI_2DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_2DOUBLE_PRECISION;return;} -else -if(A_f_MPI_2INTEGER==*ca){ -*cr=(int )R_f_MPI_2INTEGER;return;} -else -if(A_f_MPI_REAL==*ca){ -*cr=(int )R_f_MPI_REAL;return;} -else -if(A_f_MPI_REAL8==*ca){ -*cr=(int )R_f_MPI_REAL8;return;} -else -if(A_f_MPI_DOUBLE_COMPLEX==*ca){ -*cr=(int )R_f_MPI_DOUBLE_COMPLEX;return;} -else -if(A_f_MPI_DOUBLE_PRECISION==*ca){ -*cr=(int )R_f_MPI_DOUBLE_PRECISION;return;} -else -if(A_f_MPI_2REAL==*ca){ -*cr=(int )R_f_MPI_2REAL;return;} -else -if(A_f_MPI_COMPLEX==*ca){ -*cr=(int )R_f_MPI_COMPLEX;return;} -else -if(A_f_MPI_BYTE==*ca){ -*cr=(int )R_f_MPI_BYTE;return;} -else -if(A_f_MPI_DATATYPE_NULL==*ca){ -*cr=(int )R_f_MPI_DATATYPE_NULL;return;} -else -if(A_f_MPI_UB==*ca){ -*cr=(int )R_f_MPI_UB;return;} -else -if(A_f_MPI_PACKED==*ca){ -*cr=(int )R_f_MPI_PACKED;return;} -else -if(A_f_MPI_CHARACTER==*ca){ -*cr=(int )R_f_MPI_CHARACTER;return;} -else -if(A_f_MPI_LB==*ca){ -*cr=(int )R_f_MPI_LB;return;} -else -if(A_f_MPI_INTEGER==*ca){ -*cr=(int )R_f_MPI_INTEGER;return;} -else -if(A_f_MPI_LOGICAL==*ca){ -*cr=(int )R_f_MPI_LOGICAL;return;} -else -if(A_f_MPI_INTEGER2==*ca){ -*cr=(int )R_f_MPI_INTEGER2;return;} -else -if(A_f_MPI_INTEGER1==*ca){ -*cr=(int )R_f_MPI_INTEGER1;return;} -else -if(A_f_MPI_REAL4==*ca){ -*cr=(int )R_f_MPI_REAL4;return;} -else -if(A_f_MPI_INTEGER4==*ca){ -*cr=(int )R_f_MPI_INTEGER4;return;} -else -datatype_translation_get_f(*ca,cr); +static inline void datatype_a2r(int *ca, int *cr) { + if (A_f_MPI_2DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_2DOUBLE_PRECISION; + return; + } else if (A_f_MPI_2INTEGER == *ca) { + *cr = (int)R_f_MPI_2INTEGER; + return; + } else if (A_f_MPI_REAL == *ca) { + *cr = (int)R_f_MPI_REAL; + return; + } else if (A_f_MPI_REAL8 == *ca) { + *cr = (int)R_f_MPI_REAL8; + return; + } else if (A_f_MPI_DOUBLE_COMPLEX == *ca) { + *cr = (int)R_f_MPI_DOUBLE_COMPLEX; + return; + } else if (A_f_MPI_DOUBLE_PRECISION == *ca) { + *cr = (int)R_f_MPI_DOUBLE_PRECISION; + return; + } else if (A_f_MPI_2REAL == *ca) { + *cr = (int)R_f_MPI_2REAL; + return; + } else if (A_f_MPI_COMPLEX == *ca) { + *cr = (int)R_f_MPI_COMPLEX; + return; + } else if (A_f_MPI_BYTE == *ca) { + *cr = (int)R_f_MPI_BYTE; + return; + } else if (A_f_MPI_DATATYPE_NULL == *ca) { + *cr = (int)R_f_MPI_DATATYPE_NULL; + return; + } else if (A_f_MPI_UB == *ca) { + *cr = (int)R_f_MPI_UB; + return; + } else if (A_f_MPI_PACKED == *ca) { + *cr = (int)R_f_MPI_PACKED; + return; + } else if (A_f_MPI_CHARACTER == *ca) { + *cr = (int)R_f_MPI_CHARACTER; + return; + } else if (A_f_MPI_LB == *ca) { + *cr = (int)R_f_MPI_LB; + return; + } else if (A_f_MPI_INTEGER == *ca) { + *cr = (int)R_f_MPI_INTEGER; + return; + } else if (A_f_MPI_LOGICAL == *ca) { + *cr = (int)R_f_MPI_LOGICAL; + return; + } else if (A_f_MPI_INTEGER2 == *ca) { + *cr = (int)R_f_MPI_INTEGER2; + return; + } else if (A_f_MPI_INTEGER1 == *ca) { + *cr = (int)R_f_MPI_INTEGER1; + return; + } else if (A_f_MPI_REAL4 == *ca) { + *cr = (int)R_f_MPI_REAL4; + return; + } else if (A_f_MPI_INTEGER4 == *ca) { + *cr = (int)R_f_MPI_INTEGER4; + return; + } else + datatype_translation_get_f(*ca, cr); } -static inline void datatype_r2a(int *ca,int *cr){ -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_REAL==*cr){ -*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2REAL==*cr){ -*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_UB==*cr){ -*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_PACKED==*cr){ -*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_LB==*cr){ -*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER==*cr){ -*ca=(int )A_f_MPI_INTEGER;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -*ca=(int )A_f_MPI_INTEGER4;return;} -else -datatype_translation_update_alloc_f(*cr,ca); - +static inline void datatype_r2a(int *ca, int *cr) { + if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_REAL == *cr) { + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2REAL == *cr) { + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_UB == *cr) { + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_PACKED == *cr) { + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_LB == *cr) { + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER == *cr) { + *ca = (int)A_f_MPI_INTEGER; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + *ca = (int)A_f_MPI_INTEGER4; + return; + } else + datatype_translation_update_alloc_f(*cr, ca); } -static inline void datatype_r2au(int *ca,int *cr){ -if(R_f_MPI_2DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2INTEGER;return;} -else -if(R_f_MPI_REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL;return;} -else -if(R_f_MPI_REAL8==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL8;return;} -else -if(R_f_MPI_DOUBLE_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_COMPLEX;return;} -else -if(R_f_MPI_DOUBLE_PRECISION==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DOUBLE_PRECISION;return;} -else -if(R_f_MPI_2REAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_2REAL;return;} -else -if(R_f_MPI_COMPLEX==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_COMPLEX;return;} -else -if(R_f_MPI_BYTE==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_BYTE;return;} -else -if(R_f_MPI_DATATYPE_NULL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_DATATYPE_NULL;return;} -else -if(R_f_MPI_UB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_UB;return;} -else -if(R_f_MPI_PACKED==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_PACKED;return;} -else -if(R_f_MPI_CHARACTER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_CHARACTER;return;} -else -if(R_f_MPI_LB==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LB;return;} -else -if(R_f_MPI_INTEGER==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER;return;} -else -if(R_f_MPI_LOGICAL==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_LOGICAL;return;} -else -if(R_f_MPI_INTEGER2==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER2;return;} -else -if(R_f_MPI_INTEGER1==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER1;return;} -else -if(R_f_MPI_REAL4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_REAL4;return;} -else -if(R_f_MPI_INTEGER4==*cr){ -datatype_translation_del_f(*ca);*ca=(int )A_f_MPI_INTEGER4;return;} -else -datatype_translation_update_f(*cr,ca); - +static inline void datatype_r2au(int *ca, int *cr) { + if (R_f_MPI_2DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2INTEGER; + return; + } else if (R_f_MPI_REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL; + return; + } else if (R_f_MPI_REAL8 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL8; + return; + } else if (R_f_MPI_DOUBLE_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_COMPLEX; + return; + } else if (R_f_MPI_DOUBLE_PRECISION == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DOUBLE_PRECISION; + return; + } else if (R_f_MPI_2REAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_2REAL; + return; + } else if (R_f_MPI_COMPLEX == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_COMPLEX; + return; + } else if (R_f_MPI_BYTE == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_BYTE; + return; + } else if (R_f_MPI_DATATYPE_NULL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_DATATYPE_NULL; + return; + } else if (R_f_MPI_UB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_UB; + return; + } else if (R_f_MPI_PACKED == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_PACKED; + return; + } else if (R_f_MPI_CHARACTER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_CHARACTER; + return; + } else if (R_f_MPI_LB == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LB; + return; + } else if (R_f_MPI_INTEGER == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER; + return; + } else if (R_f_MPI_LOGICAL == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOGICAL; + return; + } else if (R_f_MPI_INTEGER2 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER2; + return; + } else if (R_f_MPI_INTEGER1 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER1; + return; + } else if (R_f_MPI_REAL4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_REAL4; + return; + } else if (R_f_MPI_INTEGER4 == *cr) { + datatype_translation_del_f(*ca); + *ca = (int)A_f_MPI_INTEGER4; + return; + } else + datatype_translation_update_f(*cr, ca); } #define A_f_MPI_MAXLOC 11 @@ -1145,136 +1225,150 @@ datatype_translation_update_f(*cr,ca); #define R_f_MPI_BOR 8 -static inline void operator_a2r(int *ca,int *cr){ -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -operation_translation_get_f(*ca,cr); -User_fct_g_ptr=get_user_fct(*cr); +static inline void operator_a2r(int *ca, int *cr) { + if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else + operation_translation_get_f(*ca, cr); + User_fct_g_ptr = get_user_fct(*cr); } -static inline void operator_r2a(int *ca,int *cr){ -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -operation_translation_update_alloc_f(*cr,ca); -add_user_fct(*cr); - +static inline void operator_r2a(int *ca, int *cr) { + if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else + operation_translation_update_alloc_f(*cr, ca); + add_user_fct(*cr); } -static inline void operator_r2au(int *ca,int *cr){ -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -operation_translation_update_f(*cr,ca); - +static inline void operator_r2au(int *ca, int *cr) { + if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else + operation_translation_update_f(*cr, ca); } #define A_f_MPI_ANY_SOURCE -1 @@ -1284,88 +1378,95 @@ operation_translation_update_f(*cr,ca); #define R_f_MPI_PROC_NULL -2 -static inline void source_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void source_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void source_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void source_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } -static inline void dest_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void dest_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void dest_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; +static inline void dest_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 -static inline void tag_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_TAG==*ca){ -*cr=(int )R_f_MPI_ANY_TAG;return;} -else -*cr=*ca; +static inline void tag_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_TAG == *ca) { + *cr = (int)R_f_MPI_ANY_TAG; + return; + } else + *cr = *ca; } -static inline void tag_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_TAG==*cr){ -*ca=(int )A_f_MPI_ANY_TAG;return;} -else -*ca=*cr; - +static inline void tag_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_TAG == *cr) { + *ca = (int)A_f_MPI_ANY_TAG; + return; + } else + *ca = *cr; } #define A_f_MPI_REQUEST_NULL 0 #define R_f_MPI_REQUEST_NULL 0 -static inline void request_a2r(int *ca,int *cr){ -if(A_f_MPI_REQUEST_NULL==*ca){ -*cr=(int )R_f_MPI_REQUEST_NULL;return;} -else -request_translation_get_f(*ca,cr); +static inline void request_a2r(int *ca, int *cr) { + if (A_f_MPI_REQUEST_NULL == *ca) { + *cr = (int)R_f_MPI_REQUEST_NULL; + return; + } else + request_translation_get_f(*ca, cr); } -static inline void request_r2a(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_alloc_f(*cr,ca); - +static inline void request_r2a(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_alloc_f(*cr, ca); } -static inline void request_r2au(int *ca,int *cr){ -if(R_f_MPI_REQUEST_NULL==*cr){ -request_translation_del_f(*ca);*ca=(int )A_f_MPI_REQUEST_NULL;return;} -else -request_translation_update_f(*cr,ca); - +static inline void request_r2au(int *ca, int *cr) { + if (R_f_MPI_REQUEST_NULL == *cr) { + request_translation_del_f(*ca); + *ca = (int)A_f_MPI_REQUEST_NULL; + return; + } else + request_translation_update_f(*cr, ca); } #define A_f_MPI_GROUP_EMPTY 1 @@ -1375,35 +1476,38 @@ request_translation_update_f(*cr,ca); #define R_f_MPI_GROUP_NULL 0 -static inline void group_a2r(int *ca,int *cr){ -if(A_f_MPI_GROUP_EMPTY==*ca){ -*cr=(int )R_f_MPI_GROUP_EMPTY;return;} -else -if(A_f_MPI_GROUP_NULL==*ca){ -*cr=(int )R_f_MPI_GROUP_NULL;return;} -else -group_translation_get_f(*ca,cr); +static inline void group_a2r(int *ca, int *cr) { + if (A_f_MPI_GROUP_EMPTY == *ca) { + *cr = (int)R_f_MPI_GROUP_EMPTY; + return; + } else if (A_f_MPI_GROUP_NULL == *ca) { + *cr = (int)R_f_MPI_GROUP_NULL; + return; + } else + group_translation_get_f(*ca, cr); } -static inline void group_r2a(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_alloc_f(*cr,ca); - +static inline void group_r2a(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_alloc_f(*cr, ca); } -static inline void group_r2au(int *ca,int *cr){ -if(R_f_MPI_GROUP_EMPTY==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_EMPTY;return;} -else -if(R_f_MPI_GROUP_NULL==*cr){ -group_translation_del_f(*ca);*ca=(int )A_f_MPI_GROUP_NULL;return;} -else -group_translation_update_f(*cr,ca); - +static inline void group_r2au(int *ca, int *cr) { + if (R_f_MPI_GROUP_EMPTY == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_EMPTY; + return; + } else if (R_f_MPI_GROUP_NULL == *cr) { + group_translation_del_f(*ca); + *ca = (int)A_f_MPI_GROUP_NULL; + return; + } else + group_translation_update_f(*cr, ca); } #define A_f_MPI_ERRORS_ARE_FATAL 1 @@ -1417,44 +1521,48 @@ group_translation_update_f(*cr,ca); #define R_f_MPI_ERRORS_RETURN 2 -static inline void err_handler_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void err_handler_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void err_handler_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void err_handler_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void err_handler_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void err_handler_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_CART 1 @@ -1468,31 +1576,32 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_UNDEFINED -32766 -static inline void topo_status_a2r(int *ca,int *cr){ -if(A_f_MPI_CART==*ca){ -*cr=(int )R_f_MPI_CART;return;} -else -if(A_f_MPI_GRAPH==*ca){ -*cr=(int )R_f_MPI_GRAPH;return;} -else -if(A_f_MPI_UNDEFINED==*ca){ -*cr=(int )R_f_MPI_UNDEFINED;return;} -else -*cr=*ca; +static inline void topo_status_a2r(int *ca, int *cr) { + if (A_f_MPI_CART == *ca) { + *cr = (int)R_f_MPI_CART; + return; + } else if (A_f_MPI_GRAPH == *ca) { + *cr = (int)R_f_MPI_GRAPH; + return; + } else if (A_f_MPI_UNDEFINED == *ca) { + *cr = (int)R_f_MPI_UNDEFINED; + return; + } else + *cr = *ca; } -static inline void topo_status_r2a(int *ca,int *cr){ -if(R_f_MPI_CART==*cr){ -*ca=(int )A_f_MPI_CART;return;} -else -if(R_f_MPI_GRAPH==*cr){ -*ca=(int )A_f_MPI_GRAPH;return;} -else -if(R_f_MPI_UNDEFINED==*cr){ -*ca=(int )A_f_MPI_UNDEFINED;return;} -else -*ca=*cr; - +static inline void topo_status_r2a(int *ca, int *cr) { + if (R_f_MPI_CART == *cr) { + *ca = (int)A_f_MPI_CART; + return; + } else if (R_f_MPI_GRAPH == *cr) { + *ca = (int)A_f_MPI_GRAPH; + return; + } else if (R_f_MPI_UNDEFINED == *cr) { + *ca = (int)A_f_MPI_UNDEFINED; + return; + } else + *ca = *cr; } #define A_f_MPI_MAXLOC 11 @@ -1546,144 +1655,153 @@ else #define R_f_MPI_BOR 8 -static inline void operator_del_a2r(int *ca,int *cr){ -if(A_f_MPI_MAXLOC==*ca){ -*cr=(int )R_f_MPI_MAXLOC;return;} -else -if(A_f_MPI_BXOR==*ca){ -*cr=(int )R_f_MPI_BXOR;return;} -else -if(A_f_MPI_MINLOC==*ca){ -*cr=(int )R_f_MPI_MINLOC;return;} -else -if(A_f_MPI_MAX==*ca){ -*cr=(int )R_f_MPI_MAX;return;} -else -if(A_f_MPI_OP_NULL==*ca){ -*cr=(int )R_f_MPI_OP_NULL;return;} -else -if(A_f_MPI_SUM==*ca){ -*cr=(int )R_f_MPI_SUM;return;} -else -if(A_f_MPI_MIN==*ca){ -*cr=(int )R_f_MPI_MIN;return;} -else -if(A_f_MPI_LAND==*ca){ -*cr=(int )R_f_MPI_LAND;return;} -else -if(A_f_MPI_PROD==*ca){ -*cr=(int )R_f_MPI_PROD;return;} -else -if(A_f_MPI_LOR==*ca){ -*cr=(int )R_f_MPI_LOR;return;} -else -if(A_f_MPI_BAND==*ca){ -*cr=(int )R_f_MPI_BAND;return;} -else -if(A_f_MPI_LXOR==*ca){ -*cr=(int )R_f_MPI_LXOR;return;} -else -if(A_f_MPI_BOR==*ca){ -*cr=(int )R_f_MPI_BOR;return;} -else -operation_translation_get_f(*ca,cr); -del_usr_fct(*cr); -} - -static inline void operator_del_r2a(int *ca,int *cr){ -if(R_f_MPI_MAXLOC==*cr){ -*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -*ca=(int )A_f_MPI_BOR;return;} -else -operation_translation_update_alloc_f(*cr,ca); - +static inline void operator_del_a2r(int *ca, int *cr) { + if (A_f_MPI_MAXLOC == *ca) { + *cr = (int)R_f_MPI_MAXLOC; + return; + } else if (A_f_MPI_BXOR == *ca) { + *cr = (int)R_f_MPI_BXOR; + return; + } else if (A_f_MPI_MINLOC == *ca) { + *cr = (int)R_f_MPI_MINLOC; + return; + } else if (A_f_MPI_MAX == *ca) { + *cr = (int)R_f_MPI_MAX; + return; + } else if (A_f_MPI_OP_NULL == *ca) { + *cr = (int)R_f_MPI_OP_NULL; + return; + } else if (A_f_MPI_SUM == *ca) { + *cr = (int)R_f_MPI_SUM; + return; + } else if (A_f_MPI_MIN == *ca) { + *cr = (int)R_f_MPI_MIN; + return; + } else if (A_f_MPI_LAND == *ca) { + *cr = (int)R_f_MPI_LAND; + return; + } else if (A_f_MPI_PROD == *ca) { + *cr = (int)R_f_MPI_PROD; + return; + } else if (A_f_MPI_LOR == *ca) { + *cr = (int)R_f_MPI_LOR; + return; + } else if (A_f_MPI_BAND == *ca) { + *cr = (int)R_f_MPI_BAND; + return; + } else if (A_f_MPI_LXOR == *ca) { + *cr = (int)R_f_MPI_LXOR; + return; + } else if (A_f_MPI_BOR == *ca) { + *cr = (int)R_f_MPI_BOR; + return; + } else + operation_translation_get_f(*ca, cr); + del_usr_fct(*cr); } -static inline void operator_del_r2au(int *ca,int *cr){ -if(R_f_MPI_MAXLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAXLOC;return;} -else -if(R_f_MPI_BXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BXOR;return;} -else -if(R_f_MPI_MINLOC==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MINLOC;return;} -else -if(R_f_MPI_MAX==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MAX;return;} -else -if(R_f_MPI_OP_NULL==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_OP_NULL;return;} -else -if(R_f_MPI_SUM==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_SUM;return;} -else -if(R_f_MPI_MIN==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_MIN;return;} -else -if(R_f_MPI_LAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LAND;return;} -else -if(R_f_MPI_PROD==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_PROD;return;} -else -if(R_f_MPI_LOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LOR;return;} -else -if(R_f_MPI_BAND==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BAND;return;} -else -if(R_f_MPI_LXOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_LXOR;return;} -else -if(R_f_MPI_BOR==*cr){ -operation_translation_del_f(*ca);*ca=(int )A_f_MPI_BOR;return;} -else -operation_translation_update_f(*cr,ca); +static inline void operator_del_r2a(int *ca, int *cr) { + if (R_f_MPI_MAXLOC == *cr) { + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + *ca = (int)A_f_MPI_BOR; + return; + } else + operation_translation_update_alloc_f(*cr, ca); } -static inline void delete_ptr_converter_a2r(void **ca,void **cr){ -*cr=*ca; +static inline void operator_del_r2au(int *ca, int *cr) { + if (R_f_MPI_MAXLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAXLOC; + return; + } else if (R_f_MPI_BXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BXOR; + return; + } else if (R_f_MPI_MINLOC == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MINLOC; + return; + } else if (R_f_MPI_MAX == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MAX; + return; + } else if (R_f_MPI_OP_NULL == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_OP_NULL; + return; + } else if (R_f_MPI_SUM == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_SUM; + return; + } else if (R_f_MPI_MIN == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_MIN; + return; + } else if (R_f_MPI_LAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LAND; + return; + } else if (R_f_MPI_PROD == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_PROD; + return; + } else if (R_f_MPI_LOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LOR; + return; + } else if (R_f_MPI_BAND == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BAND; + return; + } else if (R_f_MPI_LXOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_LXOR; + return; + } else if (R_f_MPI_BOR == *cr) { + operation_translation_del_f(*ca); + *ca = (int)A_f_MPI_BOR; + return; + } else + operation_translation_update_f(*cr, ca); } +static inline void delete_ptr_converter_a2r(void **ca, void **cr) { *cr = *ca; } -static inline void delete_ptr_converter_r2a(void **ca,void **cr){ -*ca=*cr; - -} +static inline void delete_ptr_converter_r2a(void **ca, void **cr) { *ca = *cr; } #define A_f_MPI_ERRORS_ARE_FATAL 1 #define R_f_MPI_ERRORS_ARE_FATAL 1 @@ -1696,44 +1814,48 @@ static inline void delete_ptr_converter_r2a(void **ca,void **cr){ #define R_f_MPI_ERRORS_RETURN 2 -static inline void errhandler_converter_a2r(int *ca,int *cr){ -if(A_f_MPI_ERRORS_ARE_FATAL==*ca){ -*cr=(int )R_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(A_f_MPI_ERRHANDLER_NULL==*ca){ -*cr=(int )R_f_MPI_ERRHANDLER_NULL;return;} -else -if(A_f_MPI_ERRORS_RETURN==*ca){ -*cr=(int )R_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_get_f(*ca,cr); +static inline void errhandler_converter_a2r(int *ca, int *cr) { + if (A_f_MPI_ERRORS_ARE_FATAL == *ca) { + *cr = (int)R_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (A_f_MPI_ERRHANDLER_NULL == *ca) { + *cr = (int)R_f_MPI_ERRHANDLER_NULL; + return; + } else if (A_f_MPI_ERRORS_RETURN == *ca) { + *cr = (int)R_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_get_f(*ca, cr); } -static inline void errhandler_converter_r2a(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_alloc_f(*cr,ca); - +static inline void errhandler_converter_r2a(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_alloc_f(*cr, ca); } -static inline void errhandler_converter_r2au(int *ca,int *cr){ -if(R_f_MPI_ERRORS_ARE_FATAL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_ARE_FATAL;return;} -else -if(R_f_MPI_ERRHANDLER_NULL==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRHANDLER_NULL;return;} -else -if(R_f_MPI_ERRORS_RETURN==*cr){ -errhandler_translation_del_f(*ca);*ca=(int )A_f_MPI_ERRORS_RETURN;return;} -else -errhandler_translation_update_f(*cr,ca); - +static inline void errhandler_converter_r2au(int *ca, int *cr) { + if (R_f_MPI_ERRORS_ARE_FATAL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_ARE_FATAL; + return; + } else if (R_f_MPI_ERRHANDLER_NULL == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRHANDLER_NULL; + return; + } else if (R_f_MPI_ERRORS_RETURN == *cr) { + errhandler_translation_del_f(*ca); + *ca = (int)A_f_MPI_ERRORS_RETURN; + return; + } else + errhandler_translation_update_f(*cr, ca); } #define A_f_MPI_HOST 1 @@ -1779,116 +1901,128 @@ errhandler_translation_update_f(*cr,ca); #define R_f_MPI_WIN_SIZE 8 -static inline void keyval_a2r(int *ca,int *cr){ -if(A_f_MPI_HOST==*ca){ -*cr=(int )R_f_MPI_HOST;return;} -else -if(A_f_MPI_TAG_UB==*ca){ -*cr=(int )R_f_MPI_TAG_UB;return;} -else -if(A_f_MPI_WTIME_IS_GLOBAL==*ca){ -*cr=(int )R_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(A_f_MPI_IO==*ca){ -*cr=(int )R_f_MPI_IO;return;} -else -if(A_f_MPI_KEYVAL_INVALID==*ca){ -*cr=(int )R_f_MPI_KEYVAL_INVALID;return;} -else -if(A_f_MPI_APPNUM==*ca){ -*cr=(int )R_f_MPI_APPNUM;return;} -else -if(A_f_MPI_WIN_BASE==*ca){ -*cr=(int )R_f_MPI_WIN_BASE;return;} -else -if(A_f_MPI_UNIVERSE_SIZE==*ca){ -*cr=(int )R_f_MPI_UNIVERSE_SIZE;return;} -else -if(A_f_MPI_WIN_DISP_UNIT==*ca){ -*cr=(int )R_f_MPI_WIN_DISP_UNIT;return;} -else -if(A_f_MPI_LASTUSEDCODE==*ca){ -*cr=(int )R_f_MPI_LASTUSEDCODE;return;} -else -if(A_f_MPI_WIN_SIZE==*ca){ -*cr=(int )R_f_MPI_WIN_SIZE;return;} -else -keyval_translation_get_f(*ca,cr); +static inline void keyval_a2r(int *ca, int *cr) { + if (A_f_MPI_HOST == *ca) { + *cr = (int)R_f_MPI_HOST; + return; + } else if (A_f_MPI_TAG_UB == *ca) { + *cr = (int)R_f_MPI_TAG_UB; + return; + } else if (A_f_MPI_WTIME_IS_GLOBAL == *ca) { + *cr = (int)R_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (A_f_MPI_IO == *ca) { + *cr = (int)R_f_MPI_IO; + return; + } else if (A_f_MPI_KEYVAL_INVALID == *ca) { + *cr = (int)R_f_MPI_KEYVAL_INVALID; + return; + } else if (A_f_MPI_APPNUM == *ca) { + *cr = (int)R_f_MPI_APPNUM; + return; + } else if (A_f_MPI_WIN_BASE == *ca) { + *cr = (int)R_f_MPI_WIN_BASE; + return; + } else if (A_f_MPI_UNIVERSE_SIZE == *ca) { + *cr = (int)R_f_MPI_UNIVERSE_SIZE; + return; + } else if (A_f_MPI_WIN_DISP_UNIT == *ca) { + *cr = (int)R_f_MPI_WIN_DISP_UNIT; + return; + } else if (A_f_MPI_LASTUSEDCODE == *ca) { + *cr = (int)R_f_MPI_LASTUSEDCODE; + return; + } else if (A_f_MPI_WIN_SIZE == *ca) { + *cr = (int)R_f_MPI_WIN_SIZE; + return; + } else + keyval_translation_get_f(*ca, cr); } -static inline void keyval_r2a(int *ca,int *cr){ -if(R_f_MPI_HOST==*cr){ -*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(R_f_MPI_IO==*cr){ -*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_APPNUM==*cr){ -*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -keyval_translation_update_alloc_f(*cr,ca); - +static inline void keyval_r2a(int *ca, int *cr) { + if (R_f_MPI_HOST == *cr) { + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (R_f_MPI_IO == *cr) { + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_APPNUM == *cr) { + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else + keyval_translation_update_alloc_f(*cr, ca); } -static inline void keyval_r2au(int *ca,int *cr){ -if(R_f_MPI_HOST==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_HOST;return;} -else -if(R_f_MPI_TAG_UB==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_TAG_UB;return;} -else -if(R_f_MPI_WTIME_IS_GLOBAL==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WTIME_IS_GLOBAL;return;} -else -if(R_f_MPI_IO==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_IO;return;} -else -if(R_f_MPI_KEYVAL_INVALID==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_KEYVAL_INVALID;return;} -else -if(R_f_MPI_APPNUM==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_APPNUM;return;} -else -if(R_f_MPI_WIN_BASE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_BASE;return;} -else -if(R_f_MPI_UNIVERSE_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_UNIVERSE_SIZE;return;} -else -if(R_f_MPI_WIN_DISP_UNIT==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_DISP_UNIT;return;} -else -if(R_f_MPI_LASTUSEDCODE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_LASTUSEDCODE;return;} -else -if(R_f_MPI_WIN_SIZE==*cr){ -keyval_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_SIZE;return;} -else -keyval_translation_update_f(*cr,ca); - +static inline void keyval_r2au(int *ca, int *cr) { + if (R_f_MPI_HOST == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_HOST; + return; + } else if (R_f_MPI_TAG_UB == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_TAG_UB; + return; + } else if (R_f_MPI_WTIME_IS_GLOBAL == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WTIME_IS_GLOBAL; + return; + } else if (R_f_MPI_IO == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_IO; + return; + } else if (R_f_MPI_KEYVAL_INVALID == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_KEYVAL_INVALID; + return; + } else if (R_f_MPI_APPNUM == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_APPNUM; + return; + } else if (R_f_MPI_WIN_BASE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_BASE; + return; + } else if (R_f_MPI_UNIVERSE_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_UNIVERSE_SIZE; + return; + } else if (R_f_MPI_WIN_DISP_UNIT == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_DISP_UNIT; + return; + } else if (R_f_MPI_LASTUSEDCODE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_LASTUSEDCODE; + return; + } else if (R_f_MPI_WIN_SIZE == *cr) { + keyval_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_SIZE; + return; + } else + keyval_translation_update_f(*cr, ca); } #define A_f_MPI_ANY_SOURCE -1 @@ -1898,50 +2032,53 @@ keyval_translation_update_f(*cr,ca); #define R_f_MPI_PROC_NULL -2 -static inline void rank_mapper_a2r(int *ca,int *cr){ -if(A_f_MPI_ANY_SOURCE==*ca){ -*cr=(int )R_f_MPI_ANY_SOURCE;return;} -else -if(A_f_MPI_PROC_NULL==*ca){ -*cr=(int )R_f_MPI_PROC_NULL;return;} -else -*cr=*ca; +static inline void rank_mapper_a2r(int *ca, int *cr) { + if (A_f_MPI_ANY_SOURCE == *ca) { + *cr = (int)R_f_MPI_ANY_SOURCE; + return; + } else if (A_f_MPI_PROC_NULL == *ca) { + *cr = (int)R_f_MPI_PROC_NULL; + return; + } else + *cr = *ca; } -static inline void rank_mapper_r2a(int *ca,int *cr){ -if(R_f_MPI_ANY_SOURCE==*cr){ -*ca=(int )A_f_MPI_ANY_SOURCE;return;} -else -if(R_f_MPI_PROC_NULL==*cr){ -*ca=(int )A_f_MPI_PROC_NULL;return;} -else -*ca=*cr; - +static inline void rank_mapper_r2a(int *ca, int *cr) { + if (R_f_MPI_ANY_SOURCE == *cr) { + *ca = (int)A_f_MPI_ANY_SOURCE; + return; + } else if (R_f_MPI_PROC_NULL == *cr) { + *ca = (int)A_f_MPI_PROC_NULL; + return; + } else + *ca = *cr; } #define A_f_MPI_INFO_NULL 0 #define R_f_MPI_INFO_NULL 0 -static inline void info_a2r(int *ca,int *cr){ -if(A_f_MPI_INFO_NULL==*ca){ -*cr=(int )R_f_MPI_INFO_NULL;return;} -else -info_translation_get_f(*ca,cr); +static inline void info_a2r(int *ca, int *cr) { + if (A_f_MPI_INFO_NULL == *ca) { + *cr = (int)R_f_MPI_INFO_NULL; + return; + } else + info_translation_get_f(*ca, cr); } -static inline void info_r2a(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_alloc_f(*cr,ca); - +static inline void info_r2a(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_alloc_f(*cr, ca); } -static inline void info_r2au(int *ca,int *cr){ -if(R_f_MPI_INFO_NULL==*cr){ -info_translation_del_f(*ca);*ca=(int )A_f_MPI_INFO_NULL;return;} -else -info_translation_update_f(*cr,ca); - +static inline void info_r2au(int *ca, int *cr) { + if (R_f_MPI_INFO_NULL == *cr) { + info_translation_del_f(*ca); + *ca = (int)A_f_MPI_INFO_NULL; + return; + } else + info_translation_update_f(*cr, ca); } #define A_f_MPI_ORDER_FORTRAN 1 @@ -1951,25 +2088,26 @@ info_translation_update_f(*cr,ca); #define R_f_MPI_ORDER_C 0 -static inline void order_a2r(int *ca,int *cr){ -if(A_f_MPI_ORDER_FORTRAN==*ca){ -*cr=(int )R_f_MPI_ORDER_FORTRAN;return;} -else -if(A_f_MPI_ORDER_C==*ca){ -*cr=(int )R_f_MPI_ORDER_C;return;} -else -*cr=*ca; +static inline void order_a2r(int *ca, int *cr) { + if (A_f_MPI_ORDER_FORTRAN == *ca) { + *cr = (int)R_f_MPI_ORDER_FORTRAN; + return; + } else if (A_f_MPI_ORDER_C == *ca) { + *cr = (int)R_f_MPI_ORDER_C; + return; + } else + *cr = *ca; } -static inline void order_r2a(int *ca,int *cr){ -if(R_f_MPI_ORDER_FORTRAN==*cr){ -*ca=(int )A_f_MPI_ORDER_FORTRAN;return;} -else -if(R_f_MPI_ORDER_C==*cr){ -*ca=(int )A_f_MPI_ORDER_C;return;} -else -*ca=*cr; - +static inline void order_r2a(int *ca, int *cr) { + if (R_f_MPI_ORDER_FORTRAN == *cr) { + *ca = (int)A_f_MPI_ORDER_FORTRAN; + return; + } else if (R_f_MPI_ORDER_C == *cr) { + *ca = (int)A_f_MPI_ORDER_C; + return; + } else + *ca = *cr; } #define A_f_MPI_DISTRIBUTE_CYCLIC 1 @@ -1987,37 +2125,38 @@ else #define R_f_MPI_DISTRIBUTE_DFLT_DARG -1 -static inline void order2_a2r(int *ca,int *cr){ -if(A_f_MPI_DISTRIBUTE_CYCLIC==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(A_f_MPI_DISTRIBUTE_BLOCK==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(A_f_MPI_DISTRIBUTE_NONE==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_NONE;return;} -else -if(A_f_MPI_DISTRIBUTE_DFLT_DARG==*ca){ -*cr=(int )R_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -*cr=*ca; +static inline void order2_a2r(int *ca, int *cr) { + if (A_f_MPI_DISTRIBUTE_CYCLIC == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (A_f_MPI_DISTRIBUTE_BLOCK == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (A_f_MPI_DISTRIBUTE_NONE == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_NONE; + return; + } else if (A_f_MPI_DISTRIBUTE_DFLT_DARG == *ca) { + *cr = (int)R_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else + *cr = *ca; } -static inline void order2_r2a(int *ca,int *cr){ -if(R_f_MPI_DISTRIBUTE_CYCLIC==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_CYCLIC;return;} -else -if(R_f_MPI_DISTRIBUTE_BLOCK==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_BLOCK;return;} -else -if(R_f_MPI_DISTRIBUTE_NONE==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_NONE;return;} -else -if(R_f_MPI_DISTRIBUTE_DFLT_DARG==*cr){ -*ca=(int )A_f_MPI_DISTRIBUTE_DFLT_DARG;return;} -else -*ca=*cr; - +static inline void order2_r2a(int *ca, int *cr) { + if (R_f_MPI_DISTRIBUTE_CYCLIC == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_CYCLIC; + return; + } else if (R_f_MPI_DISTRIBUTE_BLOCK == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_BLOCK; + return; + } else if (R_f_MPI_DISTRIBUTE_NONE == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_NONE; + return; + } else if (R_f_MPI_DISTRIBUTE_DFLT_DARG == *cr) { + *ca = (int)A_f_MPI_DISTRIBUTE_DFLT_DARG; + return; + } else + *ca = *cr; } #define A_f_MPI_LOCK_EXCLUSIVE 1 @@ -2027,50 +2166,53 @@ else #define R_f_MPI_LOCK_SHARED 2 -static inline void win_lock_a2r(int *ca,int *cr){ -if(A_f_MPI_LOCK_EXCLUSIVE==*ca){ -*cr=(int )R_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(A_f_MPI_LOCK_SHARED==*ca){ -*cr=(int )R_f_MPI_LOCK_SHARED;return;} -else -*cr=*ca; +static inline void win_lock_a2r(int *ca, int *cr) { + if (A_f_MPI_LOCK_EXCLUSIVE == *ca) { + *cr = (int)R_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (A_f_MPI_LOCK_SHARED == *ca) { + *cr = (int)R_f_MPI_LOCK_SHARED; + return; + } else + *cr = *ca; } -static inline void win_lock_r2a(int *ca,int *cr){ -if(R_f_MPI_LOCK_EXCLUSIVE==*cr){ -*ca=(int )A_f_MPI_LOCK_EXCLUSIVE;return;} -else -if(R_f_MPI_LOCK_SHARED==*cr){ -*ca=(int )A_f_MPI_LOCK_SHARED;return;} -else -*ca=*cr; - +static inline void win_lock_r2a(int *ca, int *cr) { + if (R_f_MPI_LOCK_EXCLUSIVE == *cr) { + *ca = (int)A_f_MPI_LOCK_EXCLUSIVE; + return; + } else if (R_f_MPI_LOCK_SHARED == *cr) { + *ca = (int)A_f_MPI_LOCK_SHARED; + return; + } else + *ca = *cr; } #define A_f_MPI_WIN_NULL 0 #define R_f_MPI_WIN_NULL 0 -static inline void fwin_a2r(int *ca,int *cr){ -if(A_f_MPI_WIN_NULL==*ca){ -*cr=(int )R_f_MPI_WIN_NULL;return;} -else -win_translation_get_f(*ca,cr); +static inline void fwin_a2r(int *ca, int *cr) { + if (A_f_MPI_WIN_NULL == *ca) { + *cr = (int)R_f_MPI_WIN_NULL; + return; + } else + win_translation_get_f(*ca, cr); } -static inline void fwin_r2a(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_alloc_f(*cr,ca); - +static inline void fwin_r2a(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_alloc_f(*cr, ca); } -static inline void fwin_r2au(int *ca,int *cr){ -if(R_f_MPI_WIN_NULL==*cr){ -win_translation_del_f(*ca);*ca=(int )A_f_MPI_WIN_NULL;return;} -else -win_translation_update_f(*cr,ca); - +static inline void fwin_r2au(int *ca, int *cr) { + if (R_f_MPI_WIN_NULL == *cr) { + win_translation_del_f(*ca); + *ca = (int)A_f_MPI_WIN_NULL; + return; + } else + win_translation_update_f(*cr, ca); } #define A_f_MPI_MESSAGE_NO_PROC 1 @@ -2080,70 +2222,75 @@ win_translation_update_f(*cr,ca); #define R_f_MPI_MESSAGE_NULL 0 -static inline void message_a2r(int *ca,int *cr){ -if(A_f_MPI_MESSAGE_NO_PROC==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NO_PROC;return;} -else -if(A_f_MPI_MESSAGE_NULL==*ca){ -*cr=(int )R_f_MPI_MESSAGE_NULL;return;} -else -message_translation_get_f(*ca,cr); +static inline void message_a2r(int *ca, int *cr) { + if (A_f_MPI_MESSAGE_NO_PROC == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NO_PROC; + return; + } else if (A_f_MPI_MESSAGE_NULL == *ca) { + *cr = (int)R_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_get_f(*ca, cr); } -static inline void message_r2a(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_alloc_f(*cr,ca); - +static inline void message_r2a(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_alloc_f(*cr, ca); } -static inline void message_r2au(int *ca,int *cr){ -if(R_f_MPI_MESSAGE_NO_PROC==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NO_PROC;return;} -else -if(R_f_MPI_MESSAGE_NULL==*cr){ -message_translation_del_f(*ca);*ca=(int )A_f_MPI_MESSAGE_NULL;return;} -else -message_translation_update_f(*cr,ca); - +static inline void message_r2au(int *ca, int *cr) { + if (R_f_MPI_MESSAGE_NO_PROC == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NO_PROC; + return; + } else if (R_f_MPI_MESSAGE_NULL == *cr) { + message_translation_del_f(*ca); + *ca = (int)A_f_MPI_MESSAGE_NULL; + return; + } else + message_translation_update_f(*cr, ca); } #define A_f_MPI_FILE_NULL 0 #define R_f_MPI_FILE_NULL 0 -static inline void file_a2r(int *ca,int *cr){ -if(A_f_MPI_FILE_NULL==*ca){ -*cr=(int )R_f_MPI_FILE_NULL;return;} -else -file_translation_get_f(*ca,cr); +static inline void file_a2r(int *ca, int *cr) { + if (A_f_MPI_FILE_NULL == *ca) { + *cr = (int)R_f_MPI_FILE_NULL; + return; + } else + file_translation_get_f(*ca, cr); } -static inline void file_r2a(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_alloc_f(*cr,ca); - +static inline void file_r2a(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_alloc_f(*cr, ca); } -static inline void file_r2au(int *ca,int *cr){ -if(R_f_MPI_FILE_NULL==*cr){ -file_translation_del_f(*ca);*ca=(int )A_f_MPI_FILE_NULL;return;} -else -file_translation_update_f(*cr,ca); - +static inline void file_r2au(int *ca, int *cr) { + if (R_f_MPI_FILE_NULL == *cr) { + file_translation_del_f(*ca); + *ca = (int)A_f_MPI_FILE_NULL; + return; + } else + file_translation_update_f(*cr, ca); } - #define A_f_MPI_STATUS_SIZE 6 - #define A_f_MPI_SOURCE 1 - #define A_f_MPI_TAG 2 - #define A_f_MPI_ERROR 3 - - #define R_f_MPI_STATUS_SIZE 6 - #define R_f_MPI_SOURCE 1 - #define R_f_MPI_TAG 2 - #define R_f_MPI_ERROR 3 +#define A_f_MPI_STATUS_SIZE 6 +#define A_f_MPI_SOURCE 1 +#define A_f_MPI_TAG 2 +#define A_f_MPI_ERROR 3 + +#define R_f_MPI_STATUS_SIZE 6 +#define R_f_MPI_SOURCE 1 +#define R_f_MPI_TAG 2 +#define R_f_MPI_ERROR 3 #include "manual_wrapper.h" #endif From 06d2b23258bdbce6edaefecf24db907b33f804a7 Mon Sep 17 00:00:00 2001 From: Clement FONTENAILLE Date: Thu, 28 Sep 2023 09:51:56 +0200 Subject: [PATCH 3/3] added combiner mapper and implementation in wrapper ; used clang-format on C and FORTRAN generator files ; fixes issue 51 --- generator/C/functions.json | 28 +- generator/C/mappers.json | 80 ++--- generator/FORTRAN/functions.json | 72 ++-- generator/FORTRAN/mappers_f.json | 386 ++++++++++----------- src/common/mappers.h | 38 +- src/interface/gen/interface_fort.c | 2 +- src/interface/gen/mpi_translation_c.c | 5 +- src/interface/gen/mpi_translation_fort.c | 7 +- src/preload/gen/mpi_translation_c.c | 5 +- src/preload/gen/mpi_translation_fort.c | 7 +- src/preload/header/INTEL_INTEL/wrapper_f.h | 72 ++++ src/preload/header/INTEL_MPICH/wrapper_f.h | 74 ++++ src/preload/header/INTEL_OMPI/wrapper_f.h | 72 ++++ src/preload/header/MPICH_INTEL/wrapper_f.h | 75 ++++ src/preload/header/MPICH_MPICH/wrapper_f.h | 74 ++++ src/preload/header/MPICH_OMPI/wrapper_f.h | 74 ++++ src/preload/header/OMPI_INTEL/wrapper_f.h | 73 ++++ src/preload/header/OMPI_MPICH/wrapper_f.h | 74 ++++ src/preload/header/OMPI_OMPI/wrapper_f.h | 74 ++++ 19 files changed, 981 insertions(+), 311 deletions(-) diff --git a/generator/C/functions.json b/generator/C/functions.json index 9a7a00c..3ecd19d 100755 --- a/generator/C/functions.json +++ b/generator/C/functions.json @@ -2,22 +2,22 @@ { "args": [ { - "var":"level", - "arg_dep": "", - "In": 0, - "name": "int_mapper", - "Out": 0 + "var":"level", + "arg_dep": "", + "In": 0, + "name": "int_mapper", + "Out": 0 } ], "name": "MPI_Pcontrol", "ret": { - "var": "ret", - "arg_dep": "", - "In": 0, - "name": "error_converter", - "Out": 1 - } - }, + "var": "ret", + "arg_dep": "", + "In": 0, + "name": "error_converter", + "Out": 1 + } + }, { "args": [ { @@ -31,7 +31,7 @@ "var": "count", "arg_dep": "", "In": 1, - "name": "int_mapper", + "name": "int_mapper", "Out": 0 }, { @@ -6823,7 +6823,7 @@ "var": "combiner", "arg_dep": "", "In": 0, - "name": "combiner_ptr_mapper", + "name": "combiner_ptr_converter", "Out": 1 } ], diff --git a/generator/C/mappers.json b/generator/C/mappers.json index 26311ee..2dff227 100644 --- a/generator/C/mappers.json +++ b/generator/C/mappers.json @@ -1,12 +1,12 @@ { - "reduce_user_fn_converter": { + "reduce_user_fn_converter": { "local_alloc": 0, "a2r": "reduce_user_fn_a2r", "type": "MPI_User_function *", "r2a": "reduce_user_fn_r2a", "debug_type":"%p" }, - "type_delete_attr_fn_converter": { + "type_delete_attr_fn_converter": { "local_alloc": 0, "a2r": "type_delete_attr_fn_conv_a2r", "type": "MPI_Type_delete_attr_function *", @@ -33,7 +33,7 @@ "wrapped": "wrapper_grequest_query_function" , "debug_type":"%p" }, - "grequest_query_fn": { + "grequest_query_fn": { "local_alloc": 0, "a2r": "grequest_query_fn_a2r", "type": "MPI_Grequest_query_function *", @@ -57,60 +57,60 @@ "wrap": "ptr_win_dlt_fn", "wrapped": "wrapper_win_delete_function" }, - "pvar_session_ptr_mapper": { + "pvar_session_ptr_mapper": { "local_alloc": 1, "a2r": "pvar_session_conv_a2r", "type": "MPI_T_pvar_session *", "r2a": "pvar_session_conv_r2a", "debug_type":"%p" }, - "pvar_session_mapper": { + "pvar_session_mapper": { "local_alloc": 0, "a2r": "pvar_session_conv_a2r", "type": "MPI_T_pvar_session", "r2a": "pvar_session_conv_r2a" }, - "pvar_handle_ptr_mapper": { + "pvar_handle_ptr_mapper": { "local_alloc": 1, "a2r": "pvar_handle_conv_a2r", "type": "MPI_T_pvar_handle *", "r2a": "pvar_handle_conv_r2a", "debug_type":"%p" }, - "pvar_handle_mapper": { + "pvar_handle_mapper": { "local_alloc": 0, "a2r": "pvar_handle_conv_a2r", "type": "MPI_T_pvar_handle", "r2a": "pvar_handle_conv_r2a" }, - "cvar_handle_ptr_mapper": { + "cvar_handle_ptr_mapper": { "local_alloc": 1, "a2r": "cvar_handle_conv_a2r", "type": "MPI_T_cvar_handle *", "r2a": "cvar_handle_conv_r2a", "debug_type":"%p" }, - "cvar_handle_mapper": { + "cvar_handle_mapper": { "local_alloc": 0, "a2r": "cvar_handle_conv_a2r", "type": "MPI_T_cvar_handle", "r2a": "cvar_handle_conv_r2a" }, - "t_enum_mapper": { + "t_enum_mapper": { "local_alloc": 0, "a2r": "t_enum_conv_a2r", "type": "MPI_T_enum", "r2a": "t_enum_conv_r2a", "debug_type":"%d" }, - "t_enum_ptr_mapper": { + "t_enum_ptr_mapper": { "local_alloc": 1, "a2r": "t_enum_conv_a2r", "type": "MPI_T_enum *", "r2a": "t_enum_conv_r2a", "debug_type":"%d" }, - "typeclass_mapper": { + "typeclass_mapper": { "local_alloc": 0, "a2r": "typeclass_conv_a2r", "type": "int", @@ -138,35 +138,35 @@ "r2a": "lock_conv_r2a", "debug_type":"%d" }, - "win_attr_mapper": { + "win_attr_mapper": { "local_alloc": 0, "a2r": "win_attr_conv_a2r", "type": "void *", "r2a": "win_attr_conv_r2a", "debug_type":"%p" }, - "assert_mapper": { + "assert_mapper": { "local_alloc": 0, "a2r": "assert_mode_a2r", "type": "int", "r2a": "assert_mode_r2a", "debug_type":"%d" }, - "keyval_mapper": { + "keyval_mapper": { "local_alloc": 0, "a2r": "my_keyval_a2r", "type": "int", "r2a": "my_keyval_r2a", "debug_type":"%d" }, - "keyval_ptr_mapper": { + "keyval_ptr_mapper": { "local_alloc": 1, "a2r": "my_keyval_a2r", "type": "int *", "r2a": "my_keyval_r2a", "debug_type":"%*d" }, - "order2_converter":{ + "order2_converter":{ "local_alloc": 0, "init_alloc" : "0", "a2r": "order2_conv_a2r", @@ -174,7 +174,7 @@ "r2a": "order2_conv_r2a", "debug_type":"%d" }, - "order_converter":{ + "order_converter":{ "local_alloc": 0, "init_alloc" : "0", "a2r": "order_conv_a2r", @@ -206,11 +206,11 @@ "debug_type":"%p" }, "Request_ptr_delete":{ - "local_alloc" : 0, - "a2r": "request_ptr_delete", - "type": "void *", - "r2a": "request_ptr_delete", - "debug_type":"%p" + "local_alloc" : 0, + "a2r": "request_ptr_delete", + "type": "void *", + "r2a": "request_ptr_delete", + "debug_type":"%p" }, "Request_cancel_converter":{ "local_alloc" : 1, @@ -456,11 +456,11 @@ }, "datarep_extent_converter": { "local_alloc": 0, - "a2r": "datarep_extent_function_converter_a2r", - "type": "MPI_Datarep_extent_function *", - "r2a": "datarep_extent_function_converter_r2a", + "a2r": "datarep_extent_function_converter_a2r", + "type": "MPI_Datarep_extent_function *", + "r2a": "datarep_extent_function_converter_r2a", "debug_type":"%p" - }, + }, "t_pvar_handle_converter": { "local_alloc": 0, "a2r": "t_pvar_handle_conv_a2r", @@ -555,7 +555,7 @@ "r2a": "message_conv_r2a", "debug_type":"%p" }, - "message_ptr_converter": { + "message_ptr_converter": { "local_alloc": 1, "a2r": "message_conv_a2r", "type": "MPI_Message *", @@ -597,7 +597,7 @@ "set": "true", "debug_type": "%*d" }, - "error_ptr_converter_2": { + "error_ptr_converter_2": { "local_alloc": 0, "a2r": "error_ptr_conv_a2r", "type": "int *", @@ -643,16 +643,16 @@ }, "combiner_converter":{ "local_alloc" : 0, - "a2r": "dest_conv_a2r", + "a2r": "combiner_conv_a2r", "type": "int", - "r2a": "dest_conv_r2a", + "r2a": "combiner_conv_r2a", "debug_type":"%d" }, "combiner_ptr_converter":{ "local_alloc" : 1, - "a2r": "dest_conv_a2r", + "a2r": "combiner_conv_a2r", "type": "int *", - "r2a": "dest_conv_r2a", + "r2a": "combiner_conv_r2a", "debug_type":"%*d" }, "datarep_conversion_re_ptr_converter": { @@ -673,7 +673,7 @@ "wrapped": "wrapper_datarep_write_conversion_fn", "debug_type":"%p" }, - "datarep_conversion_function": { + "datarep_conversion_function": { "local_alloc": 0, "a2r": "datarep_conversion_function_a2r", "type": "MPI_Datarep_conversion_function *", @@ -830,7 +830,7 @@ "r2a": "t_enum_ptr_conv_r2a", "no_map" : "TRUE", "debug_type":"%d" - }, + }, "info_ptr_converter": { "local_alloc": 1, "a2r": "info_conv_a2r", @@ -903,11 +903,11 @@ "debug_type":"%p" }, "comm_errhandler_ptr_mapper":{ - "local_alloc": 1, - "a2r": "errhandler_conv_a2r", - "type": "MPI_Errhandler *", - "r2a": "errhandler_ptr_conv_r2a", - "debug_type":"%p" + "local_alloc": 1, + "a2r": "errhandler_conv_a2r", + "type": "MPI_Errhandler *", + "r2a": "errhandler_ptr_conv_r2a", + "debug_type":"%p" }, "char_ptr_ptr_converter": { "local_alloc": 0, diff --git a/generator/FORTRAN/functions.json b/generator/FORTRAN/functions.json index a577fd6..0a82bcb 100644 --- a/generator/FORTRAN/functions.json +++ b/generator/FORTRAN/functions.json @@ -1,23 +1,23 @@ [ - { + { "args": [ { - "var":"level", - "arg_dep": "", - "In": 0, - "name": "int_mapper", - "Out": 0 + "var":"level", + "arg_dep": "", + "In": 0, + "name": "int_mapper", + "Out": 0 } ], "name": "MPI_Pcontrol", "ret": { - "var": "ret", - "arg_dep": "", - "In": 0, - "name": "error_converter", - "Out": 1 - } - }, + "var": "ret", + "arg_dep": "", + "In": 0, + "name": "error_converter", + "Out": 1 + } + }, { "args": [ { @@ -3944,9 +3944,9 @@ "In": 0 }, "assoc": [{ - "func":"errhandler_f_fn_translation_update", - "key":"errhandler_tmp", - "value":"function" + "func":"errhandler_f_fn_translation_update", + "key":"errhandler_tmp", + "value":"function" }] }, { @@ -3974,10 +3974,10 @@ "name": "error_converter", "In": 0 }, - "assoc": [{ - "func":"errhandler_set_func", - "key":"comm_tmp", - "value":"errhandler_tmp" + "assoc": [{ + "func":"errhandler_set_func", + "key":"comm_tmp", + "value":"errhandler_tmp" }] }, { @@ -4024,9 +4024,9 @@ "name": "error_converter", "In": 0 }, - "assoc": [{ - "func":"errhandler_f_fn_translation_del", - "key":"errhandler_tmp" + "assoc": [{ + "func":"errhandler_f_fn_translation_del", + "key":"errhandler_tmp" }] }, @@ -6659,7 +6659,7 @@ "var": "combiner", "arg_dep": "", "In": 0, - "name": "combiner_mapper", + "name": "combiner_converter", "Out": 1 } ], @@ -7083,10 +7083,10 @@ "name": "error_converter", "Out": 1 }, - "assoc": [{ - "func":"errhandler_f_fn_translation_update", - "key":"errhandler_tmp", - "value":"comm_errhandler_fn" + "assoc": [{ + "func":"errhandler_f_fn_translation_update", + "key":"errhandler_tmp", + "value":"comm_errhandler_fn" }] }, { @@ -7138,10 +7138,10 @@ "name": "error_converter", "Out": 1 }, - "assoc": [{ - "func":"errhandler_set_func", - "key":"comm_tmp", - "value":"errhandler_tmp" + "assoc": [{ + "func":"errhandler_set_func", + "key":"comm_tmp", + "value":"errhandler_tmp" }] }, { @@ -11920,7 +11920,7 @@ }, { "args": [ - ], + ], "name": "MPI_T_finalize", "ret": { "var": "ret", @@ -11931,7 +11931,7 @@ }, { "args": [ - ], + ], "name": "MPI_Wtime", "ret": { "var": "ret", @@ -11942,7 +11942,7 @@ }, { "args": [ - ], + ], "name": "MPI_Wtick", "ret": { "var": "ret", @@ -11953,7 +11953,7 @@ }, { "args": [ - ], + ], "name": "MPI_Finalize", "ret": { "var": "ret", diff --git a/generator/FORTRAN/mappers_f.json b/generator/FORTRAN/mappers_f.json index e64509c..ab80033 100644 --- a/generator/FORTRAN/mappers_f.json +++ b/generator/FORTRAN/mappers_f.json @@ -5,690 +5,690 @@ "a2r": "weight_a2r", "type": "int ", "r2a": "weight_a2r" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "lock_converter":{ "local_alloc": 0, "init_alloc" : "0", "a2r": "win_lock_a2r", "type": "int ", "r2a": "win_lock_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "assert_converter":{ "local_alloc": 0, "init_alloc" : "0", "a2r": "win_assert_mode_a2r", "type": "int ", "r2a": "win_assert_mode_r2a" - ,"debug_type":"%*d" -}, - "order2_converter":{ + ,"debug_type":"%*d" + }, + "order2_converter":{ "local_alloc": 0, "init_alloc" : "0", "a2r": "order2_a2r", "type": "int ", "r2a": "order2_r2a" - ,"debug_type":"%*d" -}, - "order_converter":{ + ,"debug_type":"%*d" + }, + "order_converter":{ "local_alloc": 0, "init_alloc" : "0", "a2r": "order_a2r", "type": "int ", "r2a": "order_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Aint_ptr_converter": { "local_alloc": 1, "a2r": "aint_converter_a2r", "type": "size_t ", "r2a": "aint_converter_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Delete_ptr_conv": { "local_alloc": 0, "a2r": "delete_ptr_converter_a2r", "type": "void ", "r2a": "delete_ptr_converter_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "message_ptr_converter": { "local_alloc": 0, "a2r": "message_a2r", "type": "int ", "r2a": "message_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "op_ptr_converter": { "local_alloc": 0, "a2r": "operator_a2r", "type": "int ", "r2a": "operator_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "op_ptr_del_converter": { "local_alloc": 0, "a2r": "operator_del_a2r", "type": "int ", "r2a": "operator_del_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "const_buffer_mapper": { "local_alloc": 0, "a2r": "buffer_a2r", "type": "void ", "r2a": "buffer_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "fint_converter": { "local_alloc": 0, "a2r": "fint_conv_a2r", "type": "MPI_Fint", "r2a": "fint_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Comm_str_converter": { "local_alloc": 0, "a2r": "comm_a2r", "type": "int ", "r2a": "comm_r2a" - ,"debug_type":"%*C" -}, + ,"debug_type":"%*C" + }, "op_converter": { "local_alloc": 0, "a2r": "operator_a2r", "type": "int ", "r2a": "operator_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "keyval": { "local_alloc": 0, "a2r": "keyval_a2r", "type": "int ", "r2a": "keyval_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "int_ptr_mapper": { "local_alloc": 0, "a2r": "int_ptr_conv_a2r", "type": "int ", "r2a": "int_ptr_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Status_converter": { "local_alloc": 0, "a2r": "status_a2r", "type": "int ", "r2a": "status_r2a", "status_size":1 - ,"debug_type":"%n" -}, + ,"debug_type":"%n" + }, "count_ptr_converter": { "local_alloc": 0, "a2r": "count_ptr_conv_a2r", "type": "int ", "r2a": "count_ptr_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "t_pvar_ptr_converter": { "local_alloc": 0, "a2r": "t_pvar_ptr_conv_a2r", "type": "MPI_T_pvar_session *", "r2a": "t_pvar_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "errhandler_mapper": { "local_alloc": 0, "a2r": "errhandler_converter_a2r", "type": "int ", "r2a": "errhandler_converter_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "offset_ptr_converter": { "local_alloc": 0, "a2r": "offset_ptr_conv_a2r", "type": "MPI_Offset *", "r2a": "offset_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Comm_converter": { "local_alloc": 0, "a2r": "comm_a2r", "type": "int ", "r2a": "comm_r2a" - ,"debug_type":"%*C" -}, + ,"debug_type":"%*C" + }, "t_pvar_session_converter": { "local_alloc": 0, "a2r": "t_pvar_session_conv_a2r", "type": "MPI_T_pvar_session", "r2a": "t_pvar_session_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "win_cpy_attr_ptr_converter": { "local_alloc": 0, "a2r": "win_cpy_attr_ptr_conv_a2r", "type": "MPI_Win_copy_attr_function *", "r2a": "win_cpy_attr_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Request_converter": { "local_alloc": 0, "a2r": "request_a2r", "type": "int ", "r2a": "request_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "const_char_converter": { "local_alloc": 0, "a2r": "const_char_conv_a2r", "type": "char", "r2a": "const_char_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Datatype_converter": { "local_alloc": 0, "a2r": "datatype_a2r", "type": "int ", "r2a": "datatype_r2a" - ,"debug_type":"%*D" -}, + ,"debug_type":"%*D" + }, "t_pvar_handle_ptr_converter": { "local_alloc": 0, "a2r": "t_pvar_handle_ptr_conv_a2r", "type": "MPI_T_pvar_handle *", "r2a": "t_pvar_handle_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "const_int_converter": { "local_alloc": 0, "a2r": "const_int_conv_a2r", "type": "int ", "r2a": "const_int_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "char_ppp_converter": { "local_alloc": 0, "a2r": "char_ppp_conv_a2r", "type": "char ***", "r2a": "char_ppp_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "rank_mapper": { "local_alloc": 0, "a2r": "rank_mapper_a2r", "type": "int ", "r2a": "rank_mapper_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "int_mapper": { "local_alloc": 0, "nomap": "true", "a2r": "int_conv_a2r", "type": "int ", "r2a": "int_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Aint_converter": { "local_alloc": 0, "a2r": "aint_conv_a2r", "type": "size_t ", "r2a": "aint_conv_r2a", "nomap": "true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "file_converter": { "local_alloc": 0, "a2r": "file_a2r", "type": "int ", "r2a": "file_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Info_converter": { "local_alloc": 0, "a2r": "info_a2r", "type": "int ", "r2a": "info_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "t_cvar_handle_ptr_converter": { "local_alloc": 0, "a2r": "t_cvar_handle_ptr_conv_a2r", "type": "MPI_T_cvar_handle *", "r2a": "t_cvar_handle_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "datarep_extent_ptr_converter": { "local_alloc": 0, "a2r": "datarep_extent_ptr_conv_a2r", "type": "MPI_Datarep_extent_function *", "r2a": "datarep_extent_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "t_pvar_handle_converter": { "local_alloc": 0, "a2r": "t_pvar_handle_conv_a2r", "type": "MPI_T_pvar_handle", "r2a": "t_pvar_handle_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "group_ptr_converter": { "local_alloc": 0, "a2r": "group_a2r", "type": "int ", "r2a": "group_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "t_enum_converter": { "local_alloc": 0, "a2r": "t_enum_conv_a2r", "type": "MPI_T_enum", "r2a": "t_enum_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "double_converter": { "local_alloc": 0, "a2r": "double_conv_a2r", "type": "double ", "r2a": "double_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "count_converter": { "local_alloc": 0, "a2r": "count_conv_a2r", "type": "int ", "r2a": "count_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Request_ptr_converter": { "local_alloc": 0, "a2r": "request_a2r", "type": "int ", "r2a": "request_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "type_cpy_attr_ptr_converter": { "local_alloc": 0, "a2r": "type_cpy_attr_ptr_conv_a2r", "type": "void *", "r2a": "type_cpy_attr_ptr_conv_r2a" - ,"debug_type":"%*p" -}, + ,"debug_type":"%*p" + }, "file_errh_fct_ptr_converter": { "local_alloc": 0, "a2r": "file_errh_fct_ptr_conv_a2r", "type": "void ", "r2a": "file_errh_fct_ptr_conv_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "comm_del_attr_fct_ptr": { "local_alloc": 0, "a2r": "comm_del_attr_fct_ptr_conv_a2r", "type": "MPI_Comm_delete_attr_function *", "r2a": "comm_del_attr_fct_ptr_conv_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "topo_status_converter": { - "local_alloc": 0, + "local_alloc": 0, "a2r": "topo_status_a2r", "type":"int ", "r2a":"topo_status_r2a", "status_size":1 -,"debug_type":"%n" -}, + ,"debug_type":"%n" + }, "request_array_converter": { "local_alloc": 0, "arg_dep": "", "a2r": "request_array_conv_a2r", "type": "int ", "r2a": "request_array_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "win_ptr_converter": { "local_alloc": 0, "a2r": "win_ptr_conv_a2r", "type": "MPI_Win *", "r2a": "win_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Datatype_const_ptr_converter": { "local_alloc": 0, "a2r": "datatype_a2r", "type": "int ", "r2a": "datatype_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "message_converter": { "local_alloc": 0, "a2r": "message_conv_a2r", "type": "MPI_Message", "r2a": "message_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "greq_query_ptr_converter": { "local_alloc": 0, "a2r": "greq_query_ptr_conv_a2r", "type": "MPI_Grequest_query_function *", "r2a": "greq_query_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "f08_status_ptr_converter": { "local_alloc": 0, "a2r": "f08_status_ptr_conv_a2r", "type": "MPI_F08_status *", "r2a": "f08_status_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "const_f08_status_ptr_converter": { "local_alloc": 0, "a2r": "const_f08_status_ptr_conv_a2r", "type": "MPI_F08_status *", "r2a": "const_f08_status_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "error_converter": { "local_alloc": 0, "a2r": "error_a2r", "type": "int ", "r2a": "error_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "error_ptr_converter": { "local_alloc": 0, "a2r": "error_a2r", "type": "int ", "r2a": "error_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "const_aint_converter": { "local_alloc": 0, "a2r": "const_aint_conv_a2r", "type": "size_t ", "r2a": "const_aint_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "source_converter": { "local_alloc": 0, "a2r": "source_a2r", "type": "int ", "r2a": "source_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "dest_converter": { "local_alloc": 0, "a2r": "dest_a2r", "type": "int ", "r2a": "dest_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "combiner_converter": { "local_alloc": 0, "a2r": "combiner_a2r", "type": "int ", "r2a": "combiner_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "datarep_conversion_ptr_converter": { "local_alloc": 0, "a2r": "datarep_conversion_ptr_conv_a2r", "type": "MPI_Datarep_conversion_function *", "r2a": "datarep_conversion_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "greq_cancel_ptr_converter": { "local_alloc": 0, "a2r": "greq_cancel_ptr_conv_a2r", "type": "MPI_Grequest_cancel_function *", "r2a": "greq_cancel_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "User_fct_ptr_converter": { "local_alloc": 0, "a2r": "user_fct_ptr_conv_a2r", "type": "void ", "r2a": "user_fct_ptr_conv_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "const_info_converter": { "local_alloc": 0, "a2r": "info_a2r", "type": "int ", "r2a": "info_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Aint_const_ptr_converter": { "local_alloc": 0, "a2r": "const_aint_ptr_conv_a2r", "type": "size_t ", "r2a": "const_aint_ptr_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "fint_ptr_converter": { "local_alloc": 0, "a2r": "fint_ptr_conv_a2r", "type": "MPI_Fint *", "r2a": "fint_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "handler_fct_ptr_mapper": { "local_alloc": 0, "a2r": "handler_fct_ptr_conv_a2r", "type": "void ", "r2a": "handler_fct_ptr_conv_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "const_fint_ptr_converter": { "local_alloc": 0, "a2r": "const_fint_ptr_conv_a2r", "type": "MPI_Fint *", "r2a": "const_fint_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "win_errh_fct_ptr_converter": { "local_alloc": 0, "a2r": "win_errh_fct_ptr_conv_a2r", "type": "MPI_Win_errhandler_function *", "r2a": "win_errh_fct_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "t_cvar_handle_converter": { "local_alloc": 0, "a2r": "t_cvar_handle_conv_a2r", "type": "MPI_T_cvar_handle", "r2a": "t_cvar_handle_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "char_ptr_mapper": { "local_alloc": 0, "a2r": "char_ptr_conv_a2r", "type": "char ", "r2a": "char_ptr_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "void_ptr_mapper": { "local_alloc": 0, "a2r": "char_ptr_conv_a2r", "type": "void ", "r2a": "char_ptr_conv_r2a", "nomap":"true" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "Status_ptr_converter": { "local_alloc": 0, "a2r": "status_a2r", "type": "int ", "r2a": "status_r2a", "status_size":1 - ,"debug_type":"%n" -}, + ,"debug_type":"%n" + }, "com_errhadler_fct_ptr_converter": { "local_alloc": 0, "a2r": "com_errhadler_fct_ptr_conv_a2r", "type": "MPI_Comm_errhandler_function *", "r2a": "com_errhadler_fct_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "type_del_attr_ptr_converter": { "local_alloc": 0, "a2r": "type_del_attr_ptr_conv_a2r", "type": "MPI_Type_delete_attr_function *", "r2a": "type_del_attr_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "file_ptr_converter": { "local_alloc": 0, "a2r": "file_ptr_conv_a2r", "type": "MPI_File *", "r2a": "file_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "tag_converter": { "local_alloc": 0, "a2r": "tag_a2r", "type": "int ", "r2a": "tag_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "const_datatype_converter": { "local_alloc": 0, "a2r": "datatype_a2r", "type": "int ", "r2a": "datatype_r2a" - ,"debug_type":"%aD" -}, + ,"debug_type":"%aD" + }, "no_args_converter": { "local_alloc": 0, "a2r": "no_args_conv_a2r", "type": "", "r2a": "no_args_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "buffer_mapper": { "local_alloc": 0, "a2r": "buffer_a2r", "type": "void ", "r2a": "buffer_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "cont_int_ptr_mapper": { "local_alloc": 0, "a2r": "const_int_ptr_conv_a2r", "type": "int ", "r2a": "const_int_ptr_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "t_enum_ptr_converter": { "local_alloc": 0, "a2r": "t_enum_ptr_conv_a2r", "type": "MPI_T_enum *", "r2a": "t_enum_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "info_ptr_converter": { "local_alloc": 0, "a2r": "info_a2r", "type": "int ", "r2a": "info_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Datatype_ptr_converter": { "local_alloc": 0, "a2r": "datatype_a2r", "type": "int ", "r2a": "datatype_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "offset_converter": { "local_alloc": 0, "a2r": "offset_conv_a2r", "type": "int", "r2a": "offset_conv_r2a", "nomap":"true" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "group_converter": { "local_alloc": 0, "a2r": "group_a2r", "type": "int ", "r2a": "group_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "comm_cpy_attr_fct_ptr": { "local_alloc": 0, "a2r": "comm_cpy_attr_fct_ptr_conv_a2r", "type": "MPI_Comm_copy_attr_function *", "r2a": "comm_cpy_attr_fct_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "io_request_ptr_converter": { "local_alloc": 0, "a2r": "io_request_ptr_conv_a2r", "type": "MPIO_Request *", "r2a": "io_request_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "win_converter": { "local_alloc": 0, "a2r": "fwin_a2r", "type": "int ", "r2a": "fwin_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "win_del_attr_ptr_converter": { "local_alloc": 0, "a2r": "win_del_attr_ptr_conv_a2r", "type": "MPI_Win_delete_attr_function *", "r2a": "win_del_attr_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Copy_ptr_conv": { "local_alloc": 0, "a2r": "copy_ptr_converter_a2r", "type": "void ", "r2a": "copy_ptr_converter_r2a" - ,"debug_type":"%p" -}, + ,"debug_type":"%p" + }, "errhandler_ptr_mapper": { "local_alloc": 0, "a2r": "errhandler_converter_a2r", "type": "int ", "r2a": "errhandler_converter_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "char_ptr_ptr_converter": { "local_alloc": 0, "a2r": "char_ptr_ptr_conv_a2r", "type": "char **", "r2a": "char_ptr_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "Status_const_ptr_converter": { "local_alloc": 0, "a2r": "status_a2r", "type": "int ", "r2a": "status_r2a", "status_size":1 - ,"debug_type":"%n" -}, + ,"debug_type":"%n" + }, "const_char_ptr_converter": { "local_alloc": 0, "a2r": "const_char_ptr_conv_a2r", "type": "char *", "r2a": "const_char_ptr_conv_r2a" - ,"debug_type":"%*d" -}, + ,"debug_type":"%*d" + }, "greq_free_ptr_converter": { "local_alloc": 0, "a2r": "greq_free_ptr_conv_a2r", diff --git a/src/common/mappers.h b/src/common/mappers.h index 184ced1..0f6807f 100644 --- a/src/common/mappers.h +++ b/src/common/mappers.h @@ -505,7 +505,7 @@ static inline void dest_conv_r2a(int *dest,int *dest_tmp) } -/*Mappers Dest a2r - r2a*/ +/*Mappers combiner a2r - r2a*/ static inline void combiner_conv_a2r(int *combiner,int *combiner_tmp) { @@ -525,9 +525,7 @@ static inline void combiner_conv_a2r(int *combiner,int *combiner_tmp) case A_MPI_COMBINER_F90_COMPLEX : *combiner_tmp = R_MPI_COMBINER_F90_COMPLEX ; break; case A_MPI_COMBINER_F90_INTEGER : *combiner_tmp = R_MPI_COMBINER_F90_INTEGER ; break; case A_MPI_COMBINER_RESIZED : *combiner_tmp = R_MPI_COMBINER_RESIZED ; break; - default: - *combiner_tmp = *combiner; - break; + default : *combiner_tmp = *combiner ; break; } } @@ -535,23 +533,21 @@ static inline void combiner_conv_r2a(int *combiner,int *combiner_tmp) { switch(*combiner_tmp) { - case R_MPI_COMBINER_NAMED : *combiner_tmp = A_MPI_COMBINER_NAMED ; break; - case R_MPI_COMBINER_DUP : *combiner_tmp = A_MPI_COMBINER_DUP ; break; - case R_MPI_COMBINER_CONTIGUOUS : *combiner_tmp = A_MPI_COMBINER_CONTIGUOUS ; break; - case R_MPI_COMBINER_VECTOR : *combiner_tmp = A_MPI_COMBINER_VECTOR ; break; - case R_MPI_COMBINER_HVECTOR : *combiner_tmp = A_MPI_COMBINER_HVECTOR ; break; - case R_MPI_COMBINER_INDEXED : *combiner_tmp = A_MPI_COMBINER_INDEXED ; break; - case R_MPI_COMBINER_HINDEXED : *combiner_tmp = A_MPI_COMBINER_HINDEXED ; break; - case R_MPI_COMBINER_INDEXED_BLOCK : *combiner_tmp = A_MPI_COMBINER_INDEXED_BLOCK ; break; - case R_MPI_COMBINER_STRUCT : *combiner_tmp = A_MPI_COMBINER_STRUCT ; break; - case R_MPI_COMBINER_DARRAY : *combiner_tmp = A_MPI_COMBINER_DARRAY ; break; - case R_MPI_COMBINER_F90_REAL : *combiner_tmp = A_MPI_COMBINER_F90_REAL ; break; - case R_MPI_COMBINER_F90_COMPLEX : *combiner_tmp = A_MPI_COMBINER_F90_COMPLEX ; break; - case R_MPI_COMBINER_F90_INTEGER : *combiner_tmp = A_MPI_COMBINER_F90_INTEGER ; break; - case R_MPI_COMBINER_RESIZED : *combiner_tmp = A_MPI_COMBINER_RESIZED ; break; - default: - *combiner = *combiner_tmp; //OpenMPI - break; + case R_MPI_COMBINER_NAMED : *combiner = A_MPI_COMBINER_NAMED ; break; + case R_MPI_COMBINER_DUP : *combiner = A_MPI_COMBINER_DUP ; break; + case R_MPI_COMBINER_CONTIGUOUS : *combiner = A_MPI_COMBINER_CONTIGUOUS ; break; + case R_MPI_COMBINER_VECTOR : *combiner = A_MPI_COMBINER_VECTOR ; break; + case R_MPI_COMBINER_HVECTOR : *combiner = A_MPI_COMBINER_HVECTOR ; break; + case R_MPI_COMBINER_INDEXED : *combiner = A_MPI_COMBINER_INDEXED ; break; + case R_MPI_COMBINER_HINDEXED : *combiner = A_MPI_COMBINER_HINDEXED ; break; + case R_MPI_COMBINER_INDEXED_BLOCK : *combiner = A_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_MPI_COMBINER_STRUCT : *combiner = A_MPI_COMBINER_STRUCT ; break; + case R_MPI_COMBINER_DARRAY : *combiner = A_MPI_COMBINER_DARRAY ; break; + case R_MPI_COMBINER_F90_REAL : *combiner = A_MPI_COMBINER_F90_REAL ; break; + case R_MPI_COMBINER_F90_COMPLEX : *combiner = A_MPI_COMBINER_F90_COMPLEX ; break; + case R_MPI_COMBINER_F90_INTEGER : *combiner = A_MPI_COMBINER_F90_INTEGER ; break; + case R_MPI_COMBINER_RESIZED : *combiner = A_MPI_COMBINER_RESIZED ; break; + default : *combiner = *combiner_tmp ; break; } } diff --git a/src/interface/gen/interface_fort.c b/src/interface/gen/interface_fort.c index f535ca0..36ee9c5 100644 --- a/src/interface/gen/interface_fort.c +++ b/src/interface/gen/interface_fort.c @@ -2213,7 +2213,7 @@ void (*INTERFACE_F_LOCAL_MPI_Type_get_envelope)(int *,int *,int *,int *,int *,i void pmpi_type_get_envelope_(int * datatype,int * num_integers,int * num_addresses,int * num_datatypes,int * combiner,int * ret){ -return INTERFACE_F_LOCAL_MPI_Type_get_envelope(datatype, num_integers, num_addresses, num_datatypes, combiner, ret); +return INTERFACE_F_LOCAL_MPI_Type_get_envelope(datatype, num_integers, num_addresses, num_datatypes,combiner, ret); } #ifdef WI4MPI_STATIC diff --git a/src/interface/gen/mpi_translation_c.c b/src/interface/gen/mpi_translation_c.c index c0e4c27..e116c50 100644 --- a/src/interface/gen/mpi_translation_c.c +++ b/src/interface/gen/mpi_translation_c.c @@ -17381,9 +17381,12 @@ int A_MPI_Type_get_envelope(A_MPI_Datatype datatype, int *num_integers, R_MPI_Datatype datatype_tmp; datatype_conv_a2r(&datatype, &datatype_tmp); + int combiner_ltmp; + int *combiner_tmp = &combiner_ltmp; int ret_tmp = LOCAL_MPI_Type_get_envelope( - datatype_tmp, num_integers, num_addresses, num_datatypes, combiner); + datatype_tmp, num_integers, num_addresses, num_datatypes, combiner_tmp); + combiner_conv_r2a(combiner, combiner_tmp); int ret = error_code_conv_r2a(ret_tmp); in_w = 0; #ifdef DEBUG diff --git a/src/interface/gen/mpi_translation_fort.c b/src/interface/gen/mpi_translation_fort.c index 1e91d2e..1b83004 100644 --- a/src/interface/gen/mpi_translation_fort.c +++ b/src/interface/gen/mpi_translation_fort.c @@ -1311,7 +1311,7 @@ void A_f_MPI_Sendrecv(void *sendbuf, int *sendcount, int *sendtype, int *dest, (status == A_f_MPI_STATUS_IGNORE ? R_f_MPI_STATUS_IGNORE : status_tmp1); buffer_a2r(&sendbuf, &sendbuf_tmp); datatype_a2r(sendtype, &sendtype_tmp); - rank_mapper_a2r(dest, &dest_tmp); + dest_a2r(dest, &dest_tmp); tag_a2r(sendtag, &sendtag_tmp); datatype_a2r(recvtype, &recvtype_tmp); source_a2r(source, &source_tmp); @@ -7180,9 +7180,12 @@ void A_f_MPI_Type_get_envelope(int *datatype, int *num_integers, int ret_tmp = 0; int datatype_tmp; + int combiner_tmp; datatype_a2r(datatype, &datatype_tmp); _LOCAL_MPI_Type_get_envelope(&datatype_tmp, num_integers, num_addresses, - num_datatypes, combiner, &ret_tmp); + num_datatypes, &combiner_tmp, &ret_tmp); + if (ret_tmp == R_f_MPI_SUCCESS) + combiner_r2a(combiner, &combiner_tmp); error_r2a(ret, &ret_tmp); in_w = 0; diff --git a/src/preload/gen/mpi_translation_c.c b/src/preload/gen/mpi_translation_c.c index eaab35d..3494c17 100644 --- a/src/preload/gen/mpi_translation_c.c +++ b/src/preload/gen/mpi_translation_c.c @@ -17393,9 +17393,12 @@ int A_MPI_Type_get_envelope(A_MPI_Datatype datatype, int *num_integers, R_MPI_Datatype datatype_tmp; datatype_conv_a2r(&datatype, &datatype_tmp); + int combiner_ltmp; + int *combiner_tmp = &combiner_ltmp; int ret_tmp = LOCAL_MPI_Type_get_envelope( - datatype_tmp, num_integers, num_addresses, num_datatypes, combiner); + datatype_tmp, num_integers, num_addresses, num_datatypes, combiner_tmp); + combiner_conv_r2a(combiner, combiner_tmp); int ret = error_code_conv_r2a(ret_tmp); in_w = 0; #ifdef DEBUG diff --git a/src/preload/gen/mpi_translation_fort.c b/src/preload/gen/mpi_translation_fort.c index bd5c93f..389e212 100644 --- a/src/preload/gen/mpi_translation_fort.c +++ b/src/preload/gen/mpi_translation_fort.c @@ -1403,7 +1403,7 @@ void A_f_MPI_Sendrecv(void *sendbuf, int *sendcount, int *sendtype, int *dest, (status == A_f_MPI_STATUS_IGNORE ? R_f_MPI_STATUS_IGNORE : status_tmp1); buffer_a2r(&sendbuf, &sendbuf_tmp); datatype_a2r(sendtype, &sendtype_tmp); - rank_mapper_a2r(dest, &dest_tmp); + dest_a2r(dest, &dest_tmp); tag_a2r(sendtag, &sendtag_tmp); datatype_a2r(recvtype, &recvtype_tmp); source_a2r(source, &source_tmp); @@ -7742,9 +7742,12 @@ void A_f_MPI_Type_get_envelope(int *datatype, int *num_integers, int ret_tmp = 0; int datatype_tmp; + int combiner_tmp; datatype_a2r(datatype, &datatype_tmp); _LOCAL_MPI_Type_get_envelope(&datatype_tmp, num_integers, num_addresses, - num_datatypes, combiner, &ret_tmp); + num_datatypes, &combiner_tmp, &ret_tmp); + if (ret_tmp == R_f_MPI_SUCCESS) + combiner_r2a(combiner, &combiner_tmp); error_r2a(ret, &ret_tmp); in_w = 0; diff --git a/src/preload/header/INTEL_INTEL/wrapper_f.h b/src/preload/header/INTEL_INTEL/wrapper_f.h index d89db48..e3b5e65 100644 --- a/src/preload/header/INTEL_INTEL/wrapper_f.h +++ b/src/preload/header/INTEL_INTEL/wrapper_f.h @@ -1414,6 +1414,78 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 1) +#define A_f_MPI_COMBINER_DUP ( 2) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define A_f_MPI_COMBINER_VECTOR ( 4) +#define A_f_MPI_COMBINER_HVECTOR ( 6) +#define A_f_MPI_COMBINER_INDEXED ( 7) +#define A_f_MPI_COMBINER_HINDEXED ( 9) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define A_f_MPI_COMBINER_STRUCT ( 12) +#define A_f_MPI_COMBINER_DARRAY ( 14) +#define A_f_MPI_COMBINER_F90_REAL ( 15) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define A_f_MPI_COMBINER_F90_INTEGER ( 17) +#define A_f_MPI_COMBINER_RESIZED ( 18) + +#define R_f_MPI_COMBINER_NAMED ( 1) +#define R_f_MPI_COMBINER_DUP ( 2) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define R_f_MPI_COMBINER_VECTOR ( 4) +#define R_f_MPI_COMBINER_HVECTOR ( 6) +#define R_f_MPI_COMBINER_INDEXED ( 7) +#define R_f_MPI_COMBINER_HINDEXED ( 9) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define R_f_MPI_COMBINER_STRUCT ( 12) +#define R_f_MPI_COMBINER_DARRAY ( 14) +#define R_f_MPI_COMBINER_F90_REAL ( 15) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define R_f_MPI_COMBINER_F90_INTEGER ( 17) +#define R_f_MPI_COMBINER_RESIZED ( 18) + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/INTEL_MPICH/wrapper_f.h b/src/preload/header/INTEL_MPICH/wrapper_f.h index d89db48..b9ec714 100644 --- a/src/preload/header/INTEL_MPICH/wrapper_f.h +++ b/src/preload/header/INTEL_MPICH/wrapper_f.h @@ -1414,6 +1414,80 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 1) +#define A_f_MPI_COMBINER_DUP ( 2) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define A_f_MPI_COMBINER_VECTOR ( 4) +#define A_f_MPI_COMBINER_HVECTOR ( 6) +#define A_f_MPI_COMBINER_INDEXED ( 7) +#define A_f_MPI_COMBINER_HINDEXED ( 9) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define A_f_MPI_COMBINER_STRUCT ( 12) +#define A_f_MPI_COMBINER_DARRAY ( 14) +#define A_f_MPI_COMBINER_F90_REAL ( 15) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define A_f_MPI_COMBINER_F90_INTEGER ( 17) +#define A_f_MPI_COMBINER_RESIZED ( 18) + +#define R_f_MPI_COMBINER_NAMED ( 1) +#define R_f_MPI_COMBINER_DUP ( 2) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define R_f_MPI_COMBINER_VECTOR ( 4) +#define R_f_MPI_COMBINER_HVECTOR ( 6) +#define R_f_MPI_COMBINER_INDEXED ( 7) +#define R_f_MPI_COMBINER_HINDEXED ( 9) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define R_f_MPI_COMBINER_STRUCT ( 12) +#define R_f_MPI_COMBINER_DARRAY ( 14) +#define R_f_MPI_COMBINER_F90_REAL ( 15) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define R_f_MPI_COMBINER_F90_INTEGER ( 17) +#define R_f_MPI_COMBINER_RESIZED ( 18) + + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/INTEL_OMPI/wrapper_f.h b/src/preload/header/INTEL_OMPI/wrapper_f.h index fadef41..280086f 100644 --- a/src/preload/header/INTEL_OMPI/wrapper_f.h +++ b/src/preload/header/INTEL_OMPI/wrapper_f.h @@ -1417,6 +1417,78 @@ static inline void dest_r2a(int *ca, int *cr) { } else *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 1) +#define A_f_MPI_COMBINER_DUP ( 2) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define A_f_MPI_COMBINER_VECTOR ( 4) +#define A_f_MPI_COMBINER_HVECTOR ( 6) +#define A_f_MPI_COMBINER_INDEXED ( 7) +#define A_f_MPI_COMBINER_HINDEXED ( 9) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define A_f_MPI_COMBINER_STRUCT ( 12) +#define A_f_MPI_COMBINER_DARRAY ( 14) +#define A_f_MPI_COMBINER_F90_REAL ( 15) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define A_f_MPI_COMBINER_F90_INTEGER ( 17) +#define A_f_MPI_COMBINER_RESIZED ( 18) + +#define R_f_MPI_COMBINER_NAMED ( 0) +#define R_f_MPI_COMBINER_DUP ( 1) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 2) +#define R_f_MPI_COMBINER_VECTOR ( 3) +#define R_f_MPI_COMBINER_HVECTOR ( 5) +#define R_f_MPI_COMBINER_INDEXED ( 6) +#define R_f_MPI_COMBINER_HINDEXED ( 8) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 9) +#define R_f_MPI_COMBINER_STRUCT ( 11) +#define R_f_MPI_COMBINER_DARRAY ( 13) +#define R_f_MPI_COMBINER_F90_REAL ( 14) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 15) +#define R_f_MPI_COMBINER_F90_INTEGER ( 16) +#define R_f_MPI_COMBINER_RESIZED ( 17) + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} #define A_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/MPICH_INTEL/wrapper_f.h b/src/preload/header/MPICH_INTEL/wrapper_f.h index d89db48..5fb7e8e 100644 --- a/src/preload/header/MPICH_INTEL/wrapper_f.h +++ b/src/preload/header/MPICH_INTEL/wrapper_f.h @@ -1414,6 +1414,81 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 1) +#define A_f_MPI_COMBINER_DUP ( 2) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define A_f_MPI_COMBINER_VECTOR ( 4) +#define A_f_MPI_COMBINER_HVECTOR ( 6) +#define A_f_MPI_COMBINER_INDEXED ( 7) +#define A_f_MPI_COMBINER_HINDEXED ( 9) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define A_f_MPI_COMBINER_STRUCT ( 12) +#define A_f_MPI_COMBINER_DARRAY ( 14) +#define A_f_MPI_COMBINER_F90_REAL ( 15) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define A_f_MPI_COMBINER_F90_INTEGER ( 17) +#define A_f_MPI_COMBINER_RESIZED ( 18) + +#define R_f_MPI_COMBINER_NAMED ( 1) +#define R_f_MPI_COMBINER_DUP ( 2) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define R_f_MPI_COMBINER_VECTOR ( 4) +#define R_f_MPI_COMBINER_HVECTOR ( 6) +#define R_f_MPI_COMBINER_INDEXED ( 7) +#define R_f_MPI_COMBINER_HINDEXED ( 9) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define R_f_MPI_COMBINER_STRUCT ( 12) +#define R_f_MPI_COMBINER_DARRAY ( 14) +#define R_f_MPI_COMBINER_F90_REAL ( 15) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define R_f_MPI_COMBINER_F90_INTEGER ( 17) +#define R_f_MPI_COMBINER_RESIZED ( 18) + + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/MPICH_MPICH/wrapper_f.h b/src/preload/header/MPICH_MPICH/wrapper_f.h index d89db48..b9ec714 100644 --- a/src/preload/header/MPICH_MPICH/wrapper_f.h +++ b/src/preload/header/MPICH_MPICH/wrapper_f.h @@ -1414,6 +1414,80 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 1) +#define A_f_MPI_COMBINER_DUP ( 2) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define A_f_MPI_COMBINER_VECTOR ( 4) +#define A_f_MPI_COMBINER_HVECTOR ( 6) +#define A_f_MPI_COMBINER_INDEXED ( 7) +#define A_f_MPI_COMBINER_HINDEXED ( 9) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define A_f_MPI_COMBINER_STRUCT ( 12) +#define A_f_MPI_COMBINER_DARRAY ( 14) +#define A_f_MPI_COMBINER_F90_REAL ( 15) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define A_f_MPI_COMBINER_F90_INTEGER ( 17) +#define A_f_MPI_COMBINER_RESIZED ( 18) + +#define R_f_MPI_COMBINER_NAMED ( 1) +#define R_f_MPI_COMBINER_DUP ( 2) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define R_f_MPI_COMBINER_VECTOR ( 4) +#define R_f_MPI_COMBINER_HVECTOR ( 6) +#define R_f_MPI_COMBINER_INDEXED ( 7) +#define R_f_MPI_COMBINER_HINDEXED ( 9) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define R_f_MPI_COMBINER_STRUCT ( 12) +#define R_f_MPI_COMBINER_DARRAY ( 14) +#define R_f_MPI_COMBINER_F90_REAL ( 15) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define R_f_MPI_COMBINER_F90_INTEGER ( 17) +#define R_f_MPI_COMBINER_RESIZED ( 18) + + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/MPICH_OMPI/wrapper_f.h b/src/preload/header/MPICH_OMPI/wrapper_f.h index fadef41..07a5f01 100644 --- a/src/preload/header/MPICH_OMPI/wrapper_f.h +++ b/src/preload/header/MPICH_OMPI/wrapper_f.h @@ -1418,6 +1418,80 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 1) +#define A_f_MPI_COMBINER_DUP ( 2) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define A_f_MPI_COMBINER_VECTOR ( 4) +#define A_f_MPI_COMBINER_HVECTOR ( 6) +#define A_f_MPI_COMBINER_INDEXED ( 7) +#define A_f_MPI_COMBINER_HINDEXED ( 9) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define A_f_MPI_COMBINER_STRUCT ( 12) +#define A_f_MPI_COMBINER_DARRAY ( 14) +#define A_f_MPI_COMBINER_F90_REAL ( 15) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define A_f_MPI_COMBINER_F90_INTEGER ( 17) +#define A_f_MPI_COMBINER_RESIZED ( 18) + +#define R_f_MPI_COMBINER_NAMED ( 0) +#define R_f_MPI_COMBINER_DUP ( 1) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 2) +#define R_f_MPI_COMBINER_VECTOR ( 3) +#define R_f_MPI_COMBINER_HVECTOR ( 5) +#define R_f_MPI_COMBINER_INDEXED ( 6) +#define R_f_MPI_COMBINER_HINDEXED ( 8) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 9) +#define R_f_MPI_COMBINER_STRUCT ( 11) +#define R_f_MPI_COMBINER_DARRAY ( 13) +#define R_f_MPI_COMBINER_F90_REAL ( 14) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 15) +#define R_f_MPI_COMBINER_F90_INTEGER ( 16) +#define R_f_MPI_COMBINER_RESIZED ( 17) + + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/OMPI_INTEL/wrapper_f.h b/src/preload/header/OMPI_INTEL/wrapper_f.h index dbdb282..86007c4 100644 --- a/src/preload/header/OMPI_INTEL/wrapper_f.h +++ b/src/preload/header/OMPI_INTEL/wrapper_f.h @@ -1418,6 +1418,79 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 0) +#define A_f_MPI_COMBINER_DUP ( 1) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 2) +#define A_f_MPI_COMBINER_VECTOR ( 3) +#define A_f_MPI_COMBINER_HVECTOR ( 5) +#define A_f_MPI_COMBINER_INDEXED ( 6) +#define A_f_MPI_COMBINER_HINDEXED ( 8) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 9) +#define A_f_MPI_COMBINER_STRUCT ( 11) +#define A_f_MPI_COMBINER_DARRAY ( 13) +#define A_f_MPI_COMBINER_F90_REAL ( 14) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 15) +#define A_f_MPI_COMBINER_F90_INTEGER ( 16) +#define A_f_MPI_COMBINER_RESIZED ( 17) + +#define R_f_MPI_COMBINER_NAMED ( 1) +#define R_f_MPI_COMBINER_DUP ( 2) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define R_f_MPI_COMBINER_VECTOR ( 4) +#define R_f_MPI_COMBINER_HVECTOR ( 6) +#define R_f_MPI_COMBINER_INDEXED ( 7) +#define R_f_MPI_COMBINER_HINDEXED ( 9) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define R_f_MPI_COMBINER_STRUCT ( 12) +#define R_f_MPI_COMBINER_DARRAY ( 14) +#define R_f_MPI_COMBINER_F90_REAL ( 15) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define R_f_MPI_COMBINER_F90_INTEGER ( 17) +#define R_f_MPI_COMBINER_RESIZED ( 18) + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/OMPI_MPICH/wrapper_f.h b/src/preload/header/OMPI_MPICH/wrapper_f.h index dbdb282..99eeec6 100644 --- a/src/preload/header/OMPI_MPICH/wrapper_f.h +++ b/src/preload/header/OMPI_MPICH/wrapper_f.h @@ -1418,6 +1418,80 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 0) +#define A_f_MPI_COMBINER_DUP ( 1) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 2) +#define A_f_MPI_COMBINER_VECTOR ( 3) +#define A_f_MPI_COMBINER_HVECTOR ( 5) +#define A_f_MPI_COMBINER_INDEXED ( 6) +#define A_f_MPI_COMBINER_HINDEXED ( 8) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 9) +#define A_f_MPI_COMBINER_STRUCT ( 11) +#define A_f_MPI_COMBINER_DARRAY ( 13) +#define A_f_MPI_COMBINER_F90_REAL ( 14) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 15) +#define A_f_MPI_COMBINER_F90_INTEGER ( 16) +#define A_f_MPI_COMBINER_RESIZED ( 17) + +#define R_f_MPI_COMBINER_NAMED ( 1) +#define R_f_MPI_COMBINER_DUP ( 2) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 3) +#define R_f_MPI_COMBINER_VECTOR ( 4) +#define R_f_MPI_COMBINER_HVECTOR ( 6) +#define R_f_MPI_COMBINER_INDEXED ( 7) +#define R_f_MPI_COMBINER_HINDEXED ( 9) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 10) +#define R_f_MPI_COMBINER_STRUCT ( 12) +#define R_f_MPI_COMBINER_DARRAY ( 14) +#define R_f_MPI_COMBINER_F90_REAL ( 15) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 16) +#define R_f_MPI_COMBINER_F90_INTEGER ( 17) +#define R_f_MPI_COMBINER_RESIZED ( 18) + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1 diff --git a/src/preload/header/OMPI_OMPI/wrapper_f.h b/src/preload/header/OMPI_OMPI/wrapper_f.h index ea2386a..1f89c70 100644 --- a/src/preload/header/OMPI_OMPI/wrapper_f.h +++ b/src/preload/header/OMPI_OMPI/wrapper_f.h @@ -1422,6 +1422,80 @@ static inline void dest_r2a(int *ca, int *cr) { *ca = *cr; } +#define A_f_MPI_COMBINER_NAMED ( 0) +#define A_f_MPI_COMBINER_DUP ( 1) +#define A_f_MPI_COMBINER_CONTIGUOUS ( 2) +#define A_f_MPI_COMBINER_VECTOR ( 3) +#define A_f_MPI_COMBINER_HVECTOR ( 5) +#define A_f_MPI_COMBINER_INDEXED ( 6) +#define A_f_MPI_COMBINER_HINDEXED ( 8) +#define A_f_MPI_COMBINER_INDEXED_BLOCK ( 9) +#define A_f_MPI_COMBINER_STRUCT ( 11) +#define A_f_MPI_COMBINER_DARRAY ( 13) +#define A_f_MPI_COMBINER_F90_REAL ( 14) +#define A_f_MPI_COMBINER_F90_COMPLEX ( 15) +#define A_f_MPI_COMBINER_F90_INTEGER ( 16) +#define A_f_MPI_COMBINER_RESIZED ( 17) + +#define R_f_MPI_COMBINER_NAMED ( 0) +#define R_f_MPI_COMBINER_DUP ( 1) +#define R_f_MPI_COMBINER_CONTIGUOUS ( 2) +#define R_f_MPI_COMBINER_VECTOR ( 3) +#define R_f_MPI_COMBINER_HVECTOR ( 5) +#define R_f_MPI_COMBINER_INDEXED ( 6) +#define R_f_MPI_COMBINER_HINDEXED ( 8) +#define R_f_MPI_COMBINER_INDEXED_BLOCK ( 9) +#define R_f_MPI_COMBINER_STRUCT ( 11) +#define R_f_MPI_COMBINER_DARRAY ( 13) +#define R_f_MPI_COMBINER_F90_REAL ( 14) +#define R_f_MPI_COMBINER_F90_COMPLEX ( 15) +#define R_f_MPI_COMBINER_F90_INTEGER ( 16) +#define R_f_MPI_COMBINER_RESIZED ( 17) + +static inline void combiner_a2r(int *ca, int *cr) { + switch(*ca) + { + case A_f_MPI_COMBINER_NAMED : *cr = R_f_MPI_COMBINER_NAMED ; break; + case A_f_MPI_COMBINER_DUP : *cr = R_f_MPI_COMBINER_DUP ; break; + case A_f_MPI_COMBINER_CONTIGUOUS : *cr = R_f_MPI_COMBINER_CONTIGUOUS ; break; + case A_f_MPI_COMBINER_VECTOR : *cr = R_f_MPI_COMBINER_VECTOR ; break; + case A_f_MPI_COMBINER_HVECTOR : *cr = R_f_MPI_COMBINER_HVECTOR ; break; + case A_f_MPI_COMBINER_INDEXED : *cr = R_f_MPI_COMBINER_INDEXED ; break; + case A_f_MPI_COMBINER_HINDEXED : *cr = R_f_MPI_COMBINER_HINDEXED ; break; + case A_f_MPI_COMBINER_INDEXED_BLOCK : *cr = R_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case A_f_MPI_COMBINER_STRUCT : *cr = R_f_MPI_COMBINER_STRUCT ; break; + case A_f_MPI_COMBINER_DARRAY : *cr = R_f_MPI_COMBINER_DARRAY ; break; + case A_f_MPI_COMBINER_F90_REAL : *cr = R_f_MPI_COMBINER_F90_REAL ; break; + case A_f_MPI_COMBINER_F90_COMPLEX : *cr = R_f_MPI_COMBINER_F90_COMPLEX ; break; + case A_f_MPI_COMBINER_F90_INTEGER : *cr = R_f_MPI_COMBINER_F90_INTEGER ; break; + case A_f_MPI_COMBINER_RESIZED : *cr = R_f_MPI_COMBINER_RESIZED ; break; + default : *cr = *ca ; break; + } +} + + +static inline void combiner_r2a(int *ca, int *cr) { + switch(*cr) + { + case R_f_MPI_COMBINER_NAMED : *ca = A_f_MPI_COMBINER_NAMED ; break; + case R_f_MPI_COMBINER_DUP : *ca = A_f_MPI_COMBINER_DUP ; break; + case R_f_MPI_COMBINER_CONTIGUOUS : *ca = A_f_MPI_COMBINER_CONTIGUOUS ; break; + case R_f_MPI_COMBINER_VECTOR : *ca = A_f_MPI_COMBINER_VECTOR ; break; + case R_f_MPI_COMBINER_HVECTOR : *ca = A_f_MPI_COMBINER_HVECTOR ; break; + case R_f_MPI_COMBINER_INDEXED : *ca = A_f_MPI_COMBINER_INDEXED ; break; + case R_f_MPI_COMBINER_HINDEXED : *ca = A_f_MPI_COMBINER_HINDEXED ; break; + case R_f_MPI_COMBINER_INDEXED_BLOCK : *ca = A_f_MPI_COMBINER_INDEXED_BLOCK ; break; + case R_f_MPI_COMBINER_STRUCT : *ca = A_f_MPI_COMBINER_STRUCT ; break; + case R_f_MPI_COMBINER_DARRAY : *ca = A_f_MPI_COMBINER_DARRAY ; break; + case R_f_MPI_COMBINER_F90_REAL : *ca = A_f_MPI_COMBINER_F90_REAL ; break; + case R_f_MPI_COMBINER_F90_COMPLEX : *ca = A_f_MPI_COMBINER_F90_COMPLEX ; break; + case R_f_MPI_COMBINER_F90_INTEGER : *ca = A_f_MPI_COMBINER_F90_INTEGER ; break; + case R_f_MPI_COMBINER_RESIZED : *ca = A_f_MPI_COMBINER_RESIZED ; break; + default : *ca = *cr ; break; + } +} + + #define A_f_MPI_ANY_TAG -1 #define R_f_MPI_ANY_TAG -1