Skip to content

Compilation fails on platforms where sizeof(long double) == sizeof(double) #49

@ursg

Description

@ursg

Specifically, I tested on armv7l (raspberryPi 3), and got:

mpic++ -O3 -std=c++0x -Wall -fPIC  -c vlsv_common_mpi.cpp
vlsv_common_mpi.cpp: In function ‘ompi_datatype_t* vlsv::getMPIDatatype(datatype::type, uint64_t)’:
vlsv_common_mpi.cpp:159:11: error: duplicate case value
  159 |           case (sizeof(long double)):
      |           ^~~~
vlsv_common_mpi.cpp:155:11: note: previously used here
  155 |           case (sizeof(double)):
      |           ^~~~
make: *** [Makefile:67: vlsv_common_mpi.o] Error 1

Not sure if this is something that needs a specific fix though. This issue is mostly to document it, if anybody stumbles into this in the future. Most likely, it can be worked around by simply commenting out the long double case, as it is not used for any actual application AFAIK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions