Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] 1.7.4rc3: solaris warnings in shmem/posix and shmem/sysv
From: Ralph Castain (rhc_at_[hidden])
Date: 2014-02-03 14:46:37


Committed a fix for these in the trunk - I've asked Jeff to review for 1.7.4, but let me know if you get a chance to verify it

Thanks!
Ralph

On Feb 2, 2014, at 1:46 PM, Paul Hargrove <phhargrove_at_[hidden]> wrote:

> I see the following warnings when building 1.7.4rc3 on Solaris10 on SPARC w/ the Solaris Studio 12.3 compilers.
>
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_common_utils.c", line 75: warning: implicit function declaration: shm_open
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_
> posix_component.c", line 186: warning: implicit function declaration: shm_unlink
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_module.c", line 212: warning: assignment type mismatch:
> pointer to struct opal_shmem_seg_hdr_t {struct opal_atomic_lock_t {..} lock, int cpid} "=" pointer to char
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_module.c", line 285: warning: implicit function declaration: shm_unlink
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_module.c", line 288: warning: argument #1 is incompatible with prototype:
> prototype: pointer to char : "/usr/include/sys/mman.h", line 165
> argument : pointer to struct opal_shmem_seg_hdr_t {struct opal_atomic_lock_t {..} lock, int cpid}
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_module.c", line 306: warning: implicit function declaration: shm_open
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_module.c", line 315: warning: assignment type mismatch:
> pointer to unsigned char "=" pointer to char
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/posix/shmem_posix_module.c", line 378: warning: argument #1 is incompatible with prototype:
> prototype: pointer to char : "/usr/include/sys/mman.h", line 165
> argument : pointer to unsigned char
>
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/sysv/shmem_sysv_module.c", line 278: warning: argument #1 is incompatible with prototype:
> prototype: pointer to char : "/usr/include/sys/shm.h", line 131
> argument : pointer to struct opal_shmem_seg_hdr_t {struct opal_atomic_lock_t {..} lock, int cpid}
> "/home/hargrove/OMPI/openmpi-1.7.4rc2-solaris10-sparcT2-ss12u3-v9/openmpi-1.7.4rc2/opal/mca/shmem/sysv/shmem_sysv_module.c", line 342: warning: argument #1 is incompatible with prototype:
> prototype: pointer to char : "/usr/include/sys/shm.h", line 131
> argument : pointer to unsigned char
>
> Some appear to be missing casts for pointer types (as args and in assignments).
>
> Others seem to be missing prototypes for shm_*(), despite including the right headers.
> In GASNet we found we need to deal with POSIX shared memory as follows on Solaris:
>
> #if PLATFORM_OS_SOLARIS && !defined(_POSIX_C_SOURCE)
> #define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */
> #include <sys/mman.h>
> #undef _POSIX_C_SOURCE
> #elif HAVE_SYS_MMAN_H
> #include <sys/mman.h>
> #else
> ....
> #endif
>
> -Paul
>
> --
> Paul H. Hargrove PHHargrove_at_[hidden]
> Future Technologies Group
> Computer and Data Sciences Department Tel: +1-510-495-2352
> Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel