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

[MacOS] legacy_async_memcpy test appears to hang ( homebrew build, gcc-10) #6

Open
bjoo opened this issue Jan 5, 2021 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@bjoo
Copy link
Contributor

bjoo commented Jan 5, 2021

Ctest test 23: legacy_async_memcpy appears to hang on MacOS when built with gcc-10 from homebrew -- MacOS Catalina (10.15.7) - similar behaviour is seen on MacOS CI where this test times out along with test 27: legacy_memcpy

@AlexVlx AlexVlx added the question Further information is requested label Jan 7, 2021
@AlexVlx AlexVlx self-assigned this Jan 7, 2021
@AlexVlx
Copy link
Collaborator

AlexVlx commented Jan 7, 2021

@bjoo I'm momentarily Mac-challenged, would it be too much to ask for a few extra details e.g. machine configuration and a stack-trace (across all threads) for the live-locked state? Thank you. Cheers!

@bjoo
Copy link
Contributor Author

bjoo commented Jan 7, 2021 via email

@Noerr
Copy link

Noerr commented Mar 7, 2023

This legacy_async_memcpy test continues to hang. (MacOS Ventura 13.2.1, brew gcc 12.2.0, M1 Max aarch64)

Open Files & Ports:
HIP-CPU/build/tests
HIP-CPU/build/tests/legacy_tests
/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/libgcc_s.1.1.dylib
/opt/homebrew/Cellar/gcc/12.2.0/lib/gcc/current/libstdc++.6.dylib
/dev/ttys004
->0x6498cb799eca4a97
->0x6498cb799eca4a97

Process sample attached showing two threads spinning in _pthread_cond_wait and vectorAdd()
Sample of legacy_tests.txt

@Noerr
Copy link

Noerr commented Mar 7, 2023

Contrary to the HIP-CPU macOS install instructions I did not install Intel tbb. (figuring gcc has supported STL parallel algorithms for several major versions now)

@Noerr
Copy link

Noerr commented Mar 7, 2023

The legacy_memcpy test hangs in similar way. Process sample attached. Sample of legacy_tests legacy_memcpy.txt

We can disable these two tests and all others pass.

ctest --output-on-failure --exclude-regex '(legacy_async_memcpy|legacy_memcpy)'

100% tests passed, 0 tests failed out of 31

Why are nearly all test names prefixed with "legacy_" ?

@Noerr
Copy link

Noerr commented Mar 7, 2023

I did brew install tbb then redid the HIP-CPU install. I don't see any evidence that tbb is utilized. It feels like something is missing from the instructions to tell cmake to use tbb.

build-tbb % otool -L tests/legacy_tests
tests/legacy_tests:
	/opt/homebrew/opt/gcc/lib/gcc/current/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.30.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

I'm not seeing any logic in /CMakeLists.txt that would reference TBB for CMAKE_HOST_APPLE.

@Noerr
Copy link

Noerr commented Mar 7, 2023

I patched line 48 of /CMakeLists.txt to naively force enable TBB. I find the built tests are linked to TBB, but the same legacy_memcpy and legacy_async_memcpy tests hang.

-    if (STL_DEPENDS_ON_TBB0 OR STL_DEPENDS_ON_TBB1)
+    if (CMAKE_HOST_APPLE OR STL_DEPENDS_ON_TBB0 OR STL_DEPENDS_ON_TBB1)
        find_package(TBB REQUIRED)
        target_link_libraries(
            ${PROJECT_NAME} INTERFACE TBB::tbb)
    endif()
build-tbb % otool -L tests/legacy_tests
tests/legacy_tests:
	/opt/homebrew/opt/tbb/lib/libtbb.12.dylib (compatibility version 12.0.0, current version 12.8.0)
	/opt/homebrew/opt/gcc/lib/gcc/current/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.30.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants