Skip to content

Commit 13c6b24

Browse files
committed
add a verification step looking for the structures that we use in the lustre component. Disable the ccomponent if not found.
1 parent 5616e12 commit 13c6b24

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

config/ompi_check_lustre.m4

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,30 @@ AC_DEFUN([OMPI_CHECK_LUSTRE],[
6161
[$ompi_check_lustre_dir], [$ompi_check_lustre_libdir], [ompi_check_lustre_happy="yes"],
6262
[ompi_check_lustre_happy="no"])
6363

64+
AC_MSG_CHECKING([for required lustre data structures])
65+
cat > conftest.c <<EOF
66+
#include "lustre/liblustreapi.h"
67+
void alloc_lum()
68+
{
69+
int v1, v3;
70+
v1 = sizeof(struct lov_user_md_v1) +
71+
LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1);
72+
v3 = sizeof(struct lov_user_md_v3) +
73+
LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1);
74+
}
75+
EOF
76+
77+
# Try the compile
78+
OPAL_LOG_COMMAND(
79+
[$CC $CFLAGS -I$with_lustre/include -c conftest.c],
80+
[ompi_check_lustre_struct_happy="yes"],
81+
[ompi_check_lustre_struct_happy="no"
82+
ompi_check_lustre_happy="no"]
83+
)
84+
rm -f conftest.c conftest.o
85+
AC_MSG_RESULT([$ompi_check_lustre_struct_happy])
86+
87+
6488
AS_IF([test "$ompi_check_lustre_happy" = "yes"],
6589
[$2],
6690
[AS_IF([test ! -z "$with_lustre" && test "$with_lustre" != "no"],

0 commit comments

Comments
 (0)