PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

out of memory
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
AlBlack



Joined: 09 Apr 2011
Posts: 7
Location: UK

PostPosted: Wed Apr 27, 2011 6:59 am    Post subject: I have the same problem I think Reply with quote

Mat?

I have a program near exactly the same as posted above (actually I copied the code on your video tutorial). when m = 3000 it works when m=4000 it does not (and the monitor black screens for a few seconds before crashing). The output of GPUZ shows GPU load going to ~80-90% for a second or so then back to 0%. I have underclocked the GPU to as low as it can go. Similarly I have a large serial code I am trying to parallelize and get the same message as in the below exmple. This is actually what I am trying to do but thought it best to try and recreate the problem with a simpler bit of code.

Code:
!Test Program for OMP, Acc and Profiling
!A.Black 26/6/11

      program TestProg
      
      REAL(KIND=4), ALLOCATABLE :: a(:,:),b(:,:),c(:,:)
      REAL(KIND=4) m
      m=4000

      ALLOCATE(a(m,m),b(m,m),c(m,m))
      WRITE(*,*) m

!$acc region
      do j = 1,m
         do i = 1,m
            a(i,j)=0.0
         enddo
         do k = 1,m
            do i = 1,m
               a(i,j)=a(i,j)+b(i,k)*c(k,j)
            enddo
         enddo
      enddo
!$acc end region
      WRITE(*,*) 'done'

      end program TestProg


The error I get is:
"call to cuMemAlloc returned error 2: Out of Memory
CUDA driver version: 4000"

the accel info is:
C:\Program Files\PGI\win64\11.3\bin>pgaccelinfo
CUDA Driver Version: 4000

Device Number: 0
Device Name: GeForce GTX 275
Device Revision Number: 1.3
Global Memory Size: 879034368
Number of Multiprocessors: 30
Number of Cores: 240
Concurrent Copy and Execution: Yes
Total Constant Memory: 65536
Total Shared Memory per Block: 16384
Registers per Block: 16384
Warp Size: 32
Maximum Threads per Block: 512
Maximum Block Dimensions: 512, 512, 64
Maximum Grid Dimensions: 65535 x 65535 x 1
Maximum Memory Pitch: 2147483647B
Texture Alignment: 256B
Clock Rate: 1404 MHz
Current free memory: 788955136

I updated the driver today and no effect
I am also using PG visual fortran iusing the windows env (not commandline)?
its a 64bit application and the OS is Win7 64b

Do you have any suggestions as to what may be going wrong because whatever I do I get the out of memory error and from using GPUZ and back of the envelope calcs of array sizes I dont think this shouldnt be the case.

THANKS
Al
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6482
Location: The Portland Group Inc.

PostPosted: Wed Apr 27, 2011 3:33 pm    Post subject: Reply with quote

Hi Al,

I'm still not sure what's wrong here. I've tried to recreate the problem here but it seems specific to these GTX devices running on Windows. I only have one GTX system but it runs Linux and has no problems running the code.

Are you able to run an equivalent CUDA C program? Do you have a monitor attached to the device?

- Mat
Back to top
View user's profile
AlBlack



Joined: 09 Apr 2011
Posts: 7
Location: UK

PostPosted: Wed Apr 27, 2011 3:58 pm    Post subject: Reply with quote

Hi Mat,

Thanks for looking at this.
Im only using the GTX 275 so yes using it for day to day windows graphics also, typically <100Mb used. Im sure I got further with this when I was using XP - when looking at the same problem about a year ago. At least I cant remember this being an issue.

I do have another graphics card which I can instal tomorrow for non CUDA use... I see in the manual there is a way to specify which device is used but cant fathom how to set this in the visual studio environment. Is this possible?

For info I asked about the same problem on the Nvid forum. somone stated the black screen (brief) was almost certainly due to memory out of bounds and also suggested using a dedicated card for graphics.
Also said memory usage may be related to over threading - but sonce got further with this last time applied it I dont think this is my problem

Thanks
Al
Im on GMT so its bed time for me
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6482
Location: The Portland Group Inc.

PostPosted: Wed Apr 27, 2011 4:45 pm    Post subject: Reply with quote

Quote:
I see in the manual there is a way to specify which device is used but cant fathom how to set this in the visual studio environment. Is this possible?
Yes. See Chapter 13 of the PVF Users Guide (http://www.pgroup.com/doc/pvfug.pdf)

You can also set the device number by calling the runtime routine "acc_set_device_num(<devnum>)". Basic usage of this can be found in Chapter 10 of the PVF UG or in more detail in the PGI Accelerator Model Reference Guide (http://www.pgroup.com/lit/whitepapers/pgi_accel_prog_model_1.3.pdf)

- Mat
Back to top
View user's profile
AlBlack



Joined: 09 Apr 2011
Posts: 7
Location: UK

PostPosted: Thu Apr 28, 2011 3:10 am    Post subject: 2nd Graphics card installation Reply with quote

Im not sure this is going to work.
Ive installed a second (different) graphics card in the machine with the intent to use it for all day to day graphics and the GTX275 for ONLY CUDA.

275 is in the first slot, a fairly standard (new) ~$100 ATI card is in the second slot. I changed the BIOS to use the PSIE-8 (as opposed 16) slot as initial graphics. The machine is now definetly using the ATI card.

In GPUZ the 275 is detected but the sensors are blank and the CUDA/PHYX etc tickboxes are not denoting CUDA enabled. Also pgaccelinfo.exe says no cuda devices detected. I reinstalled the 275 drivers but no effect.

any idea on what im doing wrong?
Its probably exceptionally early in the morning where you are so I will keep trying and post if i get a solution

thanks
Al
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group