Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: detect netmod and enable netmod-specific tests #5981

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/mpi/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,26 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "mpi.h"],[return 1 + MPICH;])],
[MPI_IS_MPICH=yes],[MPI_IS_MPICH=no])
AC_MSG_RESULT($MPI_IS_MPICH)

if test "$MPI_IS_MPICH" = "yes" ; then
# probe device and netmod features
cat << EOF > conftest.c
#include "mpi.h"
int main(void) {MPI_Init(0,0);MPI_Finalize();return 0;}
EOF
mpicc -o conftest conftest.c
MPIR_CVAR_DEBUG_SUMMARY=1 ./conftest > conftest.output

if grep libfabric conftest.output > /dev/null ; then
AC_MSG_NOTICE([Detected MPICH with ch4:ofi netmod])
AC_DEFINE(MPICH_CH4_OFI, 1, [define if it is mpich with ch4:ofi])
elif grep UCX conftest.output > /dev/null ; then
AC_MSG_NOTICE([Detected MPICH with ch4:ucx netmod])
AC_DEFINE(MPICH_CH4_UCX, 1, [define if it is mpich with ch4:ucx])
fi

rm conftest conftest.c conftest.output
fi

# First, determine whether we are/can support the language bindings
#
# Since F90/F90FLAGS are replaced by FC/FCFLAGS, rather than silently
Expand Down
10 changes: 10 additions & 0 deletions test/mpi/impls/mpich/threads/pt2pt/multinic_infohints.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
#include <stdio.h>
#include <string.h>

/* This test only works for ch4:ofi */
#ifndef MPICH_CH4_OFI
int main(void)
{
printf("Test Skipped\n");
return 0;
}
#else

#define MAX_NICS_SUPPORTED 8

/* Multinic Support: Using pref_close_nic user info hint set */
Expand Down Expand Up @@ -268,3 +277,4 @@ int main(int argc, char *argv[])
MTest_Finalize(errs);
return MTestReturnValue(errs);
}
#endif /* MPICH_CH4_OFI */
15 changes: 7 additions & 8 deletions test/mpi/runtests
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,9 @@ sub RunMPIProgram {

if ($found_error) {
&RunTestFailed($test_opt, $inline, $runtime );
}
else {
} elsif ($inline =~ /Test Skipped/) {
&SkippedTest($test_opt, "missing feature");
} else {
&RunTestPassed($test_opt, $runtime);
}
&RunPostMsg($test_opt);
Expand Down Expand Up @@ -992,16 +993,14 @@ sub TestNormal {
elsif (/^srun: error: .*: signal: Communication connection failure/) {
# skip
}
elsif (!/^\s*Test Passed\s*$/ && !/requesting checkpoint\s*$/ && !/checkpoint completed\s*$/) {
elsif (!/^\s*Test (Passed|Skipped)\s*$/ && !/requesting checkpoint\s*$/ && !/checkpoint completed\s*$/) {
print STDERR "Unexpected output in $programname: $_";
if (!$found_error) {
$found_error = 1;
}
$found_error = 1;
}
}
if ($found_noerror == 0) {
print STDERR "Program $programname exited without No Errors\n";
if (!$found_error) {
if ($inline !~ /Test Skipped/) {
print STDERR "Program $programname exited without No Errors\n";
$found_error = 1;
}
}
Expand Down