Error when compile DualSPHysics

edited December 2013 in Old versions
I have problem when compiling DualSPHysics. I am sure I've installed CUDA Toolkit, because I can compile and run the sample provided in the CUDA folder.

With DualSPHysics, if I compile it in 'ReleaseCPU' everything is OK and I can get the exe file. But if I try compiling it in 'Release', it gives the following error information:

1>PreBuildEvent:
1> Deleting... Intermediate\Release\CudaSphApi.obj
1>CustomBuild:
1> Performing Custom Build Tools
1> Deleting... Run\DualSPHysics_Release64.exe
1> Deleting... Run\DualSPHysics_Release64_ptxasinfo
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: “cmd.exe” exit, code 3.
1>
1>Fail

I modified nothing of the original files. I just downloaded the source file and tried compiling it. VS2010 is used.

Could anyone help me? Thank you.

Comments

  • Hi Fallet,

    Have you installed CUDA 4.0 or another version?
  • I installed CUDA 5.5. Is only CUDA 4.0 OK for DualSPHysics?
  • Hi Fallet,

    Apologies for not responding earlier.

    No, DualSPHysics is not limited to CUDA 4.0, it's just the Visual Studio project defaults to 4.

    The DualSPHysics 2.0 manual isn't really specific enough in this regard, this is fixed with the new release.

    In the meantime however, you need to correct a few things in the project:

    1) In the project's general properties you need to update the path to the CUDA libraries, so "Properties >> C/C++ >> General >> Additional Include Directories" and "Properties >> Linker >> General >> Additional Library Directories" need to be updated from "$(CUDA_PATH_V4_0)" to "$(CUDA_PATH_V5_5)".
    2) You also need to make this update for each of the .cu files. So right click on each in the "CUDA" folder and go to their properties, you will see a custom compilation is in place for each, update the same value for each file.
    3) You also need to slightly modify the "PTXAS" output option for the file "JSphGpu_ker.cu" when you are modifying its value for point 2, this needs to read “1>$(OutDir)$(ProjectName)_win64_ptxasinfo” instead of “2>$(OutDir)$(ProjectName)_win64_ptxasinfo”.

    With these changes in place the project should build.

    if all else fails, install CUDA 4.0 AND the "build patch" issued by NVIDIA and extract a fresh copy of the DualSPHysics 2.0 project, this set up should build directly.

    Please note: testing has shown DualSPHysics currently performs best using CUDA 4.0 due to the change in NVCC compiler made by NVIDIA in CUDA 4.1 and above which appears to allocate registers slightly differently to that used in CUDA 4.0. Performance is still good using CUDA 4.1 and above and seems to improve with each release and of course offers better debugging possibilities.

    Regards.
  • Hi All,

    You might have to compile the cudart and cutil64 as well is you continue using CUDA 5.5 located at the SDK forder of CUDA

    George
  • Thank you, SLongshaw and gfourtakas!
Sign In or Register to comment.