# Invalid configuraion argument

**URL:** <https://forums.developer.nvidia.com/t/invalid-configuraion-argument/845>\
**Category:** CUDA Programming and Performance\
**Created:** [June 4, 2007, 1:07pm UTC](https://forums.developer.nvidia.com/t/invalid-configuraion-argument/845 "2007-06-04T13:07:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeony102](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yeony102](https://forums.developer.nvidia.com/u/yeony102)\
**Post date:** [June 4, 2007, 1:07pm UTC](https://forums.developer.nvidia.com/t/invalid-configuraion-argument/845/1 "2007-06-04T13:07:46Z")

</div>

Hello. I’m a CUDA newbee.  
Nowadays, I’m implemening a CUDA program.  
I’ve made the grid and threads of the program’s kernel like below.

dim3 threads( T2, 1);  
dim3 grid( 1, T1);  
testKernel\<\<\< grid, threads \>\>\>(d\_odata, d\_v0, d\_v1, d\_v2, d\_u0, d\_u1, d\_u2);

Here, T1 is 264 and T2 is 528.  
I’ve designed T2 width and 1 height block,  
and 1 width and T1 height grid.  
According to my design, T2 threads are in a block by widthwise,  
and T1 blocks are in a grid by lengthwise.  
But when I compiled and executed it, the program don’t work rightly and give a  
message, “Invalid configuraion argument”.  
It seems that there is a problem in threads and grid.  
Are the designs of my grid and threads are wrong?  
Are they too big?  
I also have read the CUDA manual.  
But I couldn’t fine any restriction about the size of grid or threads.  
Please tell me what is the problem.

TYIA!

---

<div class="post-metadata">

**Author:** ![AndreasBuhr](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/andreasbuhr/32/52550_2.png) [@AndreasBuhr](https://forums.developer.nvidia.com/u/AndreasBuhr)\
**Post date:** [June 4, 2007, 1:14pm UTC](https://forums.developer.nvidia.com/t/invalid-configuraion-argument/845/2 "2007-06-04T13:14:11Z")

</div>

Hi,

the maximum number of threads per block is 512, as stated in the CUDA Programming guide, section 5.1.

:-)

---

<div class="post-metadata">

**Author:** ![yeony102](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yeony102](https://forums.developer.nvidia.com/u/yeony102)\
**Post date:** [June 4, 2007, 1:18pm UTC](https://forums.developer.nvidia.com/t/invalid-configuraion-argument/845/3 "2007-06-04T13:18:22Z")

</div>

Ah, Really?  
Thanks very much!  
:)  
Well, I should fix my programme using new design of kernel.
