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

Enable intel compiler cause hpx program return some errors. #6618

Open
MichaelSipayung opened this issue Feb 17, 2025 · 1 comment
Open

Enable intel compiler cause hpx program return some errors. #6618

MichaelSipayung opened this issue Feb 17, 2025 · 1 comment

Comments

@MichaelSipayung
Copy link

Before i call $ source /opt/intel/oneapi/setvars.sh, every hpx program works fine, but when i use intel compiler for other works and run again the hpx program with a little modification for example change a variable value, it return some errors. Maybe there is something wrong when i build hpx from source ?

-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/asus/cppproject/hpx_example/build
[1/2] : && /opt/rh/gcc-toolset-14/root/usr/bin/c++ -pthread -Wl,-z,defs -fvisibility=hidden -Wl,--dependency-file,CMakeFiles/hpx_example.dir/link.d CMakeFiles/hpx_example.dir/main.cc.o -o hpx_example -Wl,-rpath,/home/asus/hpx_install/lib64 /home/asus/hpx_install/lib64/libhpx_iostreams.so.1.10.0 /home/asus/hpx_install/lib64/libhpx_wrap.a -Wl,-wrap=main /home/asus/hpx_install/lib64/libhpx_init.a /home/asus/hpx_install/lib64/libhpx.so.1.10.0 /home/asus/hpx_install/lib64/libhpx_core.so /usr/lib64/libtcmalloc_minimal.so /usr/lib64/libhwloc.so -ldl -lrt && :
FAILED: hpx_example
: && /opt/rh/gcc-toolset-14/root/usr/bin/c++ -pthread -Wl,-z,defs -fvisibility=hidden -Wl,--dependency-file,CMakeFiles/hpx_example.dir/link.d CMakeFiles/hpx_example.dir/main.cc.o -o hpx_example -Wl,-rpath,/home/asus/hpx_install/lib64 /home/asus/hpx_install/lib64/libhpx_iostreams.so.1.10.0 /home/asus/hpx_install/lib64/libhpx_wrap.a -Wl,-wrap=main /home/asus/hpx_install/lib64/libhpx_init.a /home/asus/hpx_install/lib64/libhpx.so.1.10.0 /home/asus/hpx_install/lib64/libhpx_core.so /usr/lib64/libtcmalloc_minimal.so /usr/lib64/libhwloc.so -ldl -lrt && :
/opt/rh/gcc-toolset-14/root/usr/libexec/gcc/x86_64-redhat-linux/14/ld: CMakeFiles/hpx_example.dir/main.cc.o: in function tbb::detail::d1::execution_slot(tbb::detail::d1::execution_data const&)': main.cc:(.text._ZN3tbb6detail2d114execution_slotERKNS1_14execution_dataE[_ZN3tbb6detail2d114execution_slotERKNS1_14execution_dataE]+0x14): undefined reference to tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
/opt/rh/gcc-toolset-14/root/usr/libexec/gcc/x86_64-redhat-linux/14/ld: CMakeFiles/hpx_example.dir/main.cc.o: in function tbb::detail::d1::current_thread_index()': main.cc:(.text._ZN3tbb6detail2d120current_thread_indexEv[_ZN3tbb6detail2d120current_thread_indexEv]+0xe): undefined reference to tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[asus@localhost hpx_example]$

@MichaelSipayung
Copy link
Author

MichaelSipayung commented Feb 17, 2025

Every standalone TBB application i run is work fine using cmake, for example find_package(TBB) and target_link_libraries(TBB::tbb), i'm trying to add this in my hpx program, but still not work.
find_package(HPX REQUIRED) find_package(TBB REQUIRED) add_executable(hpx_example main.cc) target_link_libraries(hpx_example HPX::hpx HPX::wrap_main HPX::iostreams_component TBB::tbb)

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

No branches or pull requests

1 participant