<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>  Oh yes, my mistake I misinterpreted the error message. It is actually the nvcc compiler complaining about multiple command line arguments related to optimization (which it is really picky about even if the two arguments are identical.)  I reformatted some of the configure output to show this<div class=""><br class=""></div><div class=""><div class="">-ccbin mpicxx -std=c++14 -Xcompiler -fPIC -O3 -gencode arch=compute_75,code=sm_75  -Wno-deprecated-gpu-targets</div><div class="">-I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include</div><div class="">-DDEBUGlevel=0 -DPRNTlevel=0</div><div class=""><br class=""></div><div class="">the next fragment is </div><div class=""><br class=""></div><div class=""><div class="">-O3 -DNDEBUG</div><div class=""><br class=""></div><div class="">--generate-code=arch=compute_75,code=[compute_75,sm_75]</div><div class=""><br class=""></div><div class="">-Xcompiler=-fPIC -std=c++11 -x cu -rdc=true -c /home/blahblah/Projects/220824-petsc-example-for_forum/petsc/arch-linux-c-opt/externalpackages/git.superlu_dist/SRC/superlu_gpu_utils.cu -o</div></div><div class=""><br class=""></div><div class="">Hence the -O3 appears twice, once from the CMAKE argument PETSc passes to superlu_dist </div><div class=""><br class=""></div><div class="">-DCMAKE_CUDA_FLAGS=" -ccbin mpicxx -std=c++14 -Xcompiler -fPIC -O3 -gencode arch=compute_75,code=sm_75  -Wno-deprecated-gpu-targets -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include   -DDEBUGlevel=0 -DPRNTlevel=0"</div><div class=""><br class=""></div><div class="">and then presumably, the superlu_dist cmake process adds its own arguments which overlap.</div><div class=""><br class=""></div><div class="">If I remember correctly this is fixed in the main branch of PETSc, could you do an identical build with the main branch? If that works we will just need to figure out how to get MOOSE to work with main PETSc branch.</div><div class=""><br class=""></div><div class="">  Barry</div><div class=""><br class=""></div><div class="">Sadly each one makes different -std=c++11 vs  -std=c++14 choices as well.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">--------------------<br class=""><div class=""><br class=""></div><div class=""><div class="">[ 15%] Building CUDA object SRC/CMakeFiles/superlu_dist.dir/superlu_gpu_utils.cu.o</div><div class="">cd /home/blahblah/Projects/220824-petsc-example-for_forum/petsc/arch-linux-c-opt/externalpackages/git.superlu_dist/petsc-build/SRC && /usr/bin/nvcc</div><div class=""><br class=""></div><div class="">-DSUPERLU_DIST_EXPORTS -Dsuperlu_dist_EXPORTS</div><div class=""><br class=""></div><div class="">-I/home/blahblah/Projects/220824-petsc-example-for_forum/petsc/arch-linux-c-opt/externalpackages/git.superlu_dist/petsc-build/SRC</div><div class=""><br class=""></div><div class="">-I/home/blahblah/Projects/220824-petsc-build/installation/include -I/usr/lib/x86_64-linux-gnu/openmpi/lib</div><div class=""><br class=""></div><div class="">-DUSE_VENDOR_BLAS  -ccbin mpicxx -std=c++14 -Xcompiler -fPIC -O3 -gencode arch=compute_75,code=sm_75  -Wno-deprecated-gpu-targets</div><div class=""><br class=""></div><div class="">-I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include</div><div class=""><br class=""></div><div class="">-DDEBUGlevel=0 -DPRNTlevel=0 -O3 -DNDEBUG</div><div class=""><br class=""></div><div class="">--generate-code=arch=compute_75,code=[compute_75,sm_75]</div><div class=""><br class=""></div><div class="">-Xcompiler=-fPIC -std=c++11 -x cu -rdc=true -c /home/blahblah/Projects/220824-petsc-example-for_forum/petsc/arch-linux-c-opt/externalpackages/git.superlu_dist/SRC/superlu_gpu_utils.cu -o</div><div class=""><br class=""></div><div class="">CMakeFiles/superlu_dist.dir/superlu_gpu_utils.cu</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 25, 2022, at 9:38 AM, byron <<a href="mailto:lbgpublic@gmail.com" class="">lbgpublic@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Barry <br class=""></div><div class=""><br class=""></div><div class="">There doesn't appear to be any reference to 'optimize' in the only copy of  <a href="http://superlu_gpu_utils.cu/" class="">superlu_gpu_utils.cu</a> I could find, I've attached a copy.</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class=""><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 25, 2022 at 1:44 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" 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 style="overflow-wrap: break-word;" class=""><div class=""><br class=""></div><div class=""><div class="">nvcc fatal   : redefinition of argument 'optimize'</div><div class="">make[2]: *** [SRC/CMakeFiles/superlu_dist.dir/build.make:499: SRC/CMakeFiles/superlu_dist.dir/superlu_gpu_utils.cu.o] Error 1</div><div class="">make[2]: *** Waiting for unfinished jobs....</div><div class="">nvcc fatal   : redefinition of argument 'optimize'</div><div class="">make[2]: *** [SRC/CMakeFiles/superlu_dist-static.dir/build.make:499: SRC/CMakeFiles/superlu_dist-static.dir/superlu_gpu_utils.cu.o] Error 1</div><div class="">make[2]: *** Waiting for unfinished jobs....</div></div><div class=""><br class=""></div><div class="">It seems that nvcc is unhappy with something in <a href="http://superlu_gpu_utils.cu/" target="_blank" class="">superlu_gpu_utils.cu</a>  Could you check that file for any "redefinition of optimize"? Unfortunately the nvcc compiler isn't kind enough to print the line number of the redefinition or that information is lost somehow in the build process.</div><div class=""><br class=""></div><div class="">Barry</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Aug 25, 2022, at 6:50 AM, byron <<a href="mailto:lbgpublic@gmail.com" target="_blank" class="">lbgpublic@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="">Hi All</div><div class=""><br class=""></div><div class="">I am having trouble getting petsc to build with cuda / superlu-dist enabled.  I have been trying to build it as part of another software tool, moose, hence the choice of options being passed to configure<br class=""></div><div class=""><br class=""></div><div class="">python3 ./configure --download-hypre=1 \<br class="">--with-shared-libraries=1 \<br class="">--download-hdf5=1 \<br class="">--download-hdf5-fortran-bindings=0 \<br class="">--with-debugging=no \<br class="">--download-fblaslapack=1 \<br class="">--download-metis=1 \<br class="">--download-ptscotch=1 \<br class="">--download-parmetis=1 \<br class="">--download-superlu_dist=1 \<br class="">--download-mumps=1 \<br class="">--download-strumpack=1 \<br class="">--download-scalapack=1 \<br class="">--download-slepc=1 \<br class="">--with-mpi=1 \<br class="">--with-openmp=1 \<br class="">--with-cxx-dialect=C++11 \<br class="">--with-fortran-bindings=0 \<br class="">--with-sowing=0 \<br class="">--with-64-bit-indices \<br class="">--with-cuda \<br class="">--prefix=/home/blah/blah</div><div class=""><br class=""></div><div class="">it fails with <br class=""></div><div class=""><br class=""></div><div class="">=============================================================================================                                                                                                             Installing PTScotch; this may take several minutes                                                                                                                                            =============================================================================================                                                                                                       =============================================================================================                                                                                                             Trying to download git://<a href="https://github.com/xiaoyeli/superlu_dist" target="_blank" class="">https://github.com/xiaoyeli/superlu_dist</a> for SUPERLU_DIST                                                                                                            =============================================================================================                                                                                                       =============================================================================================                                                                                                             Configuring SUPERLU_DIST with cmake; this may take several minutes                                                                                                                            =============================================================================================                                                                                                       =============================================================================================                                                                                                             Compiling and installing SUPERLU_DIST; this may take several minutes                                                                                                                          =============================================================================================                                                                                                                             *******************************************************************************<br class="">         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):<br class="">-------------------------------------------------------------------------------<br class="">Error running make on  SUPERLU_DIST<br class="">*******************************************************************************</div><div class=""><br class=""></div><div class="">I've attached the configure.log.</div><div class=""><br class=""></div><div class="">I've tried a few different things but nothing that resulted in a successfull build.  The most promising was I tried to build superlu_dist separately with the configure options that petsc passes it and then kept trying the build over and over droping out different configure options until I got it to work.  In that case removing a "-std=c++14" entry appeared to fix the problem but then when I made the same change in how petsc builds superlu-dist the make failed on superlu-dist with a different error.  I get the feeling I'm dealing with symptoms of the problem rather than the cause.  <br class=""></div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Byron<br class=""></div><div class="">           </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""> <br class=""></div></div>
<span id="gmail-m_4640858947137368745cid:f_l78x98390" class=""><configure.log></span></div></blockquote></div><br class=""></div></blockquote></div>
<span id="cid:f_l793bip20"><superlu_gpu_utils.cu></span></div></blockquote></div><br class=""></div></div></div></div></body></html>