Thread: GPGPU GPU specification of purpose

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    38

    Question GPGPU GPU specification of purpose

    I was reading a little online about GPGPU (specifically OpenCL) and I came across the FASTRA "supercomputer" that was built using four dual gpu graphics cards. Now, I know that at the time of this writing, both CrossfireX and SLI only support up to four GPUs (and probably will for awhile due to diminished returns on that fourth GPU), but this still got me to thinking.... If I win the lottery tomorrow, and build some crazy expensive computer, would it be possible (either through CUDA or OpenCL- I don't care which) to write a GPGPU based program that would.... Say run on my super- awesome GTX580, while I use my other, super- awesome CrossfireX'ed 6990's for gaming (that's a sum total of 5 GPUs, I think- assuming I counted correctly )

    I guess what I'm really asking here is, is it possible to specify which GPU you intend for that program to run on in the background, while another runs on a different GPU (or set of GPUs)

  2. #2
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    See chapter 4.2 on how to get a list of devices, 4.3 how how to create a context, linking those devices as a group, and 5.* on how to use contexts, such as to execute kernels, and the like. If I understand correctly, you could even link all 5 of them.

    http://www.khronos.org/registry/cl/s...ncl-1.0.48.pdf

    EDIT: Heck man, if I won the lottery, I'd be thinking 7, not 5. http://www.compusa.com/applications/...741&CatId=4070 or, even better, a Xeon machine for multiple processors.
    Last edited by User Name:; 03-23-2011 at 06:59 PM.

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    38

    Smile thanks

    The link was too large for my blackberry to open, but ill check it out as soon as I can. If anyone else is willing to post some source code I'd give you a cookie.

    I would definitely go with the SR-2 but you gotta remember there is a revodrive and sound card in the other two slots
    Last edited by ashinms; 03-23-2011 at 08:09 PM.

  4. #4
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Enumerating platforms:
    Code:
    #include [opencl header here]
    
    #include <sstream>
    #include <string>
    
    #define MAX_PLATFORM_IDS 8
    
    using namespace std;
    
    int main()
    {
    	cl_int num_platforms;
    	cl_platform_id *platforms = new cl_platform_id[MAX_PLATFORM_IDS];
    	
    	// Get list of platforms.
    	if(clGetPlatformIDs(MAX_PLATFORM_IDS, platforIDs, &num_platforms) != CL_SUCCESS)
    	{
    		cerr << "Error: clGetPlatformIDs() returns error" << endl;
    		abort();
    	}
    	
    	cout << "Available Platforms:" << endl;
    	for(int platform = 0;i < num_platforms;platform++)
    	{
    		char *param_value = new char[256];
    		string platform_name, platform_vendor, platform_extensions;
    		
    		// Get CL_PLATFORM_NAME
    		if(clGetPlatformInfo(platform, CL_PLATFORM_NAME, 256, param_value, NULL) == CL_SUCCESS)
    			platform_name = param_value;
    		else
    		{
    			cerr << "Error: clGetPlatformInfo() returns error" << endl;
    			abort();
    		}
    		
    		// Get CL_PLATFORM_VENDOR
    		if(clGetPlatformInfo(platform, CL_PLATFORM_VENDOR, 256, param_value, NULL) == CL_SUCCESS)
    			platform_vendor = param_value;
    		else
    		{
    			cerr << "Error: clGetPlatformInfo() returns error" << endl;
    			abort();
    		}
    		
    		// Get CL_PLATFORM_EXTENSIONS
    		if(clGetPlatformInfo(platform, CL_PLATFORM_EXTENSIONS, 256, param_value, NULL) == CL_SUCCESS)
    			platform_extensions = param_value;
    		else
    		{
    			cerr << "Error: clGetPlatformInfo() returns error" << endl;
    			abort();
    		}
    		
    		cout << platform << ":" << endl << "\tPlatform name: " << platform_name << endl << "\tPlatform vendor: " << platform_vendor << endl << "\tPlatform extensions: " << platform_extensions << endl;
    	}
    	return 0;
    }
    Last edited by User Name:; 03-24-2011 at 12:46 PM.

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    38
    <html>

    <img src= "http://admin.desktop.ashinms.operaunite.com/webserver/content/Guitar%20Tutorial/Picture%20Files/cookie-monster3-7769871237963363.jpg" />
    <html/>


    Edit: Okayyy.... didn't work out like I imagined.

  6. #6
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    [url] then /url in same type of braces.

  7. #7
    Registered User
    Join Date
    Dec 2008
    Posts
    38
    kay thanks

  8. #8
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    How is that related anyway?

  9. #9
    Registered User
    Join Date
    Dec 2008
    Posts
    38

    thread is dead

    Ehh... Its not. I said I'd give a cookie to someone who posted some source for me to look at. I've seen what I wanted. Learned what I needed. Thank you very much, but I'm afraid this thread is dead.

  10. #10
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    In the future, I would suggest a like, over a cookie. I have cookies turned off, anyway.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beware of GPU accleration (not games)
    By Elysia in forum Tech Board
    Replies: 22
    Last Post: 09-14-2009, 11:15 AM
  2. NTFS Specification
    By Yarin in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 01-18-2009, 01:36 PM
  3. Purpose of Operator Overloading
    By xmltorrent in forum C++ Programming
    Replies: 11
    Last Post: 08-09-2006, 06:23 PM
  4. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM

Tags for this Thread