Skip to Content.
Sympa Menu

charm - [charm] Unrecognized PUP::able::PUP_ID

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Unrecognized PUP::able::PUP_ID


Chronological Thread 
  • From: Nels John Frazier <nfrazie1 AT uwyo.edu>
  • To: "charm AT cs.illinois.edu" <charm AT cs.illinois.edu>
  • Subject: [charm] Unrecognized PUP::able::PUP_ID
  • Date: Fri, 4 Mar 2016 20:37:25 +0000
  • Accept-language: en-US
  • Authentication-results: cs.illinois.edu; dkim=none (message not signed) header.d=none;cs.illinois.edu; dmarc=none action=none header.from=uwyo.edu;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:23

Hi,


Following the charm documentation, I created a set of migratable sub classes.  However, when I run a small test program, I get 


------------- Processor 1 Exiting: Called CmiAbort ------------
Reason: Unrecognized PUP::able::PUP_ID. is there an unregistered module?


My classes looks something like this

//FILE 1

#include "B.h"

#include "A.decl.h"


class A : public B

{

    private:

    static double moreData[3];

    public:

    int a = 0;

    double data = "1;

   

    A():B(a)

    {


    }


    PUPable_decl(A);
    A(CkMigrateMessage* m) : B(m) {}
    virtual void pup(PUP::er &p)
    {
        B::pup(p);
        if(p.isUnpacking()) CkPrintf("Unpacking A\n");
        else CkPrintf("Packing A\n");
        p|data;
        p(moreData, 3);
        if(p.isUnpacking())
        {
            CkPrintf("Unpacked stuff %f\n", a);
            CkPrintf("Array value: %f\n", moreData[2]);
        }
    }

};

double A::moreData[3] = {0,1,2}

#include "A.def.h"


//FILE 2

#include "pup.h"

#include "B.decl.h"

class B: public PUP::able

{

    public:

        int a;

        B(int a_):a(a_){};

        B(){};

        virtual ~B(){};


        PUPable_decl(B);

        B(CkMigrateMessage* m) : PUP::able(m){};

        vitrual void pup(PUP::er& p)

        {

            if(p.isUnpacking()) CkPrintf("Unpacking B\n");
            else CkPrintf("Packing B\n");
            PUP::able::pup(p);
            p|a;
            if(p.isUnpacking()) CkPrintf("Unpacked %ld\n",a);
        }        

};

#include "B.def.h"



The generated decl and def files:


A.decl.h

#ifndef _DECL_A_H_
#define _DECL_A_H_
#include "charm++.h"
#include "envelope.h"
#include <memory>
#include "sdag.h"

extern void _registerrA(void);
#endif 

A.def.h
#ifndef CK_TEMPLATES_ONLY
  PUPable_def(A)
#endif /* CK_TEMPLATES_ONLY */

#ifndef CK_TEMPLATES_ONLY
void _registerA(void)
{
  static int _done = 0; if(_done) return; _done = 1;
      PUPable_reg(A);

}
#endif /* CK_TEMPLATES_ONLY */



B.decl.h
#ifndef _DECL_B_H_
#define _DECL_B_H_
#include "charm++.h"
#include "envelope.h"
#include <memory>
#include "sdag.h"

extern void _registerB(void);
#endif 

B.def.h
#ifndef CK_TEMPLATES_ONLY
  PUPable_def(B)
#endif /* CK_TEMPLATES_ONLY */

#ifndef CK_TEMPLATES_ONLY
void _registerB(void)
{
  static int _done = 0; if(_done) return; _done = 1;
      PUPable_reg(B);

}
#endif /* CK_TEMPLATES_ONLY */

My A.ci file looks like this

module A
{
    PUPable A;
}

B.ci
module B
{
    PUPable B;
}

Simple compile:

charmc A.ci
charmc B.ci


Long story short, I have a small sample file to test migrating my A objects, and I get the indicated error.  I found a workaround, which is manually registering the module in A's constructor:

A():B(a)

{

        _registerA(); 

}



Is this a bug in charm or am I not doing this properly?

Thanks,

Nels Frazier




Archive powered by MHonArc 2.6.16.

Top of Page