-
Notifications
You must be signed in to change notification settings - Fork 23
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
Problem to compile #38
Comments
Seems the linker did not include the AmgX library. Some questions:
Thank you! |
Hey pihueh, thanks a lot for your fast reply. I followed straightly the documentation. I am using as a static library, but my plain is to used the wrapper for OpenFOAM with petsc4foam. I use this command: cmake -D CMAKE_INSTALL_PREFIX="/home/mateus/AmgXWrapper" -D PETSC_DIR=${PETSC_DIR} -D PETSC_ARCH=${PETSC_ARCH} -D CUDA_DIR="opt/cuda" -D AMGX_DIR="/home/mateus/AMGX-2.3.0/core" ../ $make -j 12 |
Seems CMake had no problems finding AmgX (stored as Do you have log files from the stdout of CMake and Make? (If possible, replace Other files that may be helpful for debugging is |
For some reason , cmake is not creating the error file, only CMakeOutput.log. That I am sending, also I am including a bash script, containing the exact command I typed for building: export HOME=$(pwd) export PATH_TO_WHERE_YOU_WANT_TO_INSTALL_AmgXWrapper="/home/mateus/AmgXWrapper" cmake -D CMAKE_INSTALL_PREFIX=${PATH_TO_WHERE_YOU_WANT_TO_INSTALL_AmgXWrapper} -D PETSC_DIR=${PATH_TO_PETSC} -D PETSC_ARCH=${THE_BUILD_OF_PETSC_YOU_WANT_TO_USE} -D CUDA_DIR=${PATH_TO_CUDA} -D AMGX_DIR=${PATH_TO_AMGX} ${PATH_TO_AmgXWrapper_SOURCE} make VERBSOE=1 |
I still need the stdout logs from CMake and Make. If you are not sure how to obtain them, put the following content into a file at #! /bin/sh
rm -rf /home/mateus/AmgXWrapper/build
mkdir /home/mateus/AmgXWrapper/build
cd /home/mateus/AmgXWrapper/build
export PATH_TO_WHERE_YOU_WANT_TO_INSTALL_AmgXWrapper="/home/mateus/AmgXWrapper"
export PATH_TO_PETSC="/home/mateus/petsc-3.16.2"
export THE_BUILD_OF_PETSC_YOU_WANT_TO_USE="arch-linux-c-debug"
export PATH_TO_CUDA="/opt/cuda"
export PATH_TO_AMGX="/home/mateus/AMGX-2.3.0/base"
export PATH_TO_AmgXWrapper_SOURCE="/home/mateus/AmgXWrapper"
cmake \
-D CMAKE_INSTALL_PREFIX=${PATH_TO_WHERE_YOU_WANT_TO_INSTALL_AmgXWrapper} \
-D PETSC_DIR=${PATH_TO_PETSC} \
-D PETSC_ARCH=${THE_BUILD_OF_PETSC_YOU_WANT_TO_USE} \
-D CUDA_DIR=${PATH_TO_CUDA} \
-D AMGX_DIR=${PATH_TO_AMGX} \
${PATH_TO_AmgXWrapper_SOURCE} \
2>&1 | tee cmake.log
make VERBOSE=1 2>&1 | tee make.log Then I changed your CUDA path to Once the execution of |
Ohh sorry about the typos, hahha Thanks a lot for the help! |
Your CMake system behaved differently. There are two things unusual in
Do you have the |
Also, if you can find it, upload |
Thanks a lot for all the points. I have a lot of experience on docker. So, I can try out inside a container. Would you mind sending to me all the version of your CMAKE and dependencies? |
Can you check the files under the folder Based on the log, I saw you have these files under
These are wrong. There should be no If you want to use Docker, for your reference, here are the Docker files we used: https://github.com/barbagroup/petibm-recipes/tree/master/docker. The README file describes the versions of the dependencies. (You can ignore PetIBM, which is our another software.) The CMake version in the latest Docker files is v3.23.1 And here are Docker images that were created using those files: https://hub.docker.com/repository/docker/barbagroup/petibm/tags?page=1&ordering=last_updated. |
Hi, I am trying to use AmgXwrapper for the first time, but I am not being able to compile it:
/usr/bin/ld: CMakeFiles/amgxwrapper.dir/src/setA.cpp.o: in function
AmgXSolver::setA(int, int, int, int const*, int const*, double const*, int const*)': setA.cpp:(.text+0x1c38): undefined reference to
AMGX_matrix_upload_all_global_32'/usr/bin/ld: setA.cpp:(.text+0x1d5a): undefined reference to `AMGX_matrix_upload_all_global_32'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/amgxwrapper.dir/build.make:182: libamgxwrapper.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: CMakeFiles/amgxwrapper.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Did anyone have a similar issue?
I appreciate a lot any response!
The text was updated successfully, but these errors were encountered: