CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[RapidCFD] CUDA error encountered while using RapidCFD

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2018, 11:38
Default CUDA error encountered while using RapidCFD
  #1
New Member
 
Satish Yadav
Join Date: Mar 2018
Posts: 14
Rep Power: 8
satish000yadav is on a distinguished road
I ran the incompressible icoFoam cavity tutorial on RapidCFD using the laplacianFoam solver. It ran, printed the output 'Time=0.01' but encountered an error after that. The whole output is as under:

/*---------------------------------------------------------------------------*\
| RapidCFD by simFlow (sim-flow.com) |
\*---------------------------------------------------------------------------*/
Build : dev
Exec : laplacianFoam
Date : May 09 2018
Time : 00:17:08
Host : "satish-Aspire-E5-573G"
PID : 2817
Case : /home/satish/RapidCFD/RapidCFD-dev/tutorial/cavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field T

Reading transportProperties

Reading diffusivity DT


SIMPLE: no convergence criteria found. Calculations will run for 3 steps.


Calculating temperature distribution

Time = 0.01

terminate called after throwing an instance of 'thrust::system::system_error'
what(): cudaEventSynchronize in future::wait: an illegal memory access was encountered
Aborted (core dumped)


What could be the possible reason behind this?

P.S.
1. When I solved the same tutorial with openFoam I got successful results.

2. I've tried some other tutorials and solver combinations too, all of them
returned the same error.

Last edited by satish000yadav; May 8, 2018 at 15:22.
satish000yadav is offline   Reply With Quote

Old   May 8, 2018, 15:44
Default
  #2
Member
 
Eric Daymo
Join Date: Feb 2015
Location: Gilbert, Arizona, USA
Posts: 56
Rep Power: 12
edaymo is on a distinguished road
Hello,

I have received the same error when changing the compile options in RapidCFD-dev/wmake/rules/linux64Nvcc/c++ from sm_30 to sm_35 architecture. With sm_30 I get no errors. With sm_35 (e.g., for an NVidia K20), I get the same cudaEventSynchronize in future::wait error.

I traced this down to future.hpp (from, CUDA - n.b. I am using CUDA 8.0 on Ubuntu 16.04), because this error is forced when __BULK_HAS_CUDART__ is true. Then, I see __BULK_HAS_CUDART__ is true comes from config.hpp (again, part of CUDA) for __CUDA_ARCH__>= 350.

https://github.com/thrust/thrust/blo...ail/config.hpp

https://github.com/thrust/thrust/blo...ulk/future.hpp

In short, if sm_35 is set in the compiler flags, config.hpp sets __BULK_HAS_CUDART__ to true and then future.hpp generates the error that you see.

I have not been able to figure out (yet) how to compile with sm_35 architecture. However, this has not been a priority because I don't think (from my reading) that sm_35 has many advantages over sm_30.

I hope this advice helps.

However, in the event that you're using sm_30 in the compile options and the error persists, did you make any further changes to RapidCFD before compiling? What CUDA version are you using, and what kind of GPU?

Best regards,

Eric
Senior Engineer
Tonkomo, LLC
www.tonkomo.com
edaymo is offline   Reply With Quote

Old   May 8, 2018, 19:17
Default
  #3
New Member
 
Satish Yadav
Join Date: Mar 2018
Posts: 14
Rep Power: 8
satish000yadav is on a distinguished road
I changed that line to sm_30 as you said and ran the process again, but I'm getting the same error again.

Apart from changing the compile option to sm_35 architecture (which I've rolled back to sm_30 now), I made one more change:

I've changed these lines:


$Home/RapidCFD/RapidCFD-dev/src/triSurface/triSurface/interfaces/STL/readSTLASCII (line 58)
$Home/RapidCFD/RapidCFD-dev/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII (line 53)


from
#if YY_FLEX_SUBMINOR_VERSION < 34
to
#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34


I'm using cuda-8.0 and my gpu is NVidia Geforce 920M.
My flex version is 2.6.0

By the way, thanks a lot for the help, I'll review the hpp files for cuda 8.0, maybe I'll find some more conditions which lead to that error.


P.S. After changing that line to sm_30, I saved the file,
re-sourced the bashrc, rebooted my pc, still I got the same error. Shall I try reinstalling RapidCFD or something else?
satish000yadav is offline   Reply With Quote

Old   May 8, 2018, 20:11
Default
  #4
Member
 
Eric Daymo
Join Date: Feb 2015
Location: Gilbert, Arizona, USA
Posts: 56
Rep Power: 12
edaymo is on a distinguished road
Hello,

If I interpret your posting correctly, you did not recompile.

You'll want to do the following steps:

1. export WM_NCOMPPROCS=10 (as appropriate for your computer, so you compile in parallel...)
2. cd RapidCFD-dev/src, then "wclean all"
3. cd RapidCFD-dev/applications, then "wclean all"
4. from the RapidCFD-dev root directory, "./Allwmake"

It will take a while to recompile, but when it finishes please try your solver again.

Best regards,

Eric
edaymo is offline   Reply With Quote

Old   May 9, 2018, 06:34
Default
  #5
New Member
 
Satish Yadav
Join Date: Mar 2018
Posts: 14
Rep Power: 8
satish000yadav is on a distinguished road
Thank you so much for the help. It's working now.
satish000yadav is offline   Reply With Quote

Old   May 29, 2018, 11:44
Default
  #6
Member
 
Eric Daymo
Join Date: Feb 2015
Location: Gilbert, Arizona, USA
Posts: 56
Rep Power: 12
edaymo is on a distinguished road
Hello,

There are some updates to RapidCFD: if you update your RapidCFD installation with the latest fixes you should now be able to compile with any -arch=smxx setting, as you were attempting to try earlier.

Best,

Eric
edaymo is offline   Reply With Quote

Reply

Tags
cuda, error, illegal memory access, nvidia, rapidcfd


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[foam-extend.org] OF-extend 4.0: compiling with CUDA jgross OpenFOAM Installation 5 December 8, 2022 09:35
OPEN FOAM and CUDA mnajafi OpenFOAM Pre-Processing 7 May 3, 2022 10:45
[RapidCFD] Installation with CUDA 5.5 svinaya OpenFOAM Community Contributions 0 June 8, 2018 02:16
[RapidCFD] Accuracy RapidCFD vs. OpenFOAM A_Ekat OpenFOAM Community Contributions 0 May 30, 2018 10:44
what should we do for the application of CUDA in CFD? aerosjc Main CFD Forum 6 February 25, 2013 12:01


All times are GMT -4. The time now is 07:51.