Failed Tests compiling double-precision with FFWT

GROMACS version: 2021.4
GROMACS modification: Yes (I had to multiply returns from std::abs by 1.0 because they were returning int instead of double; maybe because of MacOSX11.3.sdk? not sure? and this is required for std::max to have same argument types)

I am getting failure in the following 8 tests:

The following tests FAILED:
          5 - MdlibUnitTest (Failed)
          6 - AwhTest (Failed)
         17 - MathUnitTests (Failed)
         25 - RandomUnitTests (Failed)
         27 - TableUnitTests (Failed)
         31 - SimdUnitTests (Failed)
         33 - GmxAnaTest (Failed)
         42 - EnergyAnalysisUnitTests (Failed)

From what I can see from output (need to write rest to file) 31 failed under SimdScalarTest.abs, 33 failed for MsdMolTest.diffMolMassWeighted, MsdMolTest.diffMolNonMassWeighted, and MsdMolTest.diffMolSelected, and 42 failed for ViscosityTest.EinsteinViscosity and ViscosityTest.EinsteinViscosityIntegral. I also got a lot of failure messages of the below many times under test 42:

/Users/brian/tools/gromacs-2021.4/src/testutils/refdata.cpp:953: Failure
which is:
EXPECT_PLAIN(impl_->processItem(Impl::cRealNodeName, id, checker));

I think MdlibUnitTest is failing specifically with the fact that std::max cannot infer the datatypes in test/shake.cpp when using icpc compiler. See here. And so in order to compile you need to include std::max<real> in replacing just std::max

I gave up using ICC compiler on bigSur. Just using clang and MacOS11.*.sdk. FYI got SEGFAULT(s) on my tests until I made sure to use the cached BLAS and LAPACK libraries with:

-DLAPACK_LIBRARIES="/Library/Developer/CommandLineTools/SDKs/MacOSX-SDKs/MacOSX11.3.sdk/usr/lib/liblapack.tbd" \
-DBLAS_LIBRARIES="/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib/libblas.tbd"

Thought it might be interesting to post along with link about it before from CMake.