Skip to content

op_avx: use MCA enum flags instead of integer values#8440

Merged
jsquyres merged 1 commit intoopen-mpi:masterfrom
jsquyres:pr/op-avx-enum-flags
Feb 2, 2021
Merged

op_avx: use MCA enum flags instead of integer values#8440
jsquyres merged 1 commit intoopen-mpi:masterfrom
jsquyres:pr/op-avx-enum-flags

Conversation

@jsquyres
Copy link
Member

@jsquyres jsquyres commented Feb 2, 2021

MCA enums make it easier for users to see/set MCA flag values. Also
add "op_avx_capabilities" read-only MCA var that shows what is supported
on your platform, regardless of what value the user has set in
"opal_avx_support".

For example, ompi_output shows all the valid values:

$ ompi_info --all --parsable | grep _avx_
mca:op:avx:param:op_avx_capabilities:value:SSE,SSE2,SSE3,SSE4.1,AVX
mca:op:avx:param:op_avx_capabilities:source:default
mca:op:avx:param:op_avx_capabilities:status:read-only
mca:op:avx:param:op_avx_capabilities:level:4
mca:op:avx:param:op_avx_capabilities:help:Level of SSE/MMX/AVX support available in the current environment
mca:op:avx:param:op_avx_capabilities:enumerator:value:1:SSE
mca:op:avx:param:op_avx_capabilities:enumerator:value:2:SSE2
mca:op:avx:param:op_avx_capabilities:enumerator:value:4:SSE3
mca:op:avx:param:op_avx_capabilities:enumerator:value:8:SSE4.1
mca:op:avx:param:op_avx_capabilities:enumerator:value:16:AVX
mca:op:avx:param:op_avx_capabilities:enumerator:value:32:AVX2
mca:op:avx:param:op_avx_capabilities:enumerator:value:256:AVX512F
mca:op:avx:param:op_avx_capabilities:enumerator:value:512:AVX512BW
mca:op:avx:param:op_avx_capabilities:deprecated:no
mca:op:avx:param:op_avx_capabilities:type:int
mca:op:avx:param:op_avx_capabilities:disabled:false
mca:op:avx:param:op_avx_support:value:SSE,SSE2,SSE3,SSE4.1,AVX
mca:op:avx:param:op_avx_support:source:default
mca:op:avx:param:op_avx_support:status:read-only
mca:op:avx:param:op_avx_support:level:4
mca:op:avx:param:op_avx_support:help:Level of SSE/MMX/AVX support to be used, capped by the local architecture capabilities
mca:op:avx:param:op_avx_support:enumerator:value:1:SSE
mca:op:avx:param:op_avx_support:enumerator:value:2:SSE2
mca:op:avx:param:op_avx_support:enumerator:value:4:SSE3
mca:op:avx:param:op_avx_support:enumerator:value:8:SSE4.1
mca:op:avx:param:op_avx_support:enumerator:value:16:AVX
mca:op:avx:param:op_avx_support:enumerator:value:32:AVX2
mca:op:avx:param:op_avx_support:enumerator:value:256:AVX512F
mca:op:avx:param:op_avx_support:enumerator:value:512:AVX512BW
mca:op:avx:param:op_avx_support:deprecated:no
mca:op:avx:param:op_avx_support:type:int
mca:op:avx:param:op_avx_support:disabled:false

Signed-off-by: Jeff Squyres jsquyres@cisco.com

MCA enums make it easier for users to see/set MCA flag values.  Also
add "op_avx_capabilities" read-only MCA var that shows what is supported
on your platform, regardless of what value the user has set in
"opal_avx_support".

For example, ompi_output shows all the valid values:

```
$ ompi_info --all --parsable | grep _avx_
mca:op:avx:param:op_avx_capabilities:value:SSE,SSE2,SSE3,SSE4.1,AVX
mca:op:avx:param:op_avx_capabilities:source:default
mca:op:avx:param:op_avx_capabilities:status:read-only
mca:op:avx:param:op_avx_capabilities:level:4
mca:op:avx:param:op_avx_capabilities:help:Level of SSE/MMX/AVX support available in the current environment
mca:op:avx:param:op_avx_capabilities:enumerator:value:1:SSE
mca:op:avx:param:op_avx_capabilities:enumerator:value:2:SSE2
mca:op:avx:param:op_avx_capabilities:enumerator:value:4:SSE3
mca:op:avx:param:op_avx_capabilities:enumerator:value:8:SSE4.1
mca:op:avx:param:op_avx_capabilities:enumerator:value:16:AVX
mca:op:avx:param:op_avx_capabilities:enumerator:value:32:AVX2
mca:op:avx:param:op_avx_capabilities:enumerator:value:256:AVX512F
mca:op:avx:param:op_avx_capabilities:enumerator:value:512:AVX512BW
mca:op:avx:param:op_avx_capabilities:deprecated:no
mca:op:avx:param:op_avx_capabilities:type:int
mca:op:avx:param:op_avx_capabilities:disabled:false
mca:op:avx:param:op_avx_support:value:SSE,SSE2,SSE3,SSE4.1,AVX
mca:op:avx:param:op_avx_support:source:default
mca:op:avx:param:op_avx_support:status:read-only
mca:op:avx:param:op_avx_support:level:4
mca:op:avx:param:op_avx_support:help:Level of SSE/MMX/AVX support to be used, capped by the local architecture capabilities
mca:op:avx:param:op_avx_support:enumerator:value:1:SSE
mca:op:avx:param:op_avx_support:enumerator:value:2:SSE2
mca:op:avx:param:op_avx_support:enumerator:value:4:SSE3
mca:op:avx:param:op_avx_support:enumerator:value:8:SSE4.1
mca:op:avx:param:op_avx_support:enumerator:value:16:AVX
mca:op:avx:param:op_avx_support:enumerator:value:32:AVX2
mca:op:avx:param:op_avx_support:enumerator:value:256:AVX512F
mca:op:avx:param:op_avx_support:enumerator:value:512:AVX512BW
mca:op:avx:param:op_avx_support:deprecated:no
mca:op:avx:param:op_avx_support:type:int
mca:op:avx:param:op_avx_support:disabled:false
```

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
@jsquyres
Copy link
Member Author

jsquyres commented Feb 2, 2021

bot:aws:retest

@jsquyres jsquyres merged commit 2acf1a5 into open-mpi:master Feb 2, 2021
@jsquyres jsquyres deleted the pr/op-avx-enum-flags branch February 2, 2021 19:29
@rajachan
Copy link
Member

rajachan commented Feb 6, 2021

This change is hitting an assertion under a debug build, reproducible with ompi_info:

$ ./install/bin/ompi_info

                 Package: Open MPI ec2-user@ip-10-0-0-40 Distribution
                Open MPI: 5.0.0a1
  Open MPI repo revision: v2.x-dev-8353-g9bb695e3b7
  
  <snip>
  
ompi_info: mca_base_var_group.c:376: mca_base_var_group_deregister: Assertion `OPAL_OBJ_MAGIC_ID == ((opal_object_t *) (enums[i]))->obj_magic_id' failed.
[ip-10-0-0-40:28675] *** Process received signal ***
[ip-10-0-0-40:28675] Signal: Aborted (6)
[ip-10-0-0-40:28675] Signal code:  (-6)
[ip-10-0-0-40:28675] [ 0] /lib64/libpthread.so.0(+0x117e0)[0x7f0f64ab57e0]
[ip-10-0-0-40:28675] [ 1] /lib64/libc.so.6(gsignal+0x110)[0x7f0f6472cb20]
[ip-10-0-0-40:28675] [ 2] /lib64/libc.so.6(abort+0x148)[0x7f0f6472dfc8]
[ip-10-0-0-40:28675] [ 3] /lib64/libc.so.6(+0x2c92a)[0x7f0f6472592a]
[ip-10-0-0-40:28675] [ 4] /lib64/libc.so.6(+0x2c9a2)[0x7f0f647259a2]
[ip-10-0-0-40:28675] [ 5] /scratch/ompi/install/lib/libopen-pal.so.0(mca_base_var_group_deregister+0x1dd)[0x7f0f6634daaa]
[ip-10-0-0-40:28675] [ 6] /scratch/ompi/install/lib/libopen-pal.so.0(mca_base_var_group_deregister+0x36a)[0x7f0f6634dc37]
[ip-10-0-0-40:28675] [ 7] /scratch/ompi/install/lib/libopen-pal.so.0(mca_base_framework_close+0xf2)[0x7f0f6634fbe3]
[ip-10-0-0-40:28675] [ 8] /scratch/ompi/install/lib/libmpi.so.0(ompi_info_close_components+0x73)[0x7f0f66638b6e]
[ip-10-0-0-40:28675] [ 9] ./install/bin/ompi_info[0x401e7d]
[ip-10-0-0-40:28675] [10] /lib64/libc.so.6(__libc_start_main+0xea)[0x7f0f6471a06a]
[ip-10-0-0-40:28675] [11] ./install/bin/ompi_info[0x4014fa]
[ip-10-0-0-40:28675] *** End of error message ***

@jsquyres
Copy link
Member Author

jsquyres commented Feb 7, 2021

😢

Phooey. I'll have a look.

@jsquyres
Copy link
Member Author

jsquyres commented Feb 7, 2021

For master, see #8459.
For v4.1.x, see #8460.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants