<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div>  You will need to pass the -L arguments appropriately to zlib's ./configure so it can link its shared library appropriately. That is, the zlib configure requires the value obtained with L'+os.environ['ROCM_PATH'],+'/lib -lhsa-runtime64', <br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 7, 2021, at 12:18 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Well, still getting these hsa errors:<br class=""><div class=""><br class=""></div><div class="">13:07 jczhang/fix-kokkos-includes= /gpfs/alpine/csc314/scratch/adams/petsc$ !136<br class="">cd /gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos/externalpackages/zlib-1.2.11 && CC="cc" CFLAGS="-fPIC -fstack-protector -Qunused-arguments -g -O0 -I${ROCM_PATH}/include" prefix="/gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos" ./configure  && /usr/bin/gmake -j8 -l307.2 &&  /usr/bin/gmake install<br class="">Checking for shared library support...<br class="">Building shared library libz.so.1.2.11 with cc.<br class="">Checking for size_t... Yes.<br class="">Checking for off64_t... Yes.<br class="">Checking for fseeko... Yes.<br class="">Checking for strerror... No.<br class="">Checking for unistd.h... Yes.<br class="">Checking for stdarg.h... Yes.<br class="">Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().<br class="">Checking for vsnprintf() in stdio.h... No.<br class="">  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib<br class="">  can build but will be open to possible buffer-overflow security<br class="">  vulnerabilities.<br class="">Checking for return value of vsprintf()... Yes.<br class="">Checking for attribute(visibility) support... Yes.<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -c -o example.o test/example.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o adler32.o adler32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o crc32.o crc32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o deflate.o deflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o infback.o infback.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o inffast.o inffast.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o inflate.o inflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o inftrees.o inftrees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o trees.o trees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o zutil.o zutil.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o compress.o compress.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o uncompr.o uncompr.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzclose.o gzclose.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzlib.o gzlib.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzread.o gzread.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzwrite.o gzwrite.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/adler32.o adler32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/crc32.o crc32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/deflate.o deflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/infback.o infback.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/inffast.o inffast.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/inflate.o inflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/inftrees.o inftrees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/trees.o trees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/zutil.o zutil.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/compress.o compress.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/uncompr.o uncompr.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzclose.o gzclose.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzlib.o gzlib.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzread.o gzread.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzwrite.o gzwrite.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c<br class="">ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o example example.o -L. libz.a<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a<br class="">cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o example64 example64.o -L. libz.a<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]<br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class=""><br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">gmake: *** [Makefile:289: example] Error 1<br class="">gmake: *** Waiting for unfinished jobs....<br class="">gmake: *** [Makefile:292: minigzip] Error 1<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">gmake: *** [Makefile:304: minigzip64] Error 1<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">gmake: *** [Makefile:301: example64] Error 1<br class="">rm -f libz.so libz.so.1<br class="">ln -s libz.so.1.2.11 libz.so<br class="">ln -s libz.so.1.2.11 libz.so.1<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 1:05 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Thanks, it was missing the /<br class=""><div class=""><br class=""></div><div class="">    '--LDFLAGS=-L'+os.environ['ROCM_PATH'],+'/lib -lhsa-runtime64',<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 12:48 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank" class="">knepley@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Did you look in /sw/spock/spack-envs/views/rocm-4.1.0lib ?<div class=""><br class=""></div><div class="">  Matt</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 12:29 PM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Ok, I tried that but now I get this error.</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 12:13 PM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" target="_blank" class="">stefano.zampini@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto" class="">There's an extra comma</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Mer 7 Lug 2021, 18:08 Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank" class="">mfadams@lbl.gov</a>> ha scritto:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Humm, I get this error (I just copied your whole file into here):<div class=""><br class=""></div><div class="">12:06 jczhang/fix-kokkos-includes= /gpfs/alpine/csc314/scratch/adams/petsc$ ~/arch-spock-dbg-cray-kokkos.py<br class="">Traceback (most recent call last):<br class="">  File "/ccs/home/adams/arch-spock-dbg-cray-kokkos.py", line 27, in <module><br class="">    '--LDFLAGS=-L'+os.environ['ROCM_PATH'],+'lib -lhsa-runtime64',<br class="">TypeError: bad operand type for unary +: 'str'<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 11:08 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" rel="noreferrer" target="_blank" class="">stefano.zampini@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">Mark<div class=""><br class=""></div><div class="">On Spock, you can use <a href="https://gitlab.com/petsc/petsc/-/blob/main/config/examples/arch-olcf-spock.py" rel="noreferrer" target="_blank" class="">https://gitlab.com/petsc/petsc/-/blob/main/config/examples/arch-olcf-spock.py</a> as a template for your configuration. You need to add libraries as LDFLAGS to resolve the hsa symbols<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 7, 2021, at 5:04 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" rel="noreferrer" target="_blank" class="">mfadams@lbl.gov</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Thanks,<br class=""><div class=""><br class=""></div><div class="">08:30 jczhang/fix-kokkos-includes= /gpfs/alpine/csc314/scratch/adams/petsc$ cd /gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos/externalpackages/zlib-1.2.11 && CC="cc" CFLAGS="-fPIC -fstack-protector -Qunused-arguments -g -O0 -I${ROCM_PATH}/include" prefix="/gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos" ./configure  && /usr/bin/gmake -j8 -l307.2 &&  /usr/bin/gmake install<br class="">Checking for shared library support...<br class="">Building shared library libz.so.1.2.11 with cc.<br class="">Checking for size_t... Yes.<br class="">Checking for off64_t... Yes.<br class="">Checking for fseeko... Yes.<br class="">Checking for strerror... No.<br class="">Checking for unistd.h... Yes.<br class="">Checking for stdarg.h... Yes.<br class="">Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().<br class="">Checking for vsnprintf() in stdio.h... No.<br class="">  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib<br class="">  can build but will be open to possible buffer-overflow security<br class="">  vulnerabilities.<br class="">Checking for return value of vsprintf()... Yes.<br class="">Checking for attribute(visibility) support... Yes.<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -c -o example.o test/example.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o adler32.o adler32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o crc32.o crc32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o deflate.o deflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o infback.o infback.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o inffast.o inffast.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o inflate.o inflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o inftrees.o inftrees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o trees.o trees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o zutil.o zutil.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o compress.o compress.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o uncompr.o uncompr.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzclose.o gzclose.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzlib.o gzlib.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzread.o gzread.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -c -o gzwrite.o gzwrite.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/adler32.o adler32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/crc32.o crc32.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/deflate.o deflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/infback.o infback.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/inffast.o inffast.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/inflate.o inflate.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/inftrees.o inftrees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/trees.o trees.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/zutil.o zutil.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/compress.o compress.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/uncompr.o uncompr.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzclose.o gzclose.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzlib.o gzlib.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzread.o gzread.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN  -DPIC -c -o objs/gzwrite.o gzwrite.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c<br class="">ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o example example.o -L. libz.a<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a<br class="">cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a<br class="">cc -fPIC -fstack-protector -Qunused-arguments -g -O0 -I/sw/spock/spack-envs/views/rocm-4.1.0/include -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN -o example64 example64.o -L. libz.a<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]<br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class=""><br class="">ld.lldld.lld: : error: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]/opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class=""><br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">gmake: *** [Makefile:292: minigzip] Error 1<br class="">gmake: *** Waiting for unfinished jobs....<br class="">gmake: *** [Makefile:289: example] Error 1<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">gmake: *** [Makefile:304: minigzip64] Error 1<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_allocate [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agent_iterate_memory_pools [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_iterate_agents [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_load_scacquire [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_unlock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_signal_destroy [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_get_info [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_lock [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_memory_pool_free [--no-allow-shlib-undefined]<br class="">ld.lld: error: /opt/cray/pe/mpich/8.1.4/gtl/lib/libmpi_gtl_hsa.so: undefined reference to hsa_amd_agents_allow_access [--no-allow-shlib-undefined]<br class="">clang-11: error: linker command failed with exit code 1 (use -v to see invocation)<br class="">gmake: *** [Makefile:301: example64] Error 1<br class="">rm -f libz.so libz.so.1<br class="">ln -s libz.so.1.2.11 libz.so<br class="">ln -s libz.so.1.2.11 libz.so.1<br class="">11:03 2 jczhang/fix-kokkos-includes= /gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos/externalpackages/zlib-1.2.11$<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 9:18 AM Matthew Knepley <<a href="mailto:knepley@gmail.com" rel="noreferrer" target="_blank" class="">knepley@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">It is hard to see the error. I suspect it is something crazy with the install. Can you run the build by hand?<div class=""><br class=""></div><div class="">cd /gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos/externalpackages/zlib-1.2.11 && CC="cc" CFLAGS="-fPIC -fstack-protector -Qunused-arguments -g -O0 -I${ROCM_PATH}/include" prefix="/gpfs/alpine/csc314/scratch/adams/petsc/arch-spock-opt-cray-kokkos" ./configure  && /usr/bin/gmake -j8 -l307.2 &&  /usr/bin/gmake install<br class=""></div><div class=""><br class=""></div><div class="">and see what happens, and what the error code is?</div><div class=""><br class=""></div><div class="">  Thanks,</div><div class=""><br class=""></div><div class="">     Matt</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 8:48 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" rel="noreferrer" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Also, this is in jczhang/fix-kokkos-includes</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 7, 2021 at 8:46 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" rel="noreferrer" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Apparently the same error with --download-zlib=/yourselectedlocation/zlib-1.2.11.tar.gz</div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 6, 2021 at 11:53 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" rel="noreferrer" target="_blank" class="">bsmith@petsc.dev</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">$ curl <a href="http://www.zlib.net/zlib-1.2.11.tar.gz" rel="noreferrer" target="_blank" class="">http://www.zlib.net/zlib-1.2.11.tar.gz</a> > zlib-1.2.11.tar.gz</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">                                 Dload  Upload   Total   Spent    Left  Speed</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">100  593k  100  593k    0     0   835k      0 --:--:-- --:--:-- --:--:--  834k</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(200,20,201)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">~/Src/petsc</span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> (barry/2021-07-03/demonstrate-network-parallel-build=)</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> arch-demonstrate-network-parallel-build</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">$ tar -zxf zlib-1.2.11.tar.gz </span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(200,20,201)" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">~/Src/petsc</span><span style="font-variant-ligatures:no-common-ligatures" class=""><b class=""> (barry/2021-07-03/demonstrate-network-parallel-build=)</b></span><span style="font-variant-ligatures:no-common-ligatures" class=""> arch-demonstrate-network-parallel-build</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">$ ls zlib-1.2.11</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">CMakeLists.txt  adler32.c       deflate.c       gzread.c        inflate.h       </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">os400</span><span style="font-variant-ligatures:no-common-ligatures" class="">           </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">watcom</span><span style="font-variant-ligatures:no-common-ligatures" class="">          zlib.h</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ChangeLog       </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">amiga</span><span style="font-variant-ligatures:no-common-ligatures" class="">           deflate.h       gzwrite.c       inftrees.c      </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">qnx</span><span style="font-variant-ligatures:no-common-ligatures" class="">             </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">win32</span><span style="font-variant-ligatures:no-common-ligatures" class="">           zlib.map</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">FAQ             compress.c      </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">doc</span><span style="font-variant-ligatures:no-common-ligatures" class="">             infback.c       inftrees.h      </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">test</span><span style="font-variant-ligatures:no-common-ligatures" class="">            zconf.h         zlib.pc.cmakein</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">INDEX           </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,36,25)" class="">configure</span><span style="font-variant-ligatures:no-common-ligatures" class="">       </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">examples</span><span style="font-variant-ligatures:no-common-ligatures" class="">        inffast.c       <a href="http://make_vms.com/" rel="noreferrer" target="_blank" class="">make_vms.com</a>    treebuild.xml   zconf.h.cmakein <a href="http://zlib.pc.in/" rel="noreferrer" target="_blank" class="">zlib.pc.in</a></span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Makefile        </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">contrib</span><span style="font-variant-ligatures:no-common-ligatures" class="">         gzclose.c       inffast.h       </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">msdos</span><span style="font-variant-ligatures:no-common-ligatures" class="">           trees.c         <a href="http://zconf.h.in/" rel="noreferrer" target="_blank" class="">zconf.h.in</a>      </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(180,36,25)" class="">zlib2ansi</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Makefile.in     crc32.c         gzguts.h        inffixed.h      </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">nintendods</span><span style="font-variant-ligatures:no-common-ligatures" class="">      trees.h         zlib.3          zutil.c</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">README          crc32.h         gzlib.c         inflate.c       </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)" class="">old</span><span style="font-variant-ligatures:no-common-ligatures" class="">             uncompr.c       zlib.3.pdf      zutil.h</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo" class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jul 6, 2021, at 7:57 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" rel="noreferrer" target="_blank" class="">mfadams@lbl.gov</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 6, 2021 at 6:42 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" rel="noreferrer" target="_blank" class="">bsmith@petsc.dev</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br class="">
  Mark,<br class="">
<br class="">
   You can try what the configure error message should be suggesting (it is not clear if that is being printed to your screen or no).<br class="">
<br class="">
ERROR: Unable to download package ZLIB from: <a href="http://www.zlib.net/zlib-1.2.11.tar.gz" rel="noreferrer noreferrer" target="_blank" class="">http://www.zlib.net/zlib-1.2.11.tar.gz</a></blockquote><div class=""><br class=""></div><div class="">My browser can not open this and I could not see a download button on this site.</div><div class=""><br class=""></div><div class="">Can you download this?</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br class="">
* If URL specified manually - perhaps there is a typo?<br class="">
* If your network is disconnected - please reconnect and rerun ./configure<br class="">
* Or perhaps you have a firewall blocking the download<br class="">
* You can run with --with-packages-download-dir=/adirectory and ./configure will instruct you what packages to download manually<br class="">
* or you can download the above URL manually, to /yourselectedlocation/zlib-1.2.11.tar.gz<br class="">
  and use the configure option:<br class="">
  --download-zlib=/yourselectedlocation/zlib-1.2.11.tar.gz<br class="">
<br class="">
  Barry<br class="">
<br class="">
<br class="">
> On Jul 6, 2021, at 4:29 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" rel="noreferrer" target="_blank" class="">mfadams@lbl.gov</a>> wrote:<br class="">
> <br class="">
> I am getting some sort of error in build zlib on Spock at ORNL.<br class="">
> Other libraries are downloaded and I am sure the network is fine.<br class="">
> Any ideas?<br class="">
> Thanks,<br class="">
> Mark<br class="">
> <configure.log><br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></blockquote></div>
</blockquote></div>
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>
<span id="cid:f_kqtqvopr0"><configure.log></span></div></blockquote></div><br class=""></body></html>