<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><h1 class="font-[475] font-regular dark:selection:bg-superDuper/10 font-display dark:selection:text-superDark text-textMain default selection:text-textMain group/query whitespace-pre-line dark:font-[450] dark:text-textMainDark selection:bg-super/50 text-3xl break-words relative [word-break:break-word]" style="box-sizing: border-box; border: 0px solid rgb(229, 231, 235); --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: ; --tw-pan-y: ; --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: ; --tw-gradient-via-position: ; --tw-gradient-to-position: ; --tw-ordinal: ; --tw-slashed-zero: ; --tw-numeric-figure: ; --tw-numeric-spacing: ; --tw-numeric-fraction: ; --tw-ring-inset: ; --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-blur: ; --tw-brightness: ; --tw-contrast: ; --tw-grayscale: ; --tw-hue-rotate: ; --tw-invert: ; --tw-saturate: ; --tw-sepia: ; --tw-drop-shadow: ; --tw-backdrop-blur: ; --tw-backdrop-brightness: ; --tw-backdrop-contrast: ; --tw-backdrop-grayscale: ; --tw-backdrop-hue-rotate: ; --tw-backdrop-invert: ; --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; --tw-contain-size: ; --tw-contain-layout: ; --tw-contain-paint: ; --tw-contain-style: ; font-weight: 475; margin: 0px; position: relative; white-space: pre-line; overflow-wrap: break-word; font-family: var(--font-fk-grotesk),ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica Neue,Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; line-height: 2.25rem; --tw-text-opacity: 1; color: oklch(var(--text-color-100)/var(--tw-text-opacity)); word-break: break-word; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial;"><span style="font-size: 14px;" class="">build petsc-3.20.3 with llvm, clang, clang++, gfortran</span><span style="font-size: 1.875rem;" class="">
</span></h1><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0); background-color: rgb(224, 228, 9);" class="">CFLAGS</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">=</span><span style="font-variant-ligatures: no-common-ligatures;" class="">'-std=c++11'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">CXXFLAGS=</span><span style="font-variant-ligatures: no-common-ligatures;" class="">'-std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1'</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">LDLIBS += -lstdc++</span></div></span></div></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$PETSC_ARCH     arch-linux-c-opt</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MPIF90  = ./models/src/v2021.03-2.0.3-llvm/bin/mpif90</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MPICC   = ./models/src/v2021.03-2.0.3-llvm/bin/mpicc</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CLANG   = clang</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">FC   = gfortran</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Petsc libraries are built;</div><div class=""><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(254, 244, 139);" class="">/models/src/v2021.03-2.0.3-llvm/lib/libpetsc.so@</span></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">/models/src/v2021.03-2.0.3-llvm/lib/libpetsc.so.3.020@</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">/models/src/v2021.03-2.0.3-llvm/lib/libpetsc.so.3.020.3*</span></div></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">The configure is this:</div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        cd $(PETSC_SRC) && unset CXX CC FC F77 && $(PYTHON2) ./configure --prefix=$(PREFIX) \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  --with-cc=clang \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  --with-cxx=clang++ \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  --with-fc=gfortran \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  --download-mpich=</span><span style="font-variant-ligatures: no-common-ligatures" class="">"$(DIR_SRC)/mpich-$(MPICH_VERSION).tar.gz"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  --download-fblaslapack=</span><span style="font-variant-ligatures: no-common-ligatures" class="">"$(DIR_SRC)/fblaslapack-$(FBLASLAPACK_VERSION).tar.gz"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  --download-sowing \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  --with-debugging=$(PETSC_DBG) \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  --with-shared-libraries=1 \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; background-color: #e0e409" class="">CFLAGS</span><span style="font-variant-ligatures: no-common-ligatures" class="">=</span><span style="font-variant-ligatures: no-common-ligatures; color: #ac1f16" class="">'-std=c11'</span><span style="font-variant-ligatures: no-common-ligatures" class=""> \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  CXXFLAGS=</span><span style="font-variant-ligatures: no-common-ligatures" class="">'-std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  CPPFLAGS=</span><span style="font-variant-ligatures: no-common-ligatures" class="">'-D_GLIBCXX_USE_CXX11_ABI=1'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  LDFLAGS=</span><span style="font-variant-ligatures: no-common-ligatures" class="">'-L$(LLVM_LIB)'</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> \</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  LIBS=</span><span style="font-variant-ligatures: no-common-ligatures" class="">'-lstdc++’</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> \</span></div></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(172, 31, 22); background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">  --COPTFLAGS=$(COPTFLAGS) --CXXOPTFLAGS=$(CXXOPTFLAGS) --FOPTFLAGS=$(FOPTFLAGS)</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">Here is the make:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        $(MAKE) -C $(PETSC_SRC) PETSC_DIR=$(PETSC_SRC) PETSC_ARCH=$(PETSC_ARCH) all</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Check-petsc is:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">        $(MAKE) -C $(PETSC_SRC) PETSC_DIR=$(PETSC_SRC) PETSC_ARCH=$(PETSC_ARCH) test</span></div></div><div class=""><br class=""></div><div class="">Here is the log file for test:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">make[1]: Entering directory '/models/src/v2021.03-2.0.3-llvm/build/petsc/petsc-3.20.3'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/usr/bin/python3 /models/src/v2021.03-2.0.3-llvm/build/petsc/petsc-3.20.3/config/gmakegentest.py --petsc-dir=/models/src/v2021.03-2.0.3-llvm/build/petsc/petsc-3.20.3 --petsc-arch=arch-linux-c-opt --testdir=./arch-linux-c-opt/tests --srcdir /models/src/v2021.03-2.0.3-llvm/build/petsc/petsc-3.20.3/src --pkg-pkgs "sys vec mat dm ksp snes ts tao"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Using MAKEFLAGS: iw -- PETSC_ARCH=arch-linux-c-opt PETSC_DIR=/models/src/v2021.03-2.0.3-llvm/build/petsc/petsc-3.20.3</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">         CC arch-linux-c-opt/tests/sys/classes/draw/tests/ex1.o</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    CLINKER arch-linux-c-opt/tests/sys/classes/draw/tests/ex1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../bin/ld: arch-linux-c-opt/lib/libpetsc.so: undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../bin/ld: arch-linux-c-opt/lib/libpetsc.so: undefined reference to `std::__throw_bad_array_new_length()'</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">clang: error: linker command failed with exit code 1 (use -v to see invocation)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">make[1]: [gmakefile.test:273: arch-linux-c-opt/tests/sys/classes/draw/tests/ex1] Error 1 (ignored)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">There are many errors of the ilk: </div><div class=""><br class=""></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(254, 244, 139);" class="">std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()</span></div><div class=""><span style="font-family: Menlo; font-size: 11px; background-color: rgb(254, 244, 139);" class=""><br class=""></span></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[lib]$ nm -A libpetsc.so | grep basic_ostringstream</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">libpetsc.so:                 U _ZNKSt7__cxx1119</span><span style="font-variant-ligatures: no-common-ligatures; color: #ac1f16" class=""><b class="">basic_ostringstream</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">IcSt11char_traitsIcESaIcEE3strEv@GLIBCXX_3.4.21</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">libpetsc.so:                 U _ZNSt7__cxx1119</span><span style="font-variant-ligatures: no-common-ligatures; color: #ac1f16" class=""><b class="">basic_ostringstream</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">IcSt11char_traitsIcESaIcEEC1Ev</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(254, 244, 139);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">libpetsc.so:                 U _ZNSt7__cxx1119</span><span style="font-variant-ligatures: no-common-ligatures; color: #ac1f16" class=""><b class="">basic_ostringstream</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">IcSt11char_traitsIcESaIcEED1Ev@GLIBCXX_3.4.21</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><span style="font-size: 14px;" class="">I/m new to llvm and this is the first time to compile petsc.3.20.3 with llvm compilers.</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">Clearly something is amiss.</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">Any ideas appreciated.</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">Michael</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div></body></html>