Skip to content

nvcc fatal : Option ‘–generate-code arch=compute_60’, missing code

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics nvcc fatal : Option ‘–generate-code arch=compute_60’, missing code

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #8125

    I am a beginner with OpenLB.

    So I managed to get a few things done with the help of the forum and the developer guide to run my simulation. But trying it on a single gpu only is still not possible. I get this error message after trying to compile my code and have no clue to solve this.
    So I am happy about any help.

    make -C ../../../external
    make[1]: Entering directory ‘/home/aseid/olb-1.6r0/olb-1.6r0/external’
    make -C zlib
    make[2]: Entering directory ‘/home/aseid/olb-1.6r0/olb-1.6r0/external/zlib’
    make[2]: Nothing to be done for ‘all’.
    make[2]: Leaving directory ‘/home/aseid/olb-1.6r0/olb-1.6r0/external/zlib’
    cp zlib/build/libz.a lib/
    make -C tinyxml
    make[2]: Entering directory ‘/home/aseid/olb-1.6r0/olb-1.6r0/external/tinyxml’
    make[2]: Nothing to be done for ‘all’.
    make[2]: Leaving directory ‘/home/aseid/olb-1.6r0/olb-1.6r0/external/tinyxml’
    cp tinyxml/build/libtinyxml.a lib/
    make[1]: Leaving directory ‘/home/aseid/olb-1.6r0/olb-1.6r0/external’
    make -C ../../.. core
    make[1]: Entering directory ‘/home/aseid/olb-1.6r0/olb-1.6r0’
    make[1]: Nothing to be done for ‘core’.
    make[1]: Leaving directory ‘/home/aseid/olb-1.6r0/olb-1.6r0’
    nvcc -O3 -std=c++17 –forward-unknown-to-host-compiler -pthread –forward-unknown-to-host-compiler -x cu -O3 -std=c++17 –generate-code=arch=compute_60 ,code=[compute_60 ,sm_60 ] –extended-lambda –expt-relaxed-constexpr -rdc=true -Xcudafe “–diag_suppress=implicit_return_from_non_void_function –display_error_number –diag_suppress=20014 –diag_suppress=20011” -DPLATFORM_CPU_SISD -DPLATFORM_GPU_CUDA -DDEFAULT_FLOATING_POINT_TYPE=float -I../../../src -I../../../external/zlib -I../../../external/tinyxml -c -o vpetorustube.o vpetorustube.cpp
    nvcc fatal : Option ‘–generate-code arch=compute_60’, missing code
    make: *** [../../../ vpetorustube.o] Error 1

    CXX := nvcc
    CC := nvcc

    CXXFLAGS := -O3
    CXXFLAGS += -std=c++17 –forward-unknown-to-host-compiler



    # for e.g. RTX 30* (Ampere), see table in for other options
    CUDA_ARCH := 62




    I am using a NVIDIA QUADRO P2200

    with nvidia-smi:
    | NVIDIA-SMI 545.23.08 Driver Version: 516.01 CUDA Version: 11.7 |
    | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
    | | | MIG M. |

    nvcc -V:
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2022 NVIDIA Corporation
    Built on Wed_Jun__8_16:49:14_PDT_2022
    Cuda compilation tools, release 11.7, V11.7.99
    Build cuda_11.7.r11.7/compiler.31442593_0

    Any suggestions and help will be greatly appreciated



    The error is for a different config – your listing states CUDA_ARCH as 62 whereas the error mentions 60. Is this the only change? If so, the issue is that you have a space after the cuda arch number that doesn’t get sanitized (will be fixed in 1.7).


    Hello Adrian,

    Thank you for the quick reply.

    Indeed the space in the CUDA_ARCH definition was the gist of the matter.
    Still, my code isn’t running but the examples like venturi3d are now running on the GPU.

    All the best,


    Happy to hear that the examples are working now.

    What is the issue with your case? Does it work on the CPU?


    Hey Adrian,

    i checked my code in respect to the examples. But still I got this error where I am a bit clueless.

    [ThreadPool] Sucessfully initialized, numThreads=1
    [main] Start Simulation …
    [UnitConverter] —————– UnitConverter information —————–
    [UnitConverter] — Parameters:
    [UnitConverter] Resolution: N= 50
    [UnitConverter] Lattice velocity: latticeU= 0.00712282
    [UnitConverter] Lattice relaxation frequency: omega= 1.95718
    [UnitConverter] Lattice relaxation time: tau= 0.510939
    [UnitConverter] Characteristical length(m): charL= 0.00980004
    [UnitConverter] Characteristical speed(m/s): charU= 0.01
    [UnitConverter] Phys. kinematic viscosity(m^2/s): charNu= 1.0034e-06
    [UnitConverter] Phys. density(kg/m^d): charRho= 998
    [UnitConverter] Characteristical pressure(N/m^2): charPressure= 0
    [UnitConverter] Mach number: machNumber= 0.0123371
    [UnitConverter] Reynolds number: reynoldsNumber= 97.6683
    [UnitConverter] Knudsen number: knudsenNumber= 0.000126316
    [UnitConverter] — Conversion factors:
    [UnitConverter] Voxel length(m): physDeltaX= 0.000196001
    [UnitConverter] Time step(s): physDeltaT= 0.000139608
    [UnitConverter] Velocity factor(m/s): physVelocity= 1.40394
    [UnitConverter] Density factor(kg/m^3): physDensity= 998
    [UnitConverter] Mass factor(kg): physMass= 7.51457e-09
    [UnitConverter] Viscosity factor(m^2/s): physViscosity= 0.000275173
    [UnitConverter] Force factor(N): physForce= 7.55688e-05
    [UnitConverter] Pressure factor(N/m^2): physPressure= 1967.1
    [UnitConverter] ————————————————————-
    [STLreader] Voxelizing …
    [STLmesh] nTriangles=21792; maxDist2=9.57151e-07
    [STLmesh] minPhysR(StlMesh)=(-0.00531261,-0.0120206,-1.79526e-06); maxPhysR(StlMesh)=(0.00531261,0.0120206,0.0500018)
    [Octree] radius=0.0501762; center=(-4.90002e-05,-4.90002e-05,0.024951)
    [STLreader] voxelSize=0.000196001; stlSize=0.001
    [STLreader] minPhysR(VoxelMesh)=(-0.00524302,-0.011907,0.000156916); maxPhysR(VoxelMesh)=(0.00514502,0.012005,0.0499412)
    [STLreader] Voxelizing … OK
    [main] STL was read …
    [prepareGeometry] Prepare Geometry …
    [SuperGeometry3D] cleaned 0 outer boundary voxel(s)
    [SuperGeometry3D] cleaned 0 outer boundary voxel(s)
    [SuperGeometry3D] cleaned 0 inner boundary voxel(s) of Type 3
    [SuperGeometryStatistics3D] updated
    [SuperGeometry3D] the model is correct!
    [CuboidGeometry3D] —Cuboid Stucture Statistics—
    [CuboidGeometry3D] Number of Cuboids: 1
    [CuboidGeometry3D] Delta (min): 0.000196001
    [CuboidGeometry3D] (max): 0.000196001
    [CuboidGeometry3D] Ratio (min): 0.448
    [CuboidGeometry3D] (max): 4.58929
    [CuboidGeometry3D] Nodes (min): 1799000
    [CuboidGeometry3D] (max): 1799000
    [CuboidGeometry3D] Weight (min): 1799000
    [CuboidGeometry3D] (max): 1799000
    [CuboidGeometry3D] ——————————–
    [SuperGeometryStatistics3D] materialNumber=0; count=1216568; minPhysR=(-0.00543902,-0.012103,-3.90851e-05); maxPhysR=(0.00534102,0.0122011,0.0501371)
    [SuperGeometryStatistics3D] materialNumber=1; count=490960; minPhysR=(-0.00543902,-0.011907,0.000156916); maxPhysR=(0.00514502,0.012005,0.0499411)
    [SuperGeometryStatistics3D] materialNumber=2; count=87399; minPhysR=(-0.00543902,-0.012103,-3.90851e-05); maxPhysR=(0.00534102,0.0122011,0.0501371)
    [SuperGeometryStatistics3D] materialNumber=3; count=2036; minPhysR=(-0.00485102,-0.00485102,-3.90851e-05); maxPhysR=(0.00494902,0.00494902,-3.90851e-05)
    [SuperGeometryStatistics3D] materialNumber=4; count=2037; minPhysR=(-0.00485102,-0.00485102,0.0501371); maxPhysR=(0.00494902,0.00494902,0.0501371)
    [prepareGeometry] Prepare Geometry … OK
    [main] Define SuperLattice …
    terminate called after throwing an instance of ‘thrust::system::system_error’
    what(): parallel_for failed: cudaErrorSymbolNotFound: named symbol not found

    Thank you for your help so far!



    To the second question:
    Yes it is running without compilation errors on only cpu and mpi.


    I managed to reproduce this error the CUDA_ARCH number was to high


    You mean you managed to fix it?

    In any case, generating device code for a later generation than the one a GPU has would explain the Thrust exception.


    Yes and thank you for your help!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.