From d50c8ba65f9401059b03dbffba05d1dffc6bd7a5 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 16 Sep 2014 19:07:02 +0000 Subject: [PATCH] Per patch from Gilles, cleanup some errors that surface when building with PGI. Verified by Tetsuya, reviewed okay by Jeff. RM-approved cmr=v1.8.3:reviewer=ompi-gk1.8 This commit was SVN r32745. --- ompi/mpi/fortran/base/fint_2_int.h | 5 +++++ oshmem/shmem/fortran/shmem_int4_cswap_f.c | 4 +++- oshmem/shmem/fortran/shmem_int8_cswap_f.c | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ompi/mpi/fortran/base/fint_2_int.h b/ompi/mpi/fortran/base/fint_2_int.h index 00c6ef64bd..d44cf2cdc3 100644 --- a/ompi/mpi/fortran/base/fint_2_int.h +++ b/ompi/mpi/fortran/base/fint_2_int.h @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,6 +39,7 @@ #define OMPI_SINGLE_NAME_CONVERT(a) a #define OMPI_INT_2_FINT(a) a #define OMPI_FINT_2_INT(a) a + #define OMPI_PFINT_2_PINT(a) a #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) #define OMPI_ARRAY_FINT_2_INT(in, n) #define OMPI_2_DIM_ARRAY_FINT_2_INT(in, n, dim2) @@ -53,6 +56,7 @@ #define OMPI_SINGLE_NAME_CONVERT(a) &c_##a #define OMPI_INT_2_FINT(a) a #define OMPI_FINT_2_INT(a) (int) (a) + #define OMPI_PFINT_2_PINT(a) (int *) (a) /* This is for OUT parameters. Does only alloc */ #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) \ @@ -109,6 +113,7 @@ #define OMPI_SINGLE_NAME_CONVERT(a) &c_##a #define OMPI_INT_2_FINT(a) (MPI_Fint)(a) #define OMPI_FINT_2_INT(a) (a) + #define OMPI_PFINT_2_PINT(a) a /* This is for OUT parameters. Does only alloc */ #define OMPI_ARRAY_FINT_2_INT_ALLOC(in, n) \ diff --git a/oshmem/shmem/fortran/shmem_int4_cswap_f.c b/oshmem/shmem/fortran/shmem_int4_cswap_f.c index 2a8ac75227..90526283d7 100644 --- a/oshmem/shmem/fortran/shmem_int4_cswap_f.c +++ b/oshmem/shmem/fortran/shmem_int4_cswap_f.c @@ -2,6 +2,8 @@ * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +40,7 @@ ompi_fortran_integer4_t shmem_int4_cswap_f(FORTRAN_POINTER_T target, MPI_Fint *c MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target), (void *)&out_value, - (const void*)(&OMPI_FINT_2_INT(*cond)), + (const void*)(OMPI_PFINT_2_PINT(cond)), FPTR_2_VOID_PTR(value), sizeof(out_value), OMPI_FINT_2_INT(*pe))); diff --git a/oshmem/shmem/fortran/shmem_int8_cswap_f.c b/oshmem/shmem/fortran/shmem_int8_cswap_f.c index 9ef5da984d..fcd1350d57 100644 --- a/oshmem/shmem/fortran/shmem_int8_cswap_f.c +++ b/oshmem/shmem/fortran/shmem_int8_cswap_f.c @@ -2,6 +2,8 @@ * Copyright (c) 2013 Mellanox Technologies, Inc. * All rights reserved. * Copyright (c) 2013 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2014 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -38,7 +40,7 @@ ompi_fortran_integer8_t shmem_int8_cswap_f(FORTRAN_POINTER_T target, MPI_Fint *c MCA_ATOMIC_CALL(cswap(FPTR_2_VOID_PTR(target), (void *)&out_value, - (const void*)(&OMPI_FINT_2_INT(*cond)), + (const void*)(OMPI_PFINT_2_PINT(cond)), FPTR_2_VOID_PTR(value), sizeof(out_value), OMPI_FINT_2_INT(*pe)));