<div dir="ltr"><div dir="ltr">On Tue, Apr 6, 2021 at 11:04 AM Blaise A Bourdin <<a href="mailto:bourdin@lsu.edu">bourdin@lsu.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div style="overflow-wrap: break-word;">
<div>Hi,</div>
<div><br>
</div>
<div>I am having the following warning when compiling any fortran example (currently on main, but  it’s been going on for a little while) on a ARM mac.</div>
<div><br>
</div>
<div><br>
</div>
<div>*******************Error detected during compile or link!*******************</div>
See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a><br>
/opt/HPC/petsc-main/src/snes/tutorials ex5f<br>
*********************************************************<br>
mpif90 -Wl,-bind_at_load -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind -ffree-line-length-none -fallow-argument-mismatch -fPIC -g   -ffree-line-length-none -fallow-argument-mismatch
 -fPIC -g    -I/opt/HPC/petsc-main/include -I/opt/HPC/petsc-main/bigsur-gcc10.2-arm64-reallybasic-g/include -I/opt/X11/include     ex5f.F90  -Wl,-rpath,/opt/HPC/petsc-main/bigsur-gcc10.2-arm64-reallybasic-g/lib -L/opt/HPC/petsc-main/bigsur-gcc10.2-arm64-reallybasic-g/lib
 -Wl,-rpath,/opt/X11/lib -L/opt/X11/lib -Wl,-rpath,/opt/homebrew/Cellar/mpich/3.4.1_2/lib -L/opt/homebrew/Cellar/mpich/3.4.1_2/lib -Wl,-rpath,/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1 -L/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1
 -Wl,-rpath,/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10 -L/opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10 -lpetsc -llapack -lblas -lX11 -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lemutls_w -lm -lc++ -ldl -o ex5f<br>
<font color="#ff2600">warning: (arm64)  could not find object file symbol for symbol </font><span style="font-family:"Fira Code";font-variant-ligatures:no-common-ligatures">muldc3</span><font color="#ff2600"><br>
</font>Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process<br>
<br>
<div><br>
</div>
<div>For reference, here is how I configured petsc:</div>
<div>./configure     --CFLAGS='-Wimplicit-function-declaration'    --FFLAGS="-ffree-line-length-none -fallow-argument-mismatch"            --with-debugging=1                    --with-shared-libraries=1             --with-x11=1</div>
<div><br>
</div>
<div>It looks like this symbol is referenced in: sfpack.o</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures"><b>SiMini</b>:petsc-main (main)$ grep -ri muldc3 bigsur-gcc10.2-arm64-reallybasic-g/*</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures">Binary file bigsur-gcc10.2-arm64-reallybasic-g/lib/libpetsc.3.015.0.dylib matches</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures">Binary file bigsur-gcc10.2-arm64-reallybasic-g/lib/libpetsc.3.015.dylib matches</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures">bigsur-gcc10.2-arm64-reallybasic-g/lib/petsc/conf/check.log:warning: (arm64)  could not find object file symbol for symbol ___muldc3</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures">Binary file bigsur-gcc10.2-arm64-reallybasic-g/lib/libpetsc.dylib matches</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures">Binary file bigsur-gcc10.2-arm64-reallybasic-g/obj/vec/is/sf/impls/basic/sfpack.o matches</span></div>
</div>
<div><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div><span style="font-variant-ligatures:no-common-ligatures">
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures"><b>SiMini</b>:petsc-main (main)$ nm bigsur-gcc10.2-arm64-reallybasic-g/obj/vec/is/sf/impls/basic/sfpack.o | grep muldc3</span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;font-family:"Fira Code"">
<span style="font-variant-ligatures:no-common-ligatures">                 U ___muldc3</span></div></span></div></div></blockquote><div><br></div><div>Google tells me it is a gcc thing for complex multiplication. Ah, I think this is the problem:</div><div><br></div><div>  <a href="https://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-August/012920.html">https://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-August/012920.html</a></div><div><br></div><div>It is in the C library and you are linking from Fortran, so the compatibility libraries are not correct.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div><span style="font-variant-ligatures:no-common-ligatures">
<div><span style="font-variant-ligatures:no-common-ligatures">Any idea?</span></div>
<div><span style="font-variant-ligatures:no-common-ligatures">Blaise</span></div>
<div><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
</span></div>
<div>-- <br>
A.K. & Shirley Barton Professor of  Mathematics<br>
Adjunct Professor of Mechanical Engineering<br>
Adjunct of the Center for Computation & Technology<br>
Louisiana State University, Lockett Hall Room 344, Baton Rouge, LA 70803, USA<br>
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 Web <a href="http://www.math.lsu.edu/~bourdin" target="_blank">http://www.math.lsu.edu/~bourdin</a></div>
<br>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>