CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Anyone interested in doing a WinXPCrossFireX port (https://www.cfd-online.com/Forums/openfoam/60844-anyone-interested-doing-winxpcrossfirex-port.html)

cknopp March 4, 2008 13:18

After several emails with Matt
 
After several emails with Mattijs, It has come to the conclusion that this is a very possible and interesting idea, but one that would require the community to participate in greatly for it to be a success.

The idea is to use the 4 dual-core ATI Radeon video cards that also have a PPU (physics processing unit) that can do intensive calculating. The drawback is that the SDK for this tech is WinXP only. It bypasses the 3D.directx input giving direct access.

There is also support for NVidia, but ATI is in a much better position for paralell processing.

Here is the Wiki on the concept of Stream Processing: http://en.wikipedia.org/wiki/AMD_Stream_Processor

Here is the Tech manual for the CTM software: http://ati.amd.com/companyinfo/resea..._CTM_Guide.pdf

Here is the ATI FireStream SDK:
http://ati.amd.com/technology/stream.../register.html

Here are the Dev Tools:
http://ati.amd.com/developer/tools.html

More ATI links:
http://ati.amd.com/developer/index.html

If there is any interest, but you need more info, PLEASE post what you need. I havent done any programming since the Apple IIc, but I can do the research necessary to find your answers.

There is no one else working on this that I have found after about 9 hours of search and research so far. The only references is "Someday they will get around to it...".

I am a solutions provider for AMD as well, and I have inquired as to a testbed computer demo for this project. If they refuse, I can build one for $1400 with mid-range cards with a Phenom 9600 and 8GB 800mhz RAM. This idea started when I was starting my research to build my HTPC, and I have the funds to build the mid-range one for this project if AMD doesnt reply to my request.

Anyways, I hope that this takes off, because if it works well, it will be industry breaking due to the cost savings. Since a midrange system with a Dual Core cost about $800, alot more businesses could afford several.

I also propose this to be a sold product. If the community is going to work on this, then they should be compensated. I dont mean to offend anyone, but in a serious business environment, the customer wants service and accountability, and those simply are not free. There are Formula 1 teams that pay $50M for clusters to run this with General Processors. What this project would do is use the Quad Core CPU to Vector it to 8 128bit PPU's. That makes the system far beyond what the Cell Processor can do, and the hardware is quite literally built for THIS purpose, but it has yet to be done in the industry.

What do you think? Am I barking up the wrong tree?

Thanks alot!

Chris Knopp

deepsterblue March 4, 2008 16:54

If you're interested in CFD de
 
If you're interested in CFD development for the GPU, I've done a fair amount of work in the area. The job isn't easy, but I'd be happy to share my experiences.

My work primarily involved OpenGL, which is at a layer below all the FireStream/CUDA stuff (and honestly, a better bet for performance tuning). Since OpenGL is cross-platform, one of your issues is taken care of.

cknopp March 4, 2008 17:08

Care to explain the cross plat
 
Care to explain the cross platorm issue?

And if you are interested, can you start some dialogue on what you think it would deffinately need, a few things that we would want to avoid, and how best to take advantage of the cards.

I would really appreciate this thread growing with the combined experience of this board.

Thanks alot!

Chris Knopp

deepsterblue March 4, 2008 22:11

What I meant to say is that Op
 
What I meant to say is that OpenGL is an API similar to DirectX, but does not rely on Windows alone for functionality - it works on several platforms. This is vital for general-purpose graphics programming.
For general interest, the GPGPU website provides a fair deal of information: www.gpgpu.org
With regard to CFD, perhaps this document would be of some interest to you:

deepsterblue March 4, 2008 22:19

What I meant to say is that Op
 
What I meant to say is that OpenGL is an API similar to DirectX, but does not rely on Windows alone for functionality - it works on several platforms, including Linux. This is vital for general-purpose graphics programming.
I do know that getting Foam to work on Windows is tricky, so that's why I'm stressing on the cross platform issue.
For general interest, the GPGPU website provides a fair deal of information: www.gpgpu.org
With regard to CFD, I can provide my thesis documentation on request.

mbeaudoin March 5, 2008 07:30

Hello Chris, @doing a WinXP
 
Hello Chris,

@doing a WinXP-CrossFireX port:

You mean a port of OpenFOAM to CrossFire? That would be nice indeed. Or for the Cell, or for the Nvidia GPU.

@I also propose this to be a sold product.
A sold product based on OpenFOAM which is a GPL licensed software? You understand the implication of the GPL license don't you?

@If the community is going to work on this, then they should be compensated.
How would you propose the community be compensated?

Please take no offense of these questions, I don't think you are barking at the wrong tree. This is a very interesting subject. It just raises a few interesting questions.

Martin

deepsterblue March 5, 2008 09:44

I apologize for the previous p
 
I apologize for the previous post. The thesis is available here (Thank you, Mattijs):
http://openfoamwiki.net/images/9/99/Proposal.pdf.tar.gz

cknopp March 5, 2008 13:15

I apologize for any misunderst
 
I apologize for any misunderstanding about making a pay-to-use product. I understand that the OpenFOAM general license forbids this, but if the port requires a complete re-write from scratch, I don't think that it would violate the terms.

I am not trying to do anything shady, I just understand that very few people devote the kind of time and frustration inherent with a project such as this without some kind of compensation. And there is also the fact that if a corporation wanted to use the software, they would most likely require support from an entity, not a messageboard.

I personally dont require compensation for this project, as just doing something groundbreaking has enough appeal to keep me interested, but I cannot expect others to feel that way about my idea, understand?

So, I'm going to dig through the GPGPU page and see whats up there.

Is there enough interest to do this? Is it plausible to simply port OpenFOAM as-is to windows while enabling CrossFire support? Or would it be a "from scratch" project? How do we go about starting the organizing and division of purpose that can get this started? Project management is what I do in the real world, but I have no experience doing these types of projects online.

Anyways, more discussion and reference material is welcome. Please, share the wisdom!

Chris

guillaume March 10, 2008 12:29

To my knowledge two assumption
 
To my knowledge two assumptions are not correct:

>I apologize for any misunderstanding about making
>a pay-to-use product. I understand that the
>OpenFOAM general license forbids this

The GPL does in no way prohibit you from charging customers for the product. The question is only if this makes sense since they are allowed to distribute it freely.

>but if the port requires a complete re-write
>from scratch, I don't think that it would violate
>the terms.

There are opinions that re-writing some code which is geared to GPLed code (not just to the underlying algorithms) produces a derived work which has to be GPLed again.

If you ran some automatic translator which produces code for the GPU from OpenFOAM, the result is definitely derived code. If you do the same manually, it is derived, too.

By announcing your idea of re-writing the code, you will find it difficult to convince GPL hardliners, that you don't produce derived work.
I just want to mention this before you start. Still I am interested to see results.

Guillaume

alberto March 10, 2008 14:13

I think the main question shou
 
I think the main question should be if the licence of the ATI toolkit and of the libraries is compatible with GPL. If not, as I think, you can't even link to OpenFOAM libraries without violating GPL (same reason why nVidia drivers can't be distributed in compiled form).

Regards,
Alberto

cknopp March 10, 2008 17:29

So, are these insurmountable h
 
So, are these insurmountable hurdles, or are we just splitting hairs?

I am willing to to anything that I to help in this project, and I appreciate that the community is looking at the legal angle on this.

About the GPL, I say that the community knows it better than I, so would it be legal or not? I find it very hard to believe that ATI would specifically make a PPU and then make it illegal to use however.

But, what do I know?

Chris

guillaume March 10, 2008 18:08

I don't know ATI's toolkit lic
 
I don't know ATI's toolkit license, and therefore in the following I simply assume that you'd be allowed to use it for your programs rather liberally, because as you say otherwise such a toolkit is not of much use.

The problem lies on the GPL side, which I guess Alberto meant when he said that ATI's toolkit and the GPL may be incompatible:

GPL forbids you to link GPLed code with other code that (among other requirements) gives the 'receiver' less rights concerning the code distribution or with code that is distributed as binary only.

You can call this splitting hairs if you are up to violating the GPL and have enough financial power to fight those who might try to enforce license compliance on you.

To answer your question: violating any license is illegal in most countries. The GPL was developed for some reason. You may be interested to learn the difference in contrast to code released into the 'public domain'.

I don't understand why you want to start from OpenFOAM if you want to develop an application out of commercial interest. There are several comparable packages available, including the sources, with a sufficiently liberal license that encourages you to sell the product. You have to buy those.

If you discover that ATI's license *is* compatible with the GPL (which I doubt, but I don't say it is *not*), you still have the option to license your project derived from OpenFOAM under some compatible intersection of both licenses and sell it in compliance with those terms. Otherwise I don't see a legal way to surmount this hurdle.

Guillaume

mike_jaworski March 10, 2008 22:30

I thought I heard somewhere th
 
I thought I heard somewhere that ATI was going to open-source their drivers? It must have been on slashdot.org that I read it, but I might just be remembering things. That may, or may not, have much to do with the SDK they use with windows systems, though.

-Mike

olesen March 11, 2008 03:04

Chris, As much as I like GP
 
Chris,

As much as I like GPL'd open source, I think you'd be able to go ahead with your project provided that you comply with the licenses.

Assuming you write code from scratch for the ATI PPU, then you are only bound by their licensing restrictions (probably not GPL).

To use this new code with OpenFOAM, will require you to hook into the OpenFOAM data structures. As such, this interface itself would be considered a derived work and must be GPL'd.

This is the same approach that nvidia uses with its Linux graphics drivers - the core is proprietary, the interface to the kernel is (must be) open source. This may annoy many people, since it's not completely open source, but it's legal.

As someone previously noted, however, if you rewrite parts of the OpenFOAM solvers for the PPU, it would be very much be a derived work and thus GPL. I personally think it'll be quite a challenge writing an OpenFOAM solver using the PPU without looking at (and copying bits from) OpenFOAM.

One possibility would be to write an open source port and charge for support. Obviously, not everyone who uses the code will pay for support, but if the support provides a level of added value, some will (cf. OpenCFD).
Forming a consortium of companies and institution to fund the port is another possibility, albeit an annoying one to organize.

cknopp March 11, 2008 11:12

Thanks guys, I believe that I
 
Thanks guys, I believe that I am going to move this project question over to the GPGPU.org forums. If it is going to be a from scratch write, it would probably be better to harness the gpu specific knowledge over there.

Anyone interested is VERY welcome to attend!

Chris

eugene March 11, 2008 12:30

GPL does not infect downstream
 
GPL does not infect downstream, i.e. linking OpenFOAM to a closed source library does not make that library GPL. Thus using the ATI/AMD SDK to write a proprietary closed-source plug-in solver library to run OpenFOAM on graphics hardware would not violate the GPL as long as:
1) the library did not link to OpenFOAM components
2) does not re-use OpenFOAM code.

You could imagine how mad Nvidia/AMD would be to learn there proprietary graphics drivers have unilaterally been declared Open Source because GPL Linux desktop components link to them!

That said, I don't think graphics hardware will be very good at running OpenFOAM. The architecture is all wrong - too little memory and too many processing units for the available bandwidth. So a re-write from scratch using an approach better suited to graphics hardware is probably the best idea.

Good luck.

alberto March 11, 2008 12:34

Hello Chris, to clarify what
 
Hello Chris,
to clarify what I said, the GPL is not preventing you from doing what you want. It is exactly what nVidia and ATI do with their not open source drivers.

You can write the application and provide the user the source code, which can of course use a proprietary toolkit inside. And you can also charge the user to provide the source code. This is perfectly allowed by the GPL.

What is important is that you don't distribute the _linked_binaries_, and let the user compile the software by himself. Noone prevents you from providing an automatic tool that does this task.

You can't also forbid who got the source code to modify and redistribute it.

I hope this helps.

With kind regards,
Alberto

alberto March 11, 2008 12:37

Forgot to say, AMD/ATI is open
 
Forgot to say, AMD/ATI is opening up its graphical drivers and seems interested in open source development (see cooperation with Novell for the drivers, for example).

Probably if the demand of opening the toolkit is big enough, they could consider opening the toolkit too, which would solve all the doubts :-)

Keep us informed. It's an interesting idea.

With kind regards,
Alberto

guillaume March 11, 2008 16:11

That is a funny way to discuss
 
That is a funny way to discuss copyleft. Basically you are saying that we are allowed to develop libraries although they could be linked against GPL'd code. I think this was not the point.

However, it is still not in agreement with GPL if you build a proprietary library which can *only* be used when linked to GPL'd code. Before we continue discussing how we like or don't like to interprete the license terms, Chris should read them at http://www.gnu.org/copyleft/gpl.html and especially the paragraph

(begin quote)
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
(end quote)

Guillaume

mbeaudoin March 11, 2008 17:37

Hello, Eugene and Alberto a
 
Hello,

Eugene and Alberto are both right, of course:

See here : http://www.gnu.org/licenses/gpl-faq.html#GPLPluginsInNF

And also here : http://www.gnu.org/licenses/gpl-faq....PLCommercially

And to the best of my knowledge, Intel is selling very nice libraries for Linux. Nowhere does it said I cannot link with GPL code. And doing so will not GPLed those commercial libraries.

The GPL license is all about "distributing" code.

Martin

guillaume March 11, 2008 18:25

Of course they are right that
 
Of course they are right that they may write libraries which may be linked against OpenFOAM. This is what I expressed in the first sentence of my previous post.

But they may not distribute libraries including installation scripts or guides under a GPL incompatible license, if they are built for the single purpose to be linked against OpenFOAM.

>See here :
>http://www.gnu.org/licenses/gpl-faq.html#GPLPluginsInNF

Have you even followed that link? That FAQ entry discusses more or less the opposite of what Chris plans.

I wish him good luck, or better the wisdom to read and understand one page of terms he will depend on. Further discussion in this forum seems to lead nowhere.

Bye
Guillaume

alberto March 11, 2008 19:23

Hello, At the moment OpenFO
 
Hello,

At the moment OpenFOAM is released under GPL 2: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

Under the same licence Linus Torvalds distributes the Linux kernel, and the use case proposed here is identical to those of accelerated video drivers (they need the kernel sources to create the module and they link it against proprietary code). What you can't do (even though some ditributions like ubuntu are doing that all the time), is to distribute the binary form of the module.

The only problem I see here originates when you want to distribute compiled/linked forms of the ported version of OpenFOAM/CrossFire or if you don't want to open the source code (you'd violate GPL), which would be at least unfair in all the cases.

There are two useful FAQ's here:

http://www.gnu.org/licenses/gpl-faq....oneyGuzzlerInc
http://www.gnu.org/licenses/gpl-faq....olledInterface

With kind regards,
Alberto

deepsterblue March 11, 2008 20:35

My belief is - Why rely on nVi
 
My belief is - Why rely on nVidia/ATI proprietary software in the first place?
Use OpenGL - it's open-source and free. No legalese to deal with either.
I guess nVidia/ATI are good with the hardware aspect of things, but they don't comprehend the requirements of CFD too well. It's only fortunate that graphics applications have vector-processing requirements that are similar to CFD, but it's all just a random-access memory-bandwidth issue.

mbeaudoin March 12, 2008 02:59

Hi, >Have you even followed t
 
Hi,
>Have you even followed that link? That FAQ entry discusses more or less the opposite of what Chris plans.

Which was exactly the point I wanted to make...

> Further discussion in this forum seems to lead nowhere.

On the contrary, I think the discussion rapidly converged to the right conclusions, thanks to the contribution of many persons, yours included...

Cheers.

Martin

alberto March 12, 2008 10:24

I agree with Sandeep about Ope
 
I agree with Sandeep about OpenGL. It's a well known platform, with a lot of documentation, and its choice could attract a lot more interested people from the community.

Regards,
Alberto


All times are GMT -4. The time now is 08:28.