Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn] svn:open-mpi r17250
From: Aurélien Bouteiller (bouteill_at_[hidden])
Date: 2008-01-26 14:27:22


Do you think Windows is the only system where inttype.h might be
udefine ? Have you tried both windows 32bits and windows 64bits ? I
still believe that opal should provide a replacement to inttypes.h if
it does not exist in the system.

Aurelien

Le 26 janv. 08 à 13:43, bosilca_at_[hidden] a écrit :

> Author: bosilca
> Date: 2008-01-26 13:43:06 EST (Sat, 26 Jan 2008)
> New Revision: 17250
> URL: https://svn.open-mpi.org/trac/ompi/changeset/17250
>
> Log:
> Protect the standard header file, and allow the PML V to compile
> on Windows.
>
> Text files modified:
> trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_event.h | 6 ++++++
> trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_sender_based.c | 12 ++++++------
> 2 files changed, 12 insertions(+), 6 deletions(-)
>
> Modified: trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_event.h
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_event.h (original)
> +++ trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_event.h 2008-01-26 13:43:06 EST (Sat, 26 Jan 2008)
> @@ -14,13 +14,19 @@
> #include "ompi_config.h"
> #include "opal/mca/base/mca_base_param.h"
> #include "ompi/mca/pml/base/pml_base_request.h"
> +#ifdef HAVE_INTTYPES_H
> #include <inttypes.h>
> +#endif /* HAVE_INTTYPES_H */
>
> BEGIN_C_DECLS
>
> /* Make sure -Wformat is happy... */
> typedef uint64_t vprotocol_pessimist_clock_t;
> +#ifdef __WINDOWS__
> +#define PRIpclock "%llx"
> +#else
> #define PRIpclock PRIx64
> +#endif /* __WINDOWS__ */
>
> typedef enum {
> VPROTOCOL_PESSIMIST_EVENT_TYPE_MATCHING,
>
> Modified: trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_sender_based.c
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_sender_based.c (original)
> +++ trunk/ompi/mca/pml/v/vprotocol/pessimist/
> vprotocol_pessimist_sender_based.c 2008-01-26 13:43:06 EST (Sat, 26
> Jan 2008)
> @@ -52,7 +52,7 @@
> static void sb_mmap_file_close(void)
> {
> #if defined(__WINDOWS__)
> - closeHandle(sb.sb_fd);
> + CloseHandle(sb.sb_fd);
> #else
> int ret = close(sb.sb_fd);
> if(-1 == ret)
> @@ -75,12 +75,12 @@
>
> sb.sb_addr = (uintptr_t) MapViewOfFile(sb.sb_map,
> FILE_MAP_ALL_ACCESS, 0,
> sb.sb_offset,
> sb.sb_length);
> - if(NULL == sb.sb_addr)
> + if(NULL == (void*)sb.sb_addr)
> {
> V_OUTPUT_ERR("pml_v: vprotocol_pessimist:
> sender_based_alloc: mmap: %s",
> GetLastError());
> - closeHandle(sb.sb_map);
> - closeHandle(sb.sb_fd);
> + CloseHandle(sb.sb_map);
> + CloseHandle(sb.sb_fd);
> ompi_mpi_abort(MPI_COMM_NULL, MPI_ERR_NO_SPACE, false);
> }
> #else
> @@ -111,8 +111,8 @@
> static void sb_mmap_free(void)
> {
> #if defined(__WINDOWS__)
> - UnmapViewOfFile(sb.sb_addr);
> - closeHandle(sb.sb_map);
> + UnmapViewOfFile( (LPCVOID)sb.sb_addr);
> + CloseHandle(sb.sb_map);
> #else
> int ret = munmap((void *) sb.sb_addr, sb.sb_length);
> if(-1 == ret)
> _______________________________________________
> svn mailing list
> svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/svn