nsight plugin eclipse dose not working syntax parsing

nsight plugin eclipse dose not working syntax parsing
i have “systax error : gf_CheckIndex<<<lv_Grid, lv_Block>>>();” below source
i dont understan why ?

#include <Common.h>
#include <cuda_runtime.h>
#include <stdio.h>

global void gf_CheckIndex(void)
{
printf(“threadIdx : %d, %d, %d\n”, threadIdx.x, threadIdx.y, threadIdx.z);

printf("blockIdx  : %d, %d, %d\n", blockIdx.x, blockIdx.y, blockIdx.z);

printf("blockDim  : %d, %d, %d\n", blockDim.x, blockDim.y, blockDim.z);

printf("gridDim   : %d, %d, %d\n", gridDim.x, gridDim.y, gridDim.z);

}

int main(int av_Argc, char** ap_Argv)
{
int lv_Ret = F_CLR;
int lv_NumElement = F_CLR;

dim3 lv_Block(F_THR);
dim3 lv_Grid((lv_NumElement + lv_Block.x - 1)/lv_Block.x);

fprintf(stdout, "Grid.x %d, Grid.y %d, Grid.x %d\n", lv_Grid.x, lv_Grid.y, lv_Grid.z);
fprintf(stdout, "Block.x %d, Block.y %d, Block.z %d\n", lv_Block.x, lv_Block.y, lv_Block.z);

[b]gf_CheckIndex<<<lv_Grid, lv_Block>>>();[/b] ---> eclipse show syntax error
    GF_Check(cudaDeviceReset());

return lv_Ret;

}

Hi bhson,

Have you seen this error before?

An internal error occurred during: "C/C++ Indexer".
com.nvidia.cuda.ui.editor.language.CUDACSourceParser.forInitStatement()Lorg/eclipse/cdt/core/dom/ast/IASTStatement;

And what version of eclipse are you using?

Thanks,
Alan Lam

Thanks for your reaply

  1. version of eclipse
    • eclipse ide : eclipse ide for C/C++
    • version : Photon Release 4.8.0
    • build id : 20180619-200

Thanks
bhson

How Can I fix the syntax error

Did you create the project using CUDA/C++ Project?

Seems like you Eclipse do not recognize CUDA syntax, therefore I can concluded that program is not in CUDA/C++ Project. I could reproduce the error shown in your post when code in C++ Managed
Project.

This error is current a bug. Can be reproduce by installing Nsight plugin into any eclipse ide. Awaiting NVIDIA Developer to reply.

Thanks,
Alan Lam

Nsight Eclipse plugins does not support Eclipse version 4.8 yet.
The support will be available in the next release of CUDA toolkit for Eclipse 4.8 and 4.9.

The indexer should work fine in Eclipse 4.7 (oxygen) release.

Thanks, Eclipse 4.7(Oxygen) releases works with Nsight Eclipse plugins.

Is this documented somewhere? I was reading the NsightEE guide, and could not find the required Eclipse versions anywhere. Would it be possible to include the supported eclipse versions in the CUDA documentation?

And I’ve got a really big problem. You can’t GET Eclipse Oxygen for Ubuntu 18.04 anywhere. All the files have vanished. Which means that if I build a fresh VM, I can’t get indexing to work.