[parsec-users] Cross Compiling Dedup for Alpha Arch using M5 Simulator

ef snorlaxgb at gmail.com
Sat Aug 1 14:55:46 EDT 2009


Hello,
OK, that error before was another bug in M5. M5 seems to have trouble
handling 2GB>= or more.

The bug fixes were fixed by Rick Strong here:

http://www.mail-archive.com/m5-users@m5sim.org/msg02357.html
http://www.mail-archive.com/m5-users@m5sim.org/msg02351.html

I have another memory allocation failure hours into simulation, I need to
look into it,  I think we need more than 2GB but I am having trouble
allocating more.



On Fri, Jul 31, 2009 at 6:12 PM, ef <snorlaxgb at gmail.com> wrote:

> Hello,
> Please excuse as I am new to this whole process and might be unable to
> answer your questions properly.
>
> In response to:
> a bug in the program or a bug in your build / run environment. How exactly
> did you create and run the binary?
>
> I am not sure exactly what you mean but I will try my best to answer this
> question:
> I used the parsecmgmt tool to build this binary, the only two flags that I
> added were -g and --static. I didn't remove any other flags or add any
> others. Right now I am trying to allocate 3GB or more, my inexperienced
> guess is that 2GB is not enough, however M5 is not cooperating that well.
>
> Thank you for your help!
> EF
>
>
> 2009/7/31 Christian Bienia <cbienia at cs.princeton.edu>
>
>>  Hi Ef,
>>
>>
>>
>> This is a bizarre error, it should never happen. It means that the
>> Compress stage was given the instruction to compress a data chunk that
>> doesn’t exist in the hash table. There’s either a bug in the program or a
>> bug in your build / run environment. How exactly did you create and run the
>> binary?
>>
>>
>>
>> The key that could not be found by the program was generated in the
>> function sub_ChunkProcess. Here’s the relevant code:
>>
>>
>>
>>   key = (u_char *)malloc(SHA1_LEN);
>>
>>   if(key == NULL) {
>>
>>     EXIT_TRACE("Memory allocation failed.\n");
>>
>>   }
>>
>>
>>
>> After that the hash table is checked to see whether this data chunk has
>> been seen before, and if not a new entry is created:
>>
>>
>>
>>   if ((entry = hashtable_search(cache, (void *)key)) == NULL) {
>>
>>     // cache miss: put it in the hashtable and the queue for the compress
>> thread
>>
>>     struct pContent * value;
>>
>>
>>
>>     value = (struct pContent *)malloc(sizeof(struct pContent));
>>
>>     if(value == NULL) {
>>
>>       EXIT_TRACE("Memory allocation failed.\n");
>>
>>     }
>>
>>     value->len = 0;
>>
>>     value->count = 1;
>>
>>     value->content = NULL;
>>
>>     value->tag = TAG_OCCUPY;
>>
>>     if (hashtable_insert(cache, key, value) == 0) {
>>
>>       EXIT_TRACE("hashtable_insert failed");
>>
>>     }
>>
>>   }
>>
>>
>>
>> At the end of this processing stage the items is inserted into the
>> compression queue, from where the compress stage will dequeue it and find
>> the item just created in the hash table (or not, as in your case). There
>> should ALWAYS be an entry.
>>
>>
>>
>> I cannot reproduce the error on my machines, and I’ve also never seen it
>> while working on the program. Are you certain that your environment is set
>> up correctly?
>>
>>
>>
>> - Chris
>>
>>
>>
>>
>>
>> *From:* parsec-users-bounces at lists.cs.princeton.edu [mailto:
>> parsec-users-bounces at lists.cs.princeton.edu] *On Behalf Of *ef
>> *Sent:* Thursday, July 30, 2009 8:25 PM
>> *To:* PARSEC Users
>> *Subject:* Re: [parsec-users] Cross Compiling Dedup for Alpha Arch using
>> M5 Simulator
>>
>>
>>
>> Here is where the code fails, under encoder.c
>>
>>
>>  if ((entry = hashtable_search(cache, (void *)key)) == NULL) {
>>         //if cannot find the entry, error
>>         printf("Error: Compress hash error\n");
>>         exit(1);
>>       }
>>
>> _______________________________________________
>> parsec-users mailing list
>> parsec-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20090801/be7d8579/attachment.html>


More information about the parsec-users mailing list