JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   Forums 
August 24, 2019, 12:39:07 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: Same task being executed multiple times  (Read 26 times)

plenglin

  • JPPF Padawan
  • *
  • Posts: 5
Same task being executed multiple times
« on: August 10, 2019, 02:52:05 AM »

I'm making a simple grid processing app where I schedule a job that is composed of multiple tasks. I have confirmed by examining my logs that every task is being evaluated multiple times: once for every thread of every node. However, I expect that each task only ever gets evaluated once, instead of whatever this is. What could be the reason for this, and how can I change this? For reference, I am using JPPF 6.1.1.
« Last Edit: August 10, 2019, 02:54:38 AM by plenglin »
Logged

plenglin

  • JPPF Padawan
  • *
  • Posts: 5
Re: Same task being executed multiple times
« Reply #1 on: August 10, 2019, 04:31:19 AM »

I tried downgrading to 6.0.3, and the issue remains. Is there something I'm simply not understanding conceptually?
Logged

plenglin

  • JPPF Padawan
  • *
  • Posts: 5
Re: Same task being executed multiple times
« Reply #2 on: August 10, 2019, 10:42:35 PM »

I appear to have solved my problem by converting the system to use JPPFExecutorService and submitting Callables instead of submitting custom classes that extend AbstractTask.
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2255
    • JPPF Web site
Re: Same task being executed multiple times
« Reply #3 on: August 11, 2019, 07:35:09 AM »

Hello,

Thank you for sharing the workaround you have found.
However, there must something more going on, since behind the scene Callables are actually wrapped into a subclass of AbstractTask.
Would it be possible for you to post a code sample that reproduces the issue? For example  the code of a task, how you create and submit the job, and some information about your grid topology should allow us to reproduce as well and investigate on our side.

Thank you very much for your time,
-Laurent
Logged

plenglin

  • JPPF Padawan
  • *
  • Posts: 5
Re: Same task being executed multiple times
« Reply #4 on: August 11, 2019, 09:55:53 AM »

Unfortunately, I won't be able to provide you the code, since my codebase is a mess. I failed to reproduce the issue in a clean project, as well. I'm fairly certain I confirmed the bug was on JPPF's side via remote debugger, as well, but I could have missed something. I think I'll just blame my own incompetence  ;D

(For reference though, each job was to evaluate the fitnesses of 4000 chromosomes of a genetic algorithm. Each task processed 25 chromosomes at a time. The issue may have stemmed from the loop I wrote that grouped the chromosomes together. I only saw chromosomes logged once on the client side, but I saw them being logged multiple times on the node side. The driver seems to have gotten the right number of tasks, but the node seemed to have been repeatedly dispatching each task to itself. Still, I think it's my own code at fault here.)
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads