-
Notifications
You must be signed in to change notification settings - Fork 199
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
WarpX compilation with -DWarpX_EB=ON and -DWarpX_COMPUTE=CUDA ends up with error messages. #3214
Comments
Hello, I'm getting a similar error message with -DWarpX_EB=ON and -DWarpX_COMPUTE=CUDA
Steps to reproduce: Build this dockerfile:
|
I forgot to include the error message:
|
I tried this:
resulting in this:
|
I was able to compile successfully (with same compile options, i.e. In particular, I am also using Ubuntu 22.04 and cuda 11.8. So the problem is maybe with the instructions for installing dependencies with |
I figured out I could fix it by explicitly specifying the target gpu architecture with I think that the way I was building in the docker container was not compatible with the build system's auto-detection of gpu architecture, leading to the error. Thank you! |
Glad you could solve this! The last errors you posted looked a bit to me like the dependencies were built with another compiler than the final application. The best way to keep the stack consistent would be to use a package manager, like conda or spack, and build with the compilers therein the final application as well. |
Dear developers,
I am trying to compile WarpX-22.06 source code with the options -DWarpX_EB=ON and -DWarpX_COMPUTE=CUDA, but this is causing error messages at the end of the compilation process as below.
"""
[ 98%] Building CUDA object CMakeFiles/WarpX.dir/Source/Utils/WarpXVersion.cpp.o
[ 98%] Built target WarpX
[ 99%] Building CUDA object CMakeFiles/app.dir/Source/main.cpp.o
[100%] Linking CXX shared module lib/libwarpx.3d.MPI.CUDA.DP.PDP.OPMD.EB.QED.so
[100%] Linking CXX executable bin/warpx.3d.MPI.CUDA.DP.PDP.OPMD.EB.QED
/lib/../lib64/crti.o: In function
_init': (.init+0x7): relocation truncated to fit: R_X86_64_GOTPCREL against undefined symbol
gmon_start'CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
_ZL423__device_stub__ZN5amrex13launch_globalILi256EZNS_11ParallelForImZNS_6detail22uninitializedFillNImplINS_14ArenaAllocatorIdEEdmdEENSt9enable_ifIXaasr5amrex8RunOnGpuIT_EE5valuentsr5amrex27IsPolymorphicArenaAllocatorIS7_EE5valueEvE4typeEPT0_T1_RKT2_RS7_EUnvdl2_PFvPdmRKdRS5_ES3_IS5_dmdE1_SH_SI_vEENS6_IXsr5amrex19MaybeDeviceRunnableISA_vEE5valueEvE4typeERKNS_3Gpu10KernelInfoES7_OSA_EUnvdl2_PDoFvST_mOSN_ES1_ImSN_vE1_mSN_EEvSA_R17__nv_dl_wrapper_tI11__nv_dl_tagIPDoFvRKN5amrex3Gpu10KernelInfoEmOS_IS0_IPFvPdmRKdRNS1_14ArenaAllocatorIdEEEXadL_ZNS1_6detail22uninitializedFillNImplISA_dmdEENSt9enable_ifIXaasrNS1_8RunOnGpuIT_EE5valuentsrNS1_27IsPolymorphicArenaAllocatorISI_EE5valueEvE4typeEPT0_T1_RKT2_RSI_EELj1EEJS6_S7_EEEXadL_ZNS1_11ParallelForImSW_vEENSG_IXsrNS1_19MaybeDeviceRunnableISO_vEE5valueEvE4typeES5_SI_OSO_EELj1EEJmSW_EE': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x5b): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
ZN5amrex13launch_globalILi256E17__nv_dl_wrapper_tI11__nv_dl_tagIPDoFvRKNS_3Gpu10KernelInfoEmOS1_IS2_IPFvPdmRKdRNS_14ArenaAllocatorIdEEEXadL_ZNS_6detail22uninitializedFillNImplISB_dmdEENSt9enable_ifIXaasrNS_8RunOnGpuIT_EE5valuentsrNS_27IsPolymorphicArenaAllocatorISJ_EE5valueEvE4typeEPT0_T1_RKT2_RSJ_EELj1EEJS7_S8_EEEXadL_ZNS_11ParallelForImSX_vEENSH_IXsrNS_19MaybeDeviceRunnableISP_vEE5valueEvE4typeES6_SJ_OSP_EELj1EEJmSX_EEEEvSP' defined in .text.ZN5amrex13launch_globalILi256E17__nv_dl_wrapper_tI11__nv_dl_tagIPDoFvRKNS_3Gpu10KernelInfoEmOS1_IS2_IPFvPdmRKdRNS_14ArenaAllocatorIdEEEXadL_ZNS_6detail22uninitializedFillNImplISB_dmdEENSt9enable_ifIXaasrNS_8RunOnGpuIT_EE5valuentsrNS_27IsPolymorphicArenaAllocatorISJ_EE5valueEvE4typeEPT0_T1_RKT2_RSJ_EELj1EEJS7_S8_EEEXadL_ZNS_11ParallelForImSX_vEENSH_IXsrNS_19MaybeDeviceRunnableISP_vEE5valueEvE4typeES6_SJ_OSP_EELj1EEJmSX_EEEEvSP[ZN5amrex13launch_globalILi256E17__nv_dl_wrapper_tI11__nv_dl_tagIPDoFvRKNS_3Gpu10KernelInfoEmOS1_IS2_IPFvPdmRKdRNS_14ArenaAllocatorIdEEEXadL_ZNS_6detail22uninitializedFillNImplISB_dmdEENSt9enable_ifIXaasrNS_8RunOnGpuIT_EE5valuentsrNS_27IsPolymorphicArenaAllocatorISJ_EE5valueEvE4typeEPT0_T1_RKT2_RSJ_EELj1EEJS7_S8_EEEXadL_ZNS_11ParallelForImSX_vEENSH_IXsrNS_19MaybeDeviceRunnableISP_vEE5valueEvE4typeES6_SJ_OSP_EELj1EEJmSX_EEEEvSP] section in CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.oCMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
__cudaUnregisterBinaryUtil()': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x1b3): relocation truncated to fit: R_X86_64_PC32 against
.bss'CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::CopyToPML(amrex::MultiFab&, amrex::MultiFab&, amrex::Geometry const&)': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x603): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.oCMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryE(PatchType)': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x883): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.otmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x955): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryB(PatchType)':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xa91): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xb86): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.oCMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryF(PatchType)': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xcbd): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.oCMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryG(PatchType)': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xdcd): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.oCMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
std::_MakeUniq<amrex::MultiFab>::__single_object std::make_unique<amrex::MultiFab, amrex::BoxArray, amrex::DistributionMapping&, int&, int&>(amrex::BoxArray&&, amrex::DistributionMapping&, int&, int&) [clone .isra.141]': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xe51): additional relocation overflows omitted from the output lib/libwarpx.3d.MPI.CUDA.DP.PDP.OPMD.EB.QED.so: PC-relative offset overflow in PLT entry for
_ZN7openPMD19ADIOS2IOHandlerImpl12getOperatorsENS_9auxiliary11TracingJSONE'collect2: error: ld returned 1 exit status
gmake[2]: *** [lib/libwarpx.3d.MPI.CUDA.DP.PDP.OPMD.EB.QED.so] Error 1
gmake[1]: *** [CMakeFiles/shared.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/lib/../lib64/crt1.o:(.eh_frame+0x20): relocation truncated to fit: R_X86_64_PC32 against
.text' /lib/../lib64/crti.o: In function
_init':(.init+0x7): relocation truncated to fit: R_X86_64_GOTPCREL against undefined symbol
__gmon_start__' CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
__cudaUnregisterBinaryUtil()':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x1b3): relocation truncated to fit: R_X86_64_PC32 against
.bss' CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::CopyToPML(amrex::MultiFab&, amrex::MultiFab&, amrex::Geometry const&)':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x603): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryE(PatchType)':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x883): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0x955): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.oCMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryB(PatchType)': tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xa91): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.otmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xb86): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryF(PatchType)':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xcbd): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
PML::FillBoundaryG(PatchType)':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xdcd): relocation truncated to fit: R_X86_64_GOTPCREL against symbol
WarpX::do_single_precision_comms' defined in .bss section in CMakeFiles/WarpX.dir/Source/WarpX.cpp.o CMakeFiles/WarpX.dir/Source/BoundaryConditions/PML.cpp.o: In function
std::_MakeUniqamrex::MultiFab::__single_object std::make_unique<amrex::MultiFab, amrex::BoxArray, amrex::DistributionMapping&, int&, int&>(amrex::BoxArray&&, amrex::DistributionMapping&, int&, int&) [clone .isra.141]':tmpxft_0006f12e_00000000-6_PML.compute_86.cudafe1.cpp:(.text+0xe51): additional relocation overflows omitted from the output
bin/warpx.3d.MPI.CUDA.DP.PDP.OPMD.EB.QED: PC-relative offset overflow in PLT entry for `MPI_Type_get_envelope'
collect2: error: ld returned 1 exit status
gmake[2]: *** [bin/warpx.3d.MPI.CUDA.DP.PDP.OPMD.EB.QED] Error 1
gmake[1]: *** [CMakeFiles/app.dir/all] Error 2
gmake: *** [all] Error 2
"""
On the other hand, both cases (-DWarpX_EB=ON without -DWarpX_COMPUTE=CUDA) and (-DWarpX_COMPUTE=CUDA without -DWarpX_EB=ON) are compiled without any issues.
Thanks,
Kook-Jin
The text was updated successfully, but these errors were encountered: