Cliff,

Is there any reason why you are not installing the latest version of the
v5.0 series (e.g. 5.0.8) ?

Anyway, it looks like an incomplete back port that has been fixed in later
releases.
Meanwhile, if you want to stick to 5.0.1, you can add the following snippet
in ompi/mca/mtl/ofi.h

#ifndef container_of

#    define container_of(ptr, type, member) ((type *) (((char *) (ptr)) -
offsetof(type, member)))

#endif

Cheers,

Gilles

On Sun, Aug 3, 2025 at 12:06 PM Kook Jin Noh <vorl...@outlook.com> wrote:

> Hi,
>
>
>
> While installing openmpi 5.0.1 on my archlinux, I received the following:
>
>
>
> In file included from mtl_ofi.h:51,
>
>                  from mtl_ofi.c:13:
>
> mtl_ofi.h: In function ‘ompi_mtl_ofi_context_progress’:
>
> mtl_ofi_request.h:19:5: error: implicit declaration of function
> ‘container_of’ [-Wimplicit-function-declaration]
>
>    19 |     container_of((_ptr_ctx), struct ompi_mtl_ofi_request_t, ctx)
>
>       |     ^~~~~~~~~~~~
>
> mtl_ofi.h:152:27: note: in expansion of macro ‘TO_OFI_REQ’
>
>   152 |                 ofi_req =
> TO_OFI_REQ(ompi_mtl_ofi_wc[i].op_context);
>
>       |                           ^~~~~~~~~~
>
> mtl_ofi_request.h:19:30: error: expected expression before ‘struct’
>
>    19 |     container_of((_ptr_ctx), struct ompi_mtl_ofi_request_t, ctx)
>
>       |                              ^~~~~~
>
> mtl_ofi.h:152:27: note: in expansion of macro ‘TO_OFI_REQ’
>
>   152 |                 ofi_req =
> TO_OFI_REQ(ompi_mtl_ofi_wc[i].op_context);
>
>       |                           ^~~~~~~~~~
>
> mtl_ofi_request.h:19:30: error: expected expression before ‘struct’
>
>    19 |     container_of((_ptr_ctx), struct ompi_mtl_ofi_request_t, ctx)
>
>       |                              ^~~~~~
>
> mtl_ofi.h:192:19: note: in expansion of macro ‘TO_OFI_REQ’
>
>   192 |         ofi_req = TO_OFI_REQ(error.op_context);
>
>       |                   ^~~~~~~~~~
>
> make[2]: *** [Makefile:1598: mtl_ofi.lo] Error 1
>
> make[2]: Leaving directory
> '/home/vorlket/build/openmpi-ucx/src/openmpi-5.0.1/ompi/mca/mtl/ofi'
>
> make[1]: *** [Makefile:2799: all-recursive] Error 1
>
> make[1]: Leaving directory
> '/home/vorlket/build/openmpi-ucx/src/openmpi-5.0.1/ompi'
>
> make: *** [Makefile:1533: all-recursive] Error 1
>
> ==> ERROR: A failure occurred in build().
>
>     Aborting...
>
>
>
> I appreciate if you help me debugging this.
>
>
>
> Thanks,
>
> Cliff
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to users+unsubscr...@lists.open-mpi.org.
>

To unsubscribe from this group and stop receiving emails from it, send an email 
to users+unsubscr...@lists.open-mpi.org.

Reply via email to