GROMACS installation error, failing mpi tests

GROMACS version: 2020.4
GROMACS modification: No
Getting errors while installing gromacs202.4, I am using GPU based system.
Machine model is Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz

I have already installed cuda, openmpi from openmpi-4.1.2.tar.gz and fftw-3.3.9 but on installing gromacs-2020.4 by commands

sudo CC=/usr/bin/mpicc F77=/usr/bin/f77 CXX=/usr/bin/mpicxx MPICC=/usr/bin/mpicc CMAKE_PREFIX_PATH=/soft/fftw339/lib cmake … -DFFTWF_INCLUDE_DIR=/soft/fftw339/include -DFFTWF_LIBRARIES=/soft/fftw339/lib/ -DCMAKE_INSTALL_PREFIX=/soft/gmx2020 -DGMX_X11=OFF -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx -DCMAKE_C_COMPILER=/usr/bin/mpicc -DGMX_MPI=ON -DGMX_DOUBLE=OFF -DGMX_DEFAULT_SUFFIX=ON -DGMX_PREFER_STATIC_LIBS=ON -DGMX_SIMD=SSE2 -DGMX_SIMD=AVX2_256 -DGMX_USE_RDTSCP=OFF -DGMX_GPU=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda

sudo make check

it gives:

The following tests FAILED:
2 - TestUtilsMpiUnitTests (Failed)
4 - UtilityMpiUnitTests (Failed)
16 - MdrunUtilityMpiUnitTests (Failed)
49 - MdrunMpiTests (Failed)
51 - MdrunMpiCoordinationTestsTwoRanks (Failed)
Errors while running CTest
make[3]: *** [CMakeFiles/run-ctest-nophys.dir/build.make:58: CMakeFiles/run-ctest-nophys] Error 8
make[2]: *** [CMakeFiles/Makefile2:2308: CMakeFiles/run-ctest-nophys.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:2288: CMakeFiles/check.dir/rule] Error 2
make: *** [Makefile:249: check] Error 2

sudo make install


/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libhwloc.a(topology-linux.o): undefined reference to symbol ‘udev_device_unref@@LIBUDEV_183
/usr/bin/ld: /lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:112: bin/gmx_mpi] Error 1
make[1]: *** [CMakeFiles/Makefile2:5804: src/programs/CMakeFiles/gmx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
[100%] Linking CXX static library …/…/…/…/lib/libgpu_utilstest_cuda.a
[100%] Built target gpu_utilstest_cuda
make: *** [Makefile:163: all] Error 2

Please help.

It is simply the make rather than the check or install that fails, right?

Omit that cmake flag, assuming you have dynamic library versions of hwloc on your system that will likely fix the issue.