<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you Junchao, we'll work on this compatibility issue.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Marcos</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Junchao Zhang <junchao.zhang@gmail.com><br>
<b>Sent:</b> Friday, November 8, 2024 3:47 PM<br>
<b>To:</b> Vanella, Marcos (Fed) <marcos.vanella@nist.gov><br>
<b>Cc:</b> Satish Balay <balay@mcs.anl.gov>; petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov>; Victor Eijkhout <eijkhout@tacc.utexas.edu><br>
<b>Subject:</b> Re: [petsc-users] Compiling PETSc in for Grace-Hopper nodes</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Yes, the error message indicates gcc-14 is not supported by cuda-12.5.<br>
According to <a href="https://urldefense.us/v3/__https://docs.nvidia.com/cuda/archive/12.5.0/cuda-installation-guide-linux/index.html*host-compiler-support-policy__;Iw!!G_uCfscf7eWS!dE1UqBggdaLlQuHbpbc4p7cYAz9EvrpKKIDn3RKUBr-E2D7rcj5OO0krQHrW75551ETLudAIb2qjBr_qhCg0XKvqOk0iGmQL$">
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.nvidia.com%2Fcuda%2Farchive%2F12.5.0%2Fcuda-installation-guide-linux%2Findex.html%23host-compiler-support-policy&data=05%7C02%7Cmarcos.vanella%40nist.gov%7C7136c6301354458874f708dd00369e37%7C2ab5d82fd8fa4797a93e054655c61dec%7C0%7C0%7C638666956782708272%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ZCZOH7YEqdGU2NSHnn4Shuly%2BG2%2BPci6Gcm5yoVcJKY%3D&reserved=0</a>,<br>
it supports up to gcc-13.2.<br>
<br>
Perhaps the best approach is to ask your sys admin to install<br>
compatible gcc and cuda.<br>
<br>
--Junchao Zhang<br>
<br>
On Fri, Nov 8, 2024 at 2:34 PM Vanella, Marcos (Fed)<br>
<marcos.vanella@nist.gov> wrote:<br>
><br>
> Hi Satish and Junchao, this is what I'm getting at the end of the configure.log. I guess there is an incompatibility among nvcc and the gcc version I'm using.<br>
><br>
><br>
> ...<br>
> =============================================================================================<br>
> TESTING: checkCUDACompiler from config.setCompilers(/home1/09805/mnv/Software/petsc/config/BuildSystem/config/setCompilers.py:1541)<br>
> Locate a functional CUDA compiler<br>
> Checking for program /opt/apps/xalt/xalt/bin/nvcc...not found<br>
> Checking for program /opt/apps/gcc14/cuda12/openmpi/5.0.5/libexec/osu-micro-benchmarks/mpi/one-sided/nvcc...not found<br>
> Checking for program /opt/apps/gcc14/cuda12/openmpi/5.0.5/libexec/osu-micro-benchmarks/mpi/collective/nvcc...not found<br>
> Checking for program /opt/apps/gcc14/cuda12/openmpi/5.0.5/libexec/osu-micro-benchmarks/mpi/pt2pt/nvcc...not found<br>
> Checking for program /opt/apps/gcc14/cuda12/openmpi/5.0.5/libexec/osu-micro-benchmarks/mpi/startup/nvcc...not found<br>
> Checking for program /opt/apps/gcc14/cuda12/openmpi/5.0.5/bin/nvcc...not found<br>
> Checking for program /home1/apps/nvidia/Linux_aarch64/24.7/cuda/12.5/bin/nvcc...found<br>
> Defined make macro "CUDAC" to "nvcc"<br>
> Executing: nvcc -c -o /tmp/petsc-qlfa8fb8/config.setCompilers/conftest.o -I/tmp/petsc-qlfa8fb8/config.setCompilers /tmp/petsc-qlfa8fb8/config.setCompilers/conftest.cu<br>
> stdout:<br>
> In file included from /home1/apps/nvidia/Linux_aarch64/24.7/cuda/12.5/bin/../targets/sbsa-linux/include/cuda_runtime.h:82,<br>
> from <command-line>:<br>
> /home1/apps/nvidia/Linux_aarch64/24.7/cuda/12.5/bin/../targets/sbsa-linux/include/crt/host_config.h:143:2: error: #error -- unsupported GNU version! gcc versions later than 13 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override
this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.<br>
> 143 | #error -- unsupported GNU version! gcc versions later than 13 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect
run time execution. Use at your own risk.<br>
> | ^~~~~<br>
> Possible ERROR while running compiler: exit code 1<br>
> stderr:<br>
> In file included from /home1/apps/nvidia/Linux_aarch64/24.7/cuda/12.5/bin/../targets/sbsa-linux/include/cuda_runtime.h:82,<br>
> from <command-line>:<br>
> /home1/apps/nvidia/Linux_aarch64/24.7/cuda/12.5/bin/../targets/sbsa-linux/include/crt/host_config.h:143:2: error: #error -- unsupported GNU version! gcc versions later than 13 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override
this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.<br>
> 143 | #error -- unsupported GNU version! gcc versions later than 13 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect
run time execution. Use at your own risk.<br>
> | ^~~~~<br>
> Source:<br>
> #include "confdefs.h"<br>
> #include "conffix.h"<br>
><br>
> int main(void) {<br>
> return 0;<br>
> }<br>
><br>
> Error testing CUDA compiler: Cannot compile CUDA with nvcc.<br>
> Deleting "CUDAC"<br>
> *********************************************************************************************<br>
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>
> ---------------------------------------------------------------------------------------------<br>
> CUDA compiler you provided with -with-cudac=nvcc cannot be found or does not work.<br>
> Cannot compile CUDA with nvcc.<br>
> *********************************************************************************************<br>
> File "/home1/09805/mnv/Software/petsc/config/configure.py", line 461, in petsc_configure<br>
> framework.configure(out = sys.stdout)<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/framework.py", line 1460, in configure<br>
> self.processChildren()<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/framework.py", line 1448, in processChildren<br>
> self.serialEvaluation(self.childGraph)<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/framework.py", line 1423, in serialEvaluation<br>
> child.configure()<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/setCompilers.py", line 2846, in configure<br>
> self.executeTest(getattr(self,LANG.join(('check','Compiler'))))<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/base.py", line 138, in executeTest<br>
> ret = test(*args,**kargs)<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/setCompilers.py", line 1544, in checkCUDACompiler<br>
> for compiler in self.generateCUDACompilerGuesses():<br>
> File "/home1/09805/mnv/Software/petsc/config/BuildSystem/config/setCompilers.py", line 1527, in generateCUDACompilerGuesses<br>
> raise RuntimeError('CUDA compiler you provided with -with-cudac='+self.argDB['with-cudac']+' cannot be found or does not work.'+'\n'+self.mesg)<br>
> ================================================================================<br>
> Finishing configure run at Fri, 08 Nov 2024 14:28:04 -0600<br>
> ================================================================================<br>
> ________________________________<br>
> From: Junchao Zhang <junchao.zhang@gmail.com><br>
> Sent: Friday, November 8, 2024 3:25 PM<br>
> To: Vanella, Marcos (Fed) <marcos.vanella@nist.gov><br>
> Cc: petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
> Subject: Re: [petsc-users] Compiling PETSc in for Grace-Hopper nodes<br>
><br>
> Hi, Marcos<br>
> Could you attach the configure.log?<br>
> --Junchao Zhang<br>
><br>
><br>
> On Fri, Nov 8, 2024 at 2:19 PM Vanella, Marcos (Fed) via petsc-users <petsc-users@mcs.anl.gov> wrote:<br>
><br>
> Hi all, does anyone have experience compiling PETSc with gnu openmpi and cross compiling with cuda nvcc on these systems?<br>
> we have access to Vista, a machine in TACC and was trying to build PETSc with these libraries. I would need gnu openmpi to compile my code (fortran std 2018), and would like to keep the same cpu compiler/openmpi for PETSc.I have the following modules loaded:<br>
><br>
> Currently Loaded Modules:<br>
> 1) ucc/1.3.0 2) ucx/1.17.0 3) cmake/3.29.5 4) xalt/3.1 5) TACC 6) gcc/14.2.0 7) cuda/12.5 (g) 8) openmpi/5.0.5<br>
><br>
> Where:<br>
> g: built for GPU<br>
><br>
> Here mpicc points to the gcc compiler, etc. When configuring PETSc in the following form I get nvcc not working:<br>
><br>
> $ ./configure COPTFLAGS="-O2 -g" CXXOPTFLAGS="-O2 -g" FOPTFLAGS="-O2 -g" FCOPTFLAGS="-O2 -g" CUDAOPTFLAGS="-O2 -g" --with-debugging=1 --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpifort --with-cuda --with-cudac=nvcc --with-cuda-arch=90 --download-fblaslapack=1
--with-make-np=8<br>
><br>
> =============================================================================================<br>
> Configuring PETSc to compile on your system<br>
> =============================================================================================<br>
> TESTING: checkCUDACompiler from config.setCompilers(config/BuildSystem/config/setCompilers.py:1541)<br>
> *********************************************************************************************<br>
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>
> ---------------------------------------------------------------------------------------------<br>
> CUDA compiler you provided with -with-cudac=nvcc cannot be found or does not work.<br>
> Cannot compile CUDA with nvcc.<br>
> *********************************************************************************************<br>
><br>
> I have nvcc in my path:<br>
><br>
> $ nvcc --version<br>
> nvcc: NVIDIA (R) Cuda compiler driver<br>
> Copyright (c) 2005-2024 NVIDIA Corporation<br>
> Built on Thu_Jun__6_02:26:10_PDT_2024<br>
> Cuda compilation tools, release 12.5, V12.5.82<br>
> Build cuda_12.5.r12.5/compiler.34385749_0<br>
><br>
> I remember being able to do this cross compilation in polaris. Any help is most appreciated,<br>
> Marcos<br>
</div>
</span></font></div>
</body>
</html>