Java

General OpenMP discussion

Java

Postby ankit_mait_07 » Fri Jun 20, 2008 11:05 pm

Hi..
I am unable to understand what is the difference between threads in Java and OpenMp??

Regards
Ankit
ankit_mait_07
 
Posts: 14
Joined: Wed Jun 18, 2008 11:20 am

Re: Java

Postby ejd » Sat Jun 21, 2008 1:59 pm

I am not a Java expert, but I will try to give you an idea of the difference between the two. OpenMP is directive based and tries to extend older languages like C, C++, and Fortran so that parallel programming is possible. OpenMP implementations are usually built on top of pthreads. Java on the other hand, was designed with multithreading support built-in. Threads are supported both at the language level for Java (syntactically), and at the virtual machine and class library levels. In many ways Java threads are very similar to POSIX pthreads. Does that help??
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am

Re: Java

Postby ankit_mait_07 » Tue Jun 24, 2008 8:22 am

hi..
Does OMP offer any advantages over Java??

Regards
Ankit
ankit_mait_07
 
Posts: 14
Joined: Wed Jun 18, 2008 11:20 am

Re: Java

Postby ejd » Tue Jun 24, 2008 5:11 pm

The main advantage of OpenMP is that it can be used with C, C++, and Fortran. There was some work by several people at different universities to add OpenMP to Java - not that it was needed. I will see if I can find some information as to why they did it. Unfortunately I am not really a Java programmer, so it is hard for me to give an answer. Maybe someone else who has some expertise can answer the question.
ejd
 
Posts: 1025
Joined: Wed Jan 16, 2008 7:21 am


Return to Using OpenMP

Who is online

Users browsing this forum: Exabot [Bot] and 9 guests