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

Building RXMD with librxmdtorch complains about undefined references #50

Closed
TaufeqRazakh opened this issue Oct 14, 2023 · 6 comments
Closed

Comments

@TaufeqRazakh
Copy link
Member

cd src && make rxmdtorch
make[1]: Entering directory '/home/razakh/RXMD/src'
make -C ../rxmdtorch/build
make[2]: Entering directory '/home/razakh/RXMD/rxmdtorch/build'
make[3]: Entering directory '/home/razakh/RXMD/rxmdtorch/build'
make[4]: Entering directory '/home/razakh/RXMD/rxmdtorch/build'
make[4]: Leaving directory '/home/razakh/RXMD/rxmdtorch/build'
[100%] Built target rxmdtorch
make[3]: Leaving directory '/home/razakh/RXMD/rxmdtorch/build'
make[2]: Leaving directory '/home/razakh/RXMD/rxmdtorch/build'
mpif90  -L../rxmdtorch/build   -o ../rxmd module.o utils.o memory.o velocity.o pot.o fileio.o comm.o init.o bo.o qeq.o reaxff.o main.o pqeq.o cmdline.o lists.o msd.o ensembles.o constant.o remd_pot_ANN_original.o fnn.o shortrep.o symmfunc.o rxmdnn.o nnmm.o stepmod.o harmopot.o  -lrxmdtorch -lstdc++ 
ld: ../rxmdtorch/build/librxmdtorch.a(rxmdtorch.cpp.o): in function `RXMDNN::get_nn_force(int, int, int, void*, void*, void*, void*, double&)':
rxmdtorch.cpp:(.text._ZN6RXMDNN12get_nn_forceEiiiPvS0_S0_S0_Rd[_ZN6RXMDNN12get_nn_forceEiiiPvS0_S0_S0_Rd]+0x529): undefined reference to `long* at::TensorBase::data_ptr<long>() const'
ld: rxmdtorch.cpp:(.text._ZN6RXMDNN12get_nn_forceEiiiPvS0_S0_S0_Rd[_ZN6RXMDNN12get_nn_forceEiiiPvS0_S0_S0_Rd]+0x645): undefined reference to `c10::UndefinedTensorImpl::_singleton'
ld: rxmdtorch.cpp:(.text._ZN6RXMDNN12get_nn_forceEiiiPvS0_S0_S0_Rd[_ZN6RXMDNN12get_nn_forceEiiiPvS0_S0_S0_Rd]+0x656): undefined reference to `c10::UndefinedTensorImpl::_singleton'

@TaufeqRazakh
Copy link
Member Author

When adding librxmdtorch is a dynamic library to RXMD, it should have the necessary libraries, however the dependent libraries are failing to be found.

Commands from project dir:

cd rxmdtorch/
source   configs/build_sunspot.sh 
cd ../../
make torch

@ye-luo
Copy link
Collaborator

ye-luo commented Oct 14, 2023

Simple fix as introducing CMake into rxmd.

@TaufeqRazakh
Copy link
Member Author

Opened new PR #51

@TaufeqRazakh
Copy link
Member Author

Not catching IntelLLVM compiler ID and missing SYCL on sunspot when using custom IntelDPCPPConfig-modified.cmake

SYCL feature test compile failed!
compile output is: 
CMake Error at CMake/IntelDPCPPConfig-modified.cmake:263 (SYCL_FEATURE_TEST_EXTRACT):
  SYCL_FEATURE_TEST_EXTRACT Function invoked with incorrect arguments for
  function named: SYCL_FEATURE_TEST_EXTRACT
Call Stack (most recent call first):
  CMakeLists.txt:83 (find_package)


-- The SYCL compiler is SYCL_COMPILER-NOTFOUND
-- The SYCL Flags are -fsycl
-- The SYCL Language Version is 
CMake Error at /soft/datascience/aurora_models_frameworks-2023.1/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
  Could NOT find IntelDPCPP (missing: SYCL_INCLUDE_DIR SYCL_LIBRARY_DIR
  SYCL_LIBRARY)

      Reason given by package: SYCL: It appears that the /soft/restricted/CNDA/updates/2023.05.15.001/oneapi/compiler/eng-20230614/compiler/linux/bin/icpx does not support SYCL

Call Stack (most recent call first):
  /soft/datascience/aurora_models_frameworks-2023.1/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
  CMake/IntelDPCPPConfig-modified.cmake:293 (find_package_handle_standard_args)
  CMakeLists.txt:83 (find_package)


CMake Error at CMakeLists.txt:83 (find_package):
  Found package configuration file:

    /home/razakh/RXMD/CMake/IntelDPCPPConfig-modified.cmake

  but it set IntelDPCPP_FOUND to FALSE so package "IntelDPCPP" is considered
  to be NOT FOUND.  Reason given by package:

  SYCL: It appears that the
  /soft/restricted/CNDA/updates/2023.05.15.001/oneapi/compiler/eng-20230614/compiler/linux/bin/icpx
  does not support SYCL



@TaufeqRazakh
Copy link
Member Author

Not catching IntelLLVM compiler ID and missing SYCL on sunspot when using custom IntelDPCPPConfig-modified.cmake

SYCL feature test compile failed!
compile output is: 
CMake Error at CMake/IntelDPCPPConfig-modified.cmake:263 (SYCL_FEATURE_TEST_EXTRACT):
  SYCL_FEATURE_TEST_EXTRACT Function invoked with incorrect arguments for
  function named: SYCL_FEATURE_TEST_EXTRACT
Call Stack (most recent call first):
  CMakeLists.txt:83 (find_package)


-- The SYCL compiler is SYCL_COMPILER-NOTFOUND
-- The SYCL Flags are -fsycl
-- The SYCL Language Version is 
CMake Error at /soft/datascience/aurora_models_frameworks-2023.1/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
  Could NOT find IntelDPCPP (missing: SYCL_INCLUDE_DIR SYCL_LIBRARY_DIR
  SYCL_LIBRARY)

      Reason given by package: SYCL: It appears that the /soft/restricted/CNDA/updates/2023.05.15.001/oneapi/compiler/eng-20230614/compiler/linux/bin/icpx does not support SYCL

Call Stack (most recent call first):
  /soft/datascience/aurora_models_frameworks-2023.1/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
  CMake/IntelDPCPPConfig-modified.cmake:293 (find_package_handle_standard_args)
  CMakeLists.txt:83 (find_package)


CMake Error at CMakeLists.txt:83 (find_package):
  Found package configuration file:

    /home/razakh/RXMD/CMake/IntelDPCPPConfig-modified.cmake

  but it set IntelDPCPP_FOUND to FALSE so package "IntelDPCPP" is considered
  to be NOT FOUND.  Reason given by package:

  SYCL: It appears that the
  /soft/restricted/CNDA/updates/2023.05.15.001/oneapi/compiler/eng-20230614/compiler/linux/bin/icpx
  does not support SYCL

Fixed by changing find_package(IntelDPCPP) to find_package(IntelSYCL)

@TaufeqRazakh
Copy link
Member Author

Closing this issue since the undefined references is from building with Makefile. With the new PR #51 to change the build system to CMake, this error is no longer reproducible.
Thank you @ye-luo

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

2 participants