Tools/frameworks for Java multi-core programming?

Discussion in 'Java' started by anthonycwmak, Aug 16, 2012.

  1. anthonycwmak

    anthonycwmak Guest

    From: "anthonycwmak" <anthonycwmak@1:261/38.remove-73m-this>

    From: "anthonycwmak" <anthonycwmak@1:261/38.remove-z1z-this>

    From: "anthonycwmak" <anthonycwmak@1:261/38.remove-fcj-this>

    From:

    I am trying to find tools/frameworks that help with writing Java program that
    can utilize multi-core CPU. So far I only found jconcurr, JOMP, JAMP, Ateji,
    but they all either requires special shell command to compile and run the
    programs, or, in Ateji's case use a special file extension which is converted
    to java file. This doesn't seem to be ideal if I require to build multi-core
    programs that can be built on Maven or similar, and requires them to run on an
    enterprise environment or application server.

    Besides writing concurrent programs, by using Java Concurrency API directly, to
    utilize the multi-core, are there other easier/simpler way to create Java
    enterprise applications that utlize multi-core CPUs? Preferably, just annotate
    my POJOs to make them multi-core capable?

    Kind Regards,
    Anthony Mak

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    anthonycwmak, Aug 16, 2012
    #1
    1. Advertising

  2. To: anthonycwmak
    From: "mr amitghuge1" <mr.amitghuge1@1:261/38.remove-73m-this>

    To: anthonycwmak
    From: "mr amitghuge1" <mr.amitghuge1@1:261/38.remove-z1z-this>

    To: anthonycwmak
    From: "mr amitghuge1" <mr.amitghuge1@1:261/38.remove-fcj-this>

    To: anthonycwmak
    From:

    http://tutorialswithexamples.com/category/java-tutorials/java-logging-apis/


    On Tuesday, August 14, 2012 11:18:10 AM UTC+5:30, wrote:
    > I am trying to find tools/frameworks that help with writing Java program that

    can utilize multi-core CPU. So far I only found jconcurr, JOMP, JAMP, Ateji,
    but they all either requires special shell command to compile and run the
    programs, or, in Ateji's case use a special file extension which is converted
    to java file. This doesn't seem to be ideal if I require to build multi-core
    programs that can be built on Maven or similar, and requires them to run on an
    enterprise environment or application server.
    >
    >
    >
    > Besides writing concurrent programs, by using Java Concurrency API directly,

    to utilize the multi-core, are there other easier/simpler way to create Java
    enterprise applications that utlize multi-core CPUs? Preferably, just annotate
    my POJOs to make them multi-core capable?
    >
    >
    >
    > Kind Regards,
    >
    > Anthony Mak


    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    mr amitghuge1, Aug 16, 2012
    #2
    1. Advertising

  3. To: anthonycwmak
    From: "Robert Klemme" <robert.klemme@1:261/38.remove-s96-this>

    To: anthonycwmak
    From: "Robert Klemme" <robert.klemme@1:261/38.remove-73m-this>

    To: anthonycwmak
    From: "Robert Klemme" <robert.klemme@1:261/38.remove-z1z-this>

    To: anthonycwmak
    From: Robert Klemme <>

    On 14.08.2012 07:48, wrote:
    > I am trying to find tools/frameworks that help with writing Java
    > program that can utilize multi-core CPU. So far I only found
    > jconcurr, JOMP, JAMP, Ateji, but they all either requires special
    > shell command to compile and run the programs, or, in Ateji's case
    > use a special file extension which is converted to java file. This
    > doesn't seem to be ideal if I require to build multi-core programs
    > that can be built on Maven or similar,


    Why is that an issue? Typically you can include custom build procedures in a
    build tool / framework.

    > and requires them to run on an
    > enterprise environment or application server.


    If you are on an JEE application server that will usually take care of the
    concurrency. You typically need to use those APIs the JEE spec or AS at hand
    provides to not interfere with the framework in bad ways (e.g. by breaking
    transactions). That does not seem like a bad option although AS come with
    their own learning curve.

    > Besides writing concurrent programs, by using Java Concurrency API
    > directly, to utilize the multi-core, are there other easier/simpler
    > way to create Java enterprise applications that utlize multi-core
    > CPUs? Preferably, just annotate my POJOs to make them multi-core
    > capable?


    "Making a POJO multi-core capable" is meaningless. Using concurrency is more
    like an architectural property of your application (even though you need to
    take care to use POJOs properly - but it's not enough to make POJOs thread
    safe). At this point I am suspecting that someone told you modern Java
    programs must use multiple cores and you want to get it done easily.
    Unfortunately that won't work: you need to understand the particular issues
    associated with concurrency to properly craft such applications - even if you
    use a framework that takes away a large part of the work from you.

    Kind regards

    robert

    --
    remember.guy do |as, often| as.you_can - without end
    http://blog.rubybestpractices.com/

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    Robert Klemme, Aug 17, 2012
    #3
  4. anthonycwmak

    Lew Guest

    To: Robert Klemme
    From: "Lew" <lew@1:261/38.remove-s96-this>

    To: Robert Klemme
    From: "Lew" <lew@1:261/38.remove-73m-this>

    To: Robert Klemme
    From: "Lew" <lew@1:261/38.remove-z1z-this>

    To: Robert Klemme
    From: Lew <>

    Robert Klemme wrote:
    > anthonycwmak wrote:
    >> I am trying to find tools/frameworks that help with writing Java
    >> program that can utilize multi-core CPU. So far I only found


    Java programs can "utilize" multi-core CPUs out of the box. You need do nothing
    special.

    >> jconcurr, JOMP, JAMP, Ateji, but they all either requires special
    >> shell command to compile and run the programs, or, in Ateji's case
    >> use a special file extension which is converted to java file. This
    >> doesn't seem to be ideal if I require to build multi-core programs
    >> that can be built on Maven or similar,


    > Why is that an issue? Typically you can include custom build procedures
    > in a build tool / framework.


    >> and requires them to run on an
    >> enterprise environment or application server.


    > If you are on an JEE application server that will usually take care of
    > the concurrency. You typically need to use those APIs the JEE spec or
    > AS at hand provides to not interfere with the framework in bad ways
    > (e.g. by breaking transactions). That does not seem like a bad option
    > although AS come with their own learning curve.


    >> Besides writing concurrent programs, by using Java Concurrency API
    >> directly, to utilize the multi-core, are there other easier/simpler
    >> way to create Java enterprise applications that utlize multi-core
    >> CPUs? Preferably, just annotate my POJOs to make them multi-core
    >> capable?


    > "Making a POJO multi-core capable" is meaningless. Using concurrency is
    > more like an architectural property of your application (even though you
    > need to take care to use POJOs properly - but it's not enough to make
    > POJOs thread safe). At this point I am suspecting that someone told you
    > modern Java programs must use multiple cores and you want to get it done
    > easily. Unfortunately that won't work: you need to understand the
    > particular issues associated with concurrency to properly craft such
    > applications - even if you use a framework that takes away a large part
    > of the work from you.


    As Robert said, if you're writing enterprise apps using Java EE, then the
    threading is already done. You should pretty much never explicitly code a Java
    EE component to spawn a thread.

    Java SE is another matter. You do have to use thread calls to spawn threads.
    Once you have at least two threads in a program (and all Java programs do),
    then you are multi-core capable.

    Java programs that use threads are already multi-core capable.

    Boom, done.

    What are you really after?

    --
    Lew

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    Lew, Aug 17, 2012
    #4
  5. anthonycwmak

    anthonycwmak Guest

    To: Robert Klemme
    From: "anthonycwmak" <anthonycwmak@1:261/38.remove-rj6-this>

    To: Robert Klemme
    From: "anthonycwmak" <anthonycwmak@1:261/38.remove-4g4-this>

    To: Robert Klemme
    From: "anthonycwmak" <anthonycwmak@1:261/38.remove-s96-this>

    To: Robert Klemme
    From:

    hi Robert, Lew,

    Thanks you guys for reminding me about not to spawn threads on JEE applications
    directly. I should look into perhaps using EJB Timer and other ways to
    implement concurrency properly in enterprise app.

    I am interested Loop Parallelization (and Tash Parallelization, Pipeline
    Paralleization etc) as supported by tools such as jconqurr etc. Which could be
    useful for scientific applications and matrix operations. (I looked into divide
    and conquer approaches like MapReduce as well.) But I like the idea like
    jconqurr and other tools, that I can implement parallelization with just code
    annotations. At least in those simple case that locking and consistency is not
    a problem. Thanks for pointing out I can make custom building procedure with a
    build tool, just that if the parallelization tool/frameworks don't require
    command line building it is preferable to me.

    I am interested in multi-core programming because a while ago there have been
    some buzz about how to utilize multi-core or even GPU for example for
    scientific applications. And, I was wondering how to do that in Java. :) Just
    curious.

    Anthony

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    anthonycwmak, Aug 18, 2012
    #5
  6. anthonycwmak

    markspace Guest

    To: anthonycwmak
    From: "markspace" <markspace@1:261/38.remove-rj6-this>

    To: anthonycwmak
    From: "markspace" <markspace@1:261/38.remove-4g4-this>

    To: anthonycwmak
    From: "markspace" <markspace@1:261/38.remove-s96-this>

    To: anthonycwmak
    From: markspace <-@.>

    On 8/15/2012 6:50 PM, wrote:

    >
    > I am interested in multi-core programming because a while ago there
    > have been some buzz about how to utilize multi-core or even GPU for
    > example for scientific applications. And, I was wondering how to do
    > that in Java. :) Just curious.



    Introduction here:

    <http://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html>

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    -+- BBBS/Li6 v4.10 Dada-1
    + Origin: Prism bbs (1:261/38)
    -+- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    markspace, Aug 18, 2012
    #6
  7. anthonycwmak

    jlp Guest

    Le 18/08/2012 21:37, markspace a écrit :
    > To: anthonycwmak
    > From: "markspace" <markspace@1:261/38.remove-rj6-this>
    >
    > To: anthonycwmak
    > From: "markspace" <markspace@1:261/38.remove-4g4-this>
    >
    > To: anthonycwmak
    > From: "markspace" <markspace@1:261/38.remove-s96-this>
    >
    > To: anthonycwmak
    > From: markspace <-@.>
    >
    > On 8/15/2012 6:50 PM, wrote:
    >
    >>
    >> I am interested in multi-core programming because a while ago there
    >> have been some buzz about how to utilize multi-core or even GPU for
    >> example for scientific applications. And, I was wondering how to do
    >> that in Java. :) Just curious.

    >
    >
    > Introduction here:
    >
    > <http://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html>
    >
    > -+- BBBS/Li6 v4.10 Dada-1
    > + Origin: Prism bbs (1:261/38)
    > -+- Synchronet 3.16a-Win32 NewsLink 1.98
    > Time Warp of the Future BBS - telnet://time.synchro.net:24
    >
    > -+- BBBS/Li6 v4.10 Dada-1
    > + Origin: Prism bbs (1:261/38)
    > -+- Synchronet 3.16a-Win32 NewsLink 1.98
    > Time Warp of the Future BBS - telnet://time.synchro.net:24
    >
    > -+- BBBS/Li6 v4.10 Dada-1
    > + Origin: Prism bbs (1:261/38)
    > -+- Synchronet 3.16a-Win32 NewsLink 1.98
    > Time Warp of the Future BBS - telnet://time.synchro.net:24
    >
    > --- BBBS/Li6 v4.10 Dada-1
    > * Origin: Prism bbs (1:261/38)
    > --- Synchronet 3.16a-Win32 NewsLink 1.98
    > Time Warp of the Future BBS - telnet://time.synchro.net:24
    >


    see also akka Actors(Scala) that runs also with Java ( there is a
    JavaDoc API). It uses the forkjoin pattern pointed by markspace
    --
    Cordialement
    Jean-Louis Pasturel
    jlp, Aug 24, 2012
    #7
  8. In article <5037c2e9$0$6209$>,
    jlp <> wrote:

    > Le 18/08/2012 21:37, markspace a écrit :
    > > To: anthonycwmak

    [...]
    > > On 8/15/2012 6:50 PM, wrote:
    > >>
    > >> I am interested in multi-core programming because a while ago
    > >> there have been some buzz about how to utilize multi-core or even
    > >> GPU for example for scientific applications. And, I was wondering
    > >> how to do that in Java. :) Just curious.

    > >
    > > Introduction here:
    > >
    > > <http://docs.oracle.com/javase/tutorial/essential/concurrency/forkjoin.html>

    [...]

    > see also akka Actors(Scala) that runs also with Java (there is a
    > JavaDoc API). It uses the forkjoin pattern pointed by markspace


    Please do not propagate synkro.noise [sic], as it may cause your post to
    be filtered unexpectedly.

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
    John B. Matthews, Aug 25, 2012
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    15
    Views:
    646
    Martin Gregorie
    Aug 20, 2012
  2. anthonycwmak
    Replies:
    9
    Views:
    325
  3. anthonycwmak
    Replies:
    5
    Views:
    285
    markspace
    Aug 17, 2012
  4. anthonycwmak
    Replies:
    5
    Views:
    266
    markspace
    Aug 18, 2012
  5. anthonycwmak
    Replies:
    1
    Views:
    267
    Arne Vajhøj
    Aug 18, 2012
Loading...

Share This Page