Skip to content

incorrect logic in opal_config_asm.m4 for 128-wide atomic ops #5529

Closed
@flang-cavium

Description

@flang-cavium

Thank you for taking the time to submit an issue!

Patch is based on OpenMPI 3.1.1 - released tarball.

Compiled and installed from source.

Operating system: Ubuntu 16.04 AArch64 (ARM64).
Compilers:

  • GCC 7.3 and 8.1
  • clang/LLVM 6.0.1

Problem description:

The logic for discovering and enabling 128-bit wide atomic ops at ./configure time is incorrect. Essentially, 128-wide atomic ops are enabled regardless of whether or not the Target actually supports them.

The file opal_config_asm.m4 contains the following:

if test ! "$enable_cross_cmpset128" = "yes" ; then
### enable 128-wide atomic cmpset
fi

The logical test

if test ! "$enable_cross_cmpset128" = "yes" ; then

is equivalent to

if test "$enable_cross_cmpset128" = "no" ; then

which means, cmpset128 will be enabled even though ./configure was told

--enable-cross-cmpset128=no

Further down, there is another test for $enable_cross_cmpset128:

if test ! "$enable_cross_cmpset128" = "yes" ; then

### enable 128-wide atomic CAS

else

### enable 128-wide atomic CAS

fi

if test ! "$enable_cross_cmpset128" = "yes" ; then

is the equivalent of saying

if test "$enable_cross_cmpset128" = "no" ; then

Again, same logic problem, but this time around making certain 128-wide CAS really gets enable no matter what ./configure says.

Also: trying to attach a patch named opal_config_asm.m4.patch results in the following error:

We don't support that file type. Try again with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP.

I seriously doubt anyone would ever submit a GIF, JPEG, JPG or PNG patch. I had to rename the patch file from opal_config_asm.m4.patch to opal_config_asm.m4.patch.txt.
opal_config_asm.m4.patch.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions