Open Dcn303 opened 1 year ago
i have set up and run the above script got the result as shown below i give the command make -j 8 then i got the below result i have loaded the openmpi 4.1.1 already before running anything but i still get this error can someone guide me thanks i used cuda 11.2, gcc 9.3.0 openmpi 4.1.1
Based on the error message, NVIDIA's AmgX library needs OpenMP. AmgXWrapper does not need OpenMP, however, so the wrapper's linker flags do not contain OpenMP.
Which commit did you use for AmgX? I will try to reproduce it. AmgX on my machine is kind of old. So maybe something has been changed in AmgX itself.
And if you remember how you built and installed AmgX, please also post the steps here, so I can try to reproduce it.
Also, if you would like to play around with it in the mean time, try to add -D CMAKE_SHARED_LINKER_FLAGS='-fopenmp'
to your cmake
command. Let me know if it works.
Hi piyueh Thank you so much for your reply i have used openmpi 4.1.1 gcc 8.2.0 cuda 11.2
i have used the Amgx latest version 2.3.0 this one https://github.com/NVIDIA/AMGX unzip it we get the AMGX-main folder inside that we replace the thrust with this thrust https://github.com/NVIDIA/thrust/tree/6a3078c64cab0e2f276340fa5dcafa0d758ed890 and replace the cub inside the thrust/dependencies with this cub https://github.com/NVIDIA/cub/tree/cdaa9558a85e45d849016e5fe7b6e4ee79113f95 then in the CMakeLists.txt i have added the two line to enable the c++14 flag as shown in picture below in red color
after all this set up i follow mkdir build cd build cmake ../ make -j16 all in this way i ran build the amgx 2.3.0 and it ran the example https://github.com/NVIDIA/AMGX#running-single-gpu-example-from-the-build-directory
then i was trying to build the AmgxWrapper this one https://github.com/barbagroup/AmgXWrapper/archive/refs/heads/master.zip
i.e. amgxwrapper v1.6.2 , using petsc-3.16.6
the script file use is shown below
yes by adding-D CMAKE_SHARED_LINKER_FLAGS='-fopenmp'
to the above script file i.e.
to my cmake
of the AmgxWrapper it did build
Thanks a lot
it meant a lot to me
Now i am trying to run poisson example of amgxWrapper to cross verify
Hi i am not able to run the poisson example i have written the script below i am not clear what is PATH_TO_KSP_SETTING_FILE can someone please tell me what value i set it to
#! /bin/bash
module load openmpi
export CASE_NAME="AmgxWrapper_test1"
export PATH_TO_KSP_SETTING_FILE="/home/urban/DL-workspace/AMGX-main/src/solvers"
export NUMBER_OF_CELL_IN_X_DIRECTION=3
export NUMBER_OF_CELL_IN_Y_DIRECTION=4
export NUMBER_OF_CELL_IN_Z_DIRECTION=5
export CUDA_VISIBLE_DEVICES=0
mpiexec -n 4 /home/urban/DL-workspace/AmgXWrapper-master/build/example/poisson/poisson \
-caseName ${CASE_NAME} \
-mode AmgX_GPU \
-cfgFileName ${PATH_TO_KSP_SETTING_FILE} \
-Nx ${NUMBER_OF_CELL_IN_X_DIRECTION} \
-Ny ${NUMBER_OF_CELL_IN_Y_DIRECTION} \
-Nz ${NUMBER_OF_CELL_IN_Z_DIRECTION}
@Dcn303 When using -mode PETSc
, ${PATH_TO_KSP_SETTING_FILE}
refers to PETSc linear solver's configuration file. In the Poisson example, we provide two example configurations, and you can pick one to play around with it:
When using -mode AmgX_GPU
, ${PATH_TO_KSP_SETTING_FILE}
refers to AmgX linear solver's configuration file. We also provide two such example configurations:
These example configurations should already be installed on your machine when you build/install AmgXWrapper.
If you want to learn how to modify/write the configuration from scratch, please refer to NVIDIA AmgX's manual or/and PETSc's manual.
@Dcn303 When using
-mode PETSc
,${PATH_TO_KSP_SETTING_FILE}
refers to PETSc linear solver's configuration file. In the Poisson example, we provide two example configurations, and you can pick one to play around with it:
- AmgXWrapper/example/poisson/configs/PETSc_SolverOptions_GAMG.info
- AmgXWrapper/example/poisson/configs/PETSc_SolverOptions_Hypre.info
When using
-mode AmgX_GPU
,${PATH_TO_KSP_SETTING_FILE}
refers to AmgX linear solver's configuration file. We also provide two such example configurations:
- AmgXWrapper/example/poisson/configs/AmgX_SolverOptions_AGG.info
- AmgXWrapper/example/poisson/configs/AmgX_SolverOptions_Classical.info
These example configurations should already be installed on your machine when you build/install AmgXWrapper.
If you want to learn how to modify/write the configuration from scratch, please refer to NVIDIA AmgX's manual or/and PETSc's manual.
Thanks a lot @piyueh for your valuable reply it meant a lot to me, ok i will look into it Thanks alot
hello everyone i am getting error as shown above i have cuda 11.2 installed cmake version 3.25.0 gcc 9.3.0 openmpi 4.1.1 run the whole amgx by writing in the script file as shown below
can someone kindly guide me through this error it will be greatly helpful thanks