Back to home page

MITgcm

 
 

    


File indexing completed on 2023-05-28 05:10:53 UTC

view on githubraw file Latest commit b4daa243 on 2023-05-28 03:53:22 UTC
b4daa24319 Shre*0001 /*
                0002 ##########################################################
                0003 # This file is part of the AdjoinableMPI library         #
                0004 # released under the MIT License.                        #
                0005 # The full COPYRIGHT notice can be found in the top      #
                0006 # level directory of the AdjoinableMPI distribution.     #
                0007 ########################################################## 
                0008 */
                0009 #ifndef _AMPI_NT_H_
                0010 #define _AMPI_NT_H_
                0011 
                0012 /**
                0013  * \file 
                0014  * \ingroup UserInterfaceHeaders
                0015  * NT= "no tansformation" or "no trace" prototypes for wrapper routines that could have an adjoint action but in particular contexts do not because they are called outside of the transformed or traced section of the source code;  the signatures are identical to their MPI originals and they pass the parameters through to the MPI routines
                0016  */ 
                0017 
                0018 /** \ingroup UserInterfaceDeclarations
                0019  * @{
                0020  */
                0021 
                0022 
                0023 /**
                0024  * this wrapper variant of \ref AMPI_Init has no adjoint transformation / trace functionality; to be used outside of the transformed/traced code section
                0025  */
                0026 int AMPI_Init_NT(int* argc, 
                0027                  char*** argv);
                0028 
                0029 /**
                0030  * this wrapper variant of \ref AMPI_Finalize has no adjoint transformation / trace functionality; to be used outside of the transformed/traced code section
                0031  */
                0032 int AMPI_Finalize_NT(void);
                0033 
                0034 /**
                0035  * this wrapper variant of \ref AMPI_Buffer_attach has no adjoint transformation / trace functionality; to be used outside of the transformed/traced code section
                0036  */
                0037 int AMPI_Buffer_attach_NT(void *buffer, 
                0038                           int size); 
                0039 
                0040 /**
                0041  * this wrapper variant of \ref AMPI_Buffer_detach has no adjoint transformation / trace functionality; to be used outside of the transformed/traced code section
                0042  */
                0043 int AMPI_Buffer_detach_NT(void *buffer, 
                0044                           int *size);
                0045 
                0046 int AMPI_Type_contiguous_NT(int count,
                0047                             MPI_Datatype oldtype,
                0048                             MPI_Datatype* newtype);
                0049 
                0050 int AMPI_Type_create_struct_NT(int count,
                0051                                int array_of_blocklengths[],
                0052                                MPI_Aint array_of_displacements[],
                0053                                MPI_Datatype array_of_types[],
                0054                                MPI_Datatype *newtype);
                0055 
                0056 int AMPI_Type_create_resized_NT(MPI_Datatype oldtype,
                0057                                 MPI_Aint lb,
                0058                                 MPI_Aint extent,
                0059                                 MPI_Datatype *newtype);
                0060 
                0061 int AMPI_Type_commit_NT(MPI_Datatype *datatype);
                0062 
                0063 int AMPI_Op_create_NT(MPI_User_function *function,
                0064                       int commute,
                0065                       MPI_Op *op);
                0066 
                0067 int AMPI_Type_free_NT(MPI_Datatype *datatype);
                0068 
                0069 int AMPI_Op_free_NT(MPI_Op *op);
                0070 
                0071 int AMPI_Comm_dup_NT(MPI_Comm comm, MPI_Comm *dupComm) ;
                0072 
                0073 /**
                0074  * this wrapper variant of \ref AMPI_Comm_dup manages the shadow communicators if code is differentiated in tangent mode with ST-AD with shadow variables (e.g. Tapenade); to be used outside of the transformed/traced code section
                0075  */
                0076 int TLS_AMPI_Comm_dup_NT(MPI_Comm comm, MPI_Comm *dupComm) ;
                0077 
                0078 int AMPI_Comm_split_NT(MPI_Comm comm, int color, int key, MPI_Comm *dupComm) ;
                0079 
                0080 /**
                0081  * this wrapper variant of \ref AMPI_Comm_split manages the shadow communicators if code is differentiated in tangent mode with ST-AD with shadow variables (e.g. Tapenade); to be used outside of the transformed/traced code section
                0082  */
                0083 int TLS_AMPI_Comm_split_NT(MPI_Comm comm, int color, int key, MPI_Comm *dupComm) ;
                0084 
                0085 int AMPI_Comm_create_NT(MPI_Comm comm, MPI_Group group, MPI_Comm *dupComm) ;
                0086 
                0087 /**
                0088  * this wrapper variant of \ref AMPI_Comm_create manages the shadow communicators if code is differentiated in tangent mode with ST-AD with shadow variables (e.g. Tapenade); to be used outside of the transformed/traced code section
                0089  */
                0090 int TLS_AMPI_Comm_create_NT(MPI_Comm comm, MPI_Group group, MPI_Comm *dupComm) ;
                0091 
                0092 int AMPI_Comm_free_NT(MPI_Comm *comm) ;
                0093 
                0094 /**
                0095  * this wrapper variant of \ref AMPI_Comm_free manages the shadow communicators if code is differentiated in tangent mode with ST-AD with shadow variables (e.g. Tapenade); to be used outside of the transformed/traced code section
                0096  */
                0097 int TLS_AMPI_Comm_free_NT(MPI_Comm *comm) ;
                0098 
                0099 #ifdef AMPI_FORTRANCOMPATIBLE
                0100 /** Must be defined in the fortranSupport.F of the particular AD tool */
                0101 void adtool_ampi_fortransetuptypes_(MPI_Fint* adouble, MPI_Fint* areal);
                0102 #endif
                0103 
                0104 /** @} */
                0105 
                0106 #endif