Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

OpenMP and ways to integrate it with .net 4.5

Abhishek81
Novice
1,175 Views

@Patrick The article for OpenMP was published.

0 Kudos
12 Replies
Abhishek81
Novice
1,175 Views
i came across an article at Code Project(implementation with C Sharp) where they have mentioned a way to implement parallel programming(multi threading interface) similar to OpenMp using anonymous delegates and using statements.is it the only way by which we can implement OpenMP style multithreading or we can use WinRT(Implementation with C Sharp) to get the same results.Or we can use the API directly to get access to C++ library(adding references...) Thanks...
0 Kudos
Abhishek81
Novice
1,175 Views
Patrick,Can we use Delegates in C Sharp to implement OpenMP?
0 Kudos
TimP
Honored Contributor III
1,175 Views
If I understand your question, I don't know why you ask on an Intel forum. C# provides for "unmanaged" native code generated by a C++ compiler, which could include OpenMP or Cilk+. As this hasn't gained much popularity on IA platforms, I wouldn't bet on anyone supporting it for the RT target. Anyway, as a major purpose of the Intel software tools is to enhance the advantage of IA platforms, I can't see RT support happening here.
0 Kudos
SergeyKostrov
Valued Contributor II
1,175 Views
>>...Or we can use the API directly to get access to C++ library... Could you specify more clearly: What API do you mean and which C++ library do you want to use?
0 Kudos
Abhishek81
Novice
1,175 Views
@Sergey I am willing to make an App for Ultrabook and I am fond of C # and I came across that OpenMP have released a version 4.0.Now i am willing to use it making Desktop App that showcases the Multithreading usages as well as perform some simple microinstructions in a simple manner.Can anybody put an Insight how to use OpenMP(will it require some encapsulation).i am trying to use the OpenMP API as WinRT APIs are included.I am willing to experiment.Thanks for your reply.
0 Kudos
SergeyKostrov
Valued Contributor II
1,175 Views
Hi, Thanks for the explanations. >>...Can anybody put an Insight how to use OpenMP(will it require some encapsulation).i am trying to use the OpenMP API as >>WinRT APIs are included.I am willing to experiment. I have a very limited experience with .NET and I think you need to implement: - a pure C/C++ DLL that exposes some API, or - a COM object as a DLL or Exe, or an ActiveX control as a DLL, that expose some COM-interface(s) that uses some OpenMP functionality and then the component has to be used in a .NET application. There are NO any limitations here and you really need to try to implement some of these solutions. Best regards, Sergey
0 Kudos
SergeyKostrov
Valued Contributor II
1,175 Views
>>...Can we use Delegates in C Sharp to implement OpenMP? Yes and you need to follow MSDN recommendations. Please take a look at: C++ Language Reference 'How to: Define and Use Delegates'
0 Kudos
Abhishek81
Novice
1,175 Views
@Sergey:- I am trying different ways and i gues Cilk++ is the best solution now.Using the DLL and invoking either by P Invoke or including the dll in the form may work.I am experimenting soon i will post if i get a better solution.Any ways Thanks for your prompt reply.
0 Kudos
SergeyKostrov
Valued Contributor II
1,175 Views
>>...I am trying different ways and i gues Cilk++ is the best solution now... That looks very interesting. I know that some companies are very surprized when they see very unusual ways of integration of their APIs, COM objects, etc. Please take into account that OpenMP library implemented by Microsoft has some limitations and I post some details later.
0 Kudos
Abhishek81
Novice
1,175 Views
@Sergev Yes I am trying.Today i got an error while some experimentation,I tried using Cilk++ with Visual Studio 2010 ,while changing the *.CS file extension to *.CILK it doesnot work. I will try different ways and will update as soon i get anything positive.
0 Kudos
SergeyKostrov
Valued Contributor II
1,175 Views
>>...Please take into account that OpenMP library implemented by Microsoft has some limitations and I post some details later. Forum topic: Couldn't create more than 64 OpenMP threads in a test application Web-link: http://software.intel.com/en-us/forums/topic/279487 Forum topic: Relationship between number of threads in OpenMP application and memory used Web-link: http://software.intel.com/en-us/forums/topic/279381 Forum topic: Is it possible to change a default priority of an OpenMP thread? Web-link: http://software.intel.com/en-us/forums/topic/279844
0 Kudos
SergeyKostrov
Valued Contributor II
1,175 Views
>>...Please take into account that OpenMP library implemented by Microsoft has some limitations... If you really want to push hard OpenMP you will need to use Intel OpenMP libraries ( included with many Intel software products, like Intel C++ compiler, Intel IPP library, Intel MKL, etc ). Take a look, please: Forum topic: Stress testing of Intel OpenMP library - More than 18,600 OpenMP threads created in a parallel region Web-link: http://software.intel.com/en-us/forums/topic/278302 Forum topic: Couldn't create more than 981 OpenMP threads with Intel(R) C++ Composer XE 12 Update 9 - RESOLVED - more than 18,607 threads created Web-link: http://software.intel.com/en-us/forums/topic/278385 PS: Related posts for review: http://software.intel.com/en-us/forums/showthread.php?t=105009&o=a&s=lr http://software.intel.com/en-us/forums/showthread.php?t=103375&o=a&s=lr http://software.intel.com/en-us/forums/showthread.php?t=104247&o=a&s=lr
0 Kudos
Reply