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

Build failed on oneAPI toolchain with deepks and testing ON #4673

Closed
16 tasks
Cstandardlib opened this issue Jul 12, 2024 · 2 comments · Fixed by #4733
Closed
16 tasks

Build failed on oneAPI toolchain with deepks and testing ON #4673

Cstandardlib opened this issue Jul 12, 2024 · 2 comments · Fixed by #4733
Assignees
Labels
Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS

Comments

@Cstandardlib
Copy link
Collaborator

Describe the bug

When building latest abacus with -DBUILD_TESTING=ON and -DENABLE_DEEPKS=1, compiler error encountered:
img_v3_02cn_0c242d2f-d0c0-4933-9580-4b42268cd40g

Expected behavior

No response

To Reproduce

. /opt/intel/oneapi/2024.2/oneapi-vars.sh
echo rm -rf build
rm -rf build
CXX=mpiicpx cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=1 -DTorch_DIR=~/packages/libtorch/share/cmake/Torch/ -Dlibnpy_INCLUDE_DIR=~/packages/libnpy/include
cmake --build build -j`nproc` && sudo cmake --install build

Environment

  • OS: Ubuntu 22.04
  • Compiler: IntelLLVM 2024.2.0

Additional Context

No response

Task list for Issue attackers (only for developers)

  • Verify the issue is not a duplicate.
  • Describe the bug.
  • Steps to reproduce.
  • Expected behavior.
  • Error message.
  • Environment details.
  • Additional context.
  • Assign a priority level (low, medium, high, urgent).
  • Assign the issue to a team member.
  • Label the issue with relevant tags.
  • Identify possible related issues.
  • Create a unit test or automated test to reproduce the bug (if applicable).
  • Fix the bug.
  • Test the fix.
  • Update documentation (if necessary).
  • Close the issue and inform the reporter (if applicable).
@mohanchen mohanchen added the Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS label Jul 12, 2024
@AsTonyshment
Copy link
Collaborator

I am encountering this issue as well, so it seems to be not an isolated case.

@kirk0830
Copy link
Collaborator

kirk0830 commented Jul 18, 2024

this is because the following lines in unittest:

#define private public
#define protected public

the #define private public and #define protected public break c++ STL implementation, this is the result of bad design of classes and redandunt tests on even getter functions. The developer of this class did not really design it well, the proper choice should be, once the instance is constructed, its state is determined or say determinstic, then just use getter function to check its state, this is a proper unittest of constructor. Otherwise if want to test some functionalities and if find it is needed to change the state by visiting private variables, it is either not well designed encapsulation or not well designed function, the latter case implies the function should be static instead of dynamic.

Similar problem: #2666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS
Projects
None yet
4 participants