Closed Ashutosh-Londhe closed 2 months ago
Thanks for reporting, I'm looking into this.
Can you provide the source files used in your compilation command, or are they available somewhere I can access?
[AMD Official Use Only - General]
Hi Mark,
Do we have anyone that works closely with MPI+Rocm?
I’m trying to reproduce this issue, and I’m looking for resources on building rocm-supported OpenMPI.
Thanks,
Jacob
From: Ashutosh Londhe @.> Sent: Tuesday, February 20, 2024 1:05 PM To: ROCm/ROCm-CompilerSupport @.> Cc: Subscribed @.***> Subject: [ROCm/ROCm-CompilerSupport] [Issue]: lld: error: undefined symbol: memcpy (Issue #65)
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Problem Description
I am getting lld: error: undefined symbol: memcpy error when compiling with rocm compiler
my command is this: /ext-home/asl/install/openmpi/rocm5.6/install/bin/mpicxx -O3 -fPIC -Wall -g -std=c++11 -fopenmp -fopenmp -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx908 -DOPS_MPI -I/ext-home/asl/OPS_cg/OPS/ops/c/include -L/ext-home/asl/OPS_cg/OPS/ops/c/lib/clang laplace2d_ops.cpp -I. ./openmp_offload/openmp_offload_kernels.cpp -lops_mpi_ompoffload -o laplace2d_mpi_ompoffload
i have set CC=clang and CXX=clang++ i am using rocm5.6.0
Operating System
Ubuntu 20.04.6
CPU
AMD EPYC 7543 32-Core Processor
GPU
AMD Instinct MI100
ROCm Version
ROCm 5.6.0
ROCm Component
No response
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response
— Reply to this email directly, view it on GitHubhttps://github.com/ROCm/ROCm-CompilerSupport/issues/65, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJMFR2Y4NRKPAGCM23E6ZY3YUUFWLAVCNFSM6AAAAABDR3OEHGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DKMRXHAYDEMY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi,
I am trying this with OpenSource DSL library OPS https://github.com/OP-DSL/OPS.git
After cloning, you first need to install the OPS C library, for which instructions can be found at
https://ops-dsl.readthedocs.io/en/latest/installation.html#using-makefiles
you can use the file source_amd_rocm-5.4.3_pythonenv
present in OPS/scripts folder for setting up the required environment for Make
once the library build is finished, you can try building laplace example available in "OPS/apps/c/laplace2d_tutorial/step7" `1. Open the Makefile and uncomment the following line (second last) include $(OPS_INSTALL_PATH)/../makefiles/Makefile.c_app_legacy #uncomment and comment the last line include $(OPS_INSTALL_PATH)/../makefiles/Makefile.c_app #comment
Hi @lamb-j
I was able to resolve this issue. I had this memcpy inside an OpenMP offload loop so it was expecting a device version for the same. I was earlier trying with PGI compiler, where i think they had it so not coming across this error with PGI. After replacing memcpy with normal for loop, the error is resolved.
Problem Description
I am getting
lld: error: undefined symbol: memcpy
error when compiling with rocm compilermy command is this:
/ext-home/asl/install/openmpi/rocm5.6/install/bin/mpicxx -O3 -fPIC -Wall -g -std=c++11 -fopenmp -fopenmp -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx908 -DOPS_MPI -I/ext-home/asl/OPS_cg/OPS/ops/c/include -L/ext-home/asl/OPS_cg/OPS/ops/c/lib/clang laplace2d_ops.cpp -I. ./openmp_offload/openmp_offload_kernels.cpp -lops_mpi_ompoffload -o laplace2d_mpi_ompoffload
i have set CC=clang and CXX=clang++ i am using rocm5.6.0
Operating System
Ubuntu 20.04.6
CPU
AMD EPYC 7543 32-Core Processor
GPU
AMD Instinct MI100
ROCm Version
ROCm 5.6.0
ROCm Component
No response
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response