Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3400794
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:56:12+00:00 2026-05-18T04:56:12+00:00

I’m trying to parallelize an algorithm using PVM for a University assignment. I’ve got

  • 0

I’m trying to parallelize an algorithm using PVM for a University assignment. I’ve got the algorithm sorted, but parallelization only almost works – the process intermittently gets stuck for no apparent reason. I can see no pattern, a run with the same parameters might work 10 times and then just gets stuck on the next effort…

None of the pvm functions (in the master or any child process) are returning any error codes, the children seem to complete successfully, no errors are reaching the console. It really does just look like the master isn’t receiving every communication from the children – but only on occasional runs.

Oddly, though, I don’t think it’s just skipping a message – I’ve yet to have a result missing from a child that then successfully sent over a complete signal (that is to say I’ve not had a run reach completion and return an unexpected result) – it’s as though the child just becomes disconnected, and all messages from a certain point cease arriving.

Batching the results up and sending less, but larger, messages seems to improve reliability, at least it feels like it’s sticking less often – I don’t have hard numbers to back this up…

Is it normal, common or expected that PVM will lose messages sent via pvm_send and it’s friends? Please note the error occurs if all processes run on a single host or multiple hosts.

Am I doing something wrong? Is there something I can do to help prevent this?

Update

I’ve reproduced the error on a very simple test case, code below, which just spawns four children sends a single number to each, each child multiplies the number it receives by five and sends it back. It works almost all the time, but occasionally we freeze with only three numbers printed out – with one child’s result missing (and said child will have completed).

Master:

int main()
{
    pvm_start_pvmd( 0 , NULL , 0 );

    int taskIDs[global::taskCount];
    pvm_spawn( "/path/to/pvmtest/child" , NULL , 0 , NULL , global::taskCount , taskIDs );

    int numbers[constant::taskCount] = { 5 , 10 , 15 , 20 };
    for( int i=0 ; i<constant::taskCount ; ++i )
    {
        pvm_initsend( 0 );
        pvm_pkint( &numbers[i] , 1 , 1 );
        pvm_send( taskIDs[i] , 0 );
    }

    int received;
    for( int i=0 ; i<global::taskCount ; ++i )
    {
        pvm_recv( -1 , -1 );
        pvm_upkint( &received , 1 , 1 );
        std::cout << recieved << std::endl;
    }

    pvm_halt();
}

Child:

int main()
{
    int number;

    pvm_recv( -1 , -1 );
    pvm_upkint( &number , 1 , 1 );

    number *= 10;

    pvm_initsend( 0 );
    pvm_pkint( &number , 1 , 1 );
    pvm_send( pvm_parent() , 0 );
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:56:12+00:00Added an answer on May 18, 2026 at 4:56 am

    Not really an answer, but two things have changed together and the problem seems to have subsided:

    1. I added pvm_exit() a call to the end of the slave binary, which apparently is best to do.

    2. The configuration of PVM over the cluster changed … somehow … I don’t have any specifics, but a few nodes were previously unable to take part in PVM operations and can now can. Other things may have changed as well.

    I suspect something within the second changed also happened to fix my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.