Allocation Error

Brandon Vincent
Brandon Vincent
Joined: 2 Jun 13
Posts: 11
Credit: 7343184
RAC: 0
Topic 197432

Hello,

I know very limited support is given for self-compiled applications, but can anyone provide some insight on the following error for BRP4?

Couldn't allocate 0 bytes of memory for sumspec at bottom level

Does anyone also know where I can find the latest source code for all the EAH applications?

http://albert.phys.uwm.edu/license.php looks out of date.

Thanks!

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6588
Credit: 312434766
RAC: 160994

Allocation Error

I'd try here instead which contains a link to this. On download and unzip, the timestamps are under six weeks old.

Now a ( directory recursive ) search of the files locates this :

// allocate memory for the harmonic summed spectra
    // in CUDA version, this includes the 1st harmonics
    // TODO : sumspec [0] has to be treated differently once the powerspectrum is left on device
    //        initially and only copied async. later
    for( i = 1; i < 5; i++)
    {
      sumspec = (float *) calloc(fundamental_idx_hi, sizeof(float));
      if(sumspec[i] == NULL)
      {
        logMessage(error, true, "Couldn't allocate %d bytes of memory for sumspec at bottom level.\n", fundamental_idx_hi*sizeof(float ));
        return(RADPUL_EMEM);
      }
    }

being lines 97 thru 109 of the file [i]demod_binary_cuda.cu within the /src/cuda/app/ directory.

I have no idea what that means at a glance, other than the obvious : the calloc() call failed and a NULL pointer was returned.

Cheers, Mike.

( edit ) Closer look :

- since sizeof(float) won't be zero then fundamental_idx_hi must be.

- fundamental_idx_hi is the 4th parameter ( an unsigned int ) to the set_up_harmonic_summing routine

- so why was that zero ?

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Brandon Vincent
Brandon Vincent
Joined: 2 Jun 13
Posts: 11
Credit: 7343184
RAC: 0

Thanks for your help

Thanks for your help Mike.

I figured this one out. I was trying to compile the BRP4 application on an big endian architecture (SPARC). The header files sent with the tasks is written for little endian systems.

After making a couple of changes to the source code, the application is no longer quitting immediately with the aforementioned error.

I should know in a day or so if I'm returning valid results.

Mike Hewson
Mike Hewson
Moderator
Joined: 1 Dec 05
Posts: 6588
Credit: 312434766
RAC: 160994

RE: ... big endian

Quote:
... big endian architecture ... header files ... little endian systems.

Yup, that would be an issue! :-)

Cheers, Mike.

I have made this letter longer than usual because I lack the time to make it shorter ...

... and my other CPU is a Ryzen 5950X :-) Blaise Pascal

Brandon Vincent
Brandon Vincent
Joined: 2 Jun 13
Posts: 11
Credit: 7343184
RAC: 0

Now I just need to find a

Now I just need to find a new(er) SPARC machine to run tasks on.

Apparently a 440 Mhz Ultrasparc IIi (circa late 90s) resulted in 62.50 granted credit after a run time of 97,933.95 seconds. Now where did I put that Raspberry Pi?

Bikeman (Heinz-Bernd Eggenstein)
Bikeman (Heinz-...
Moderator
Joined: 28 Aug 06
Posts: 3522
Credit: 714224872
RAC: 912102

RE: Now where did I put

Quote:
Now where did I put that Raspberry Pi?

Excellent comparision, a heavily overclocked Raspberry Pi should come very close to it. And a modern Android smartphone will dance circles around the Sun...

But I like vintage computers! Congratulations for the port to Sparc!

Cheers
HB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.