The brand-new PN400 Phase Noise Test System is available for purchase! →

Meaning of smAllocationErr

Forums › SM Series Discussions › Meaning of smAllocationErr

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #240914
    jmatusiak
    Participant

    While playing with the SM200C sweep parameter values, I am trying to learn how to make sure that I can keep a user from doing something stupid.

    I was randomly jamming in values and trying to make things break and was able to consistently do it with the following parameters:
    start freq: 2.3GHz
    stop freq: 2.7GHz
    rbw/vbw: 200kHz
    period 100ms

    When I attempted to kick things off, I get an error of -13 (smAllocationErr). I guess I am confused as why that would be. I can go from 900kHz – 6GHz with 100kHz rbw/vbw with no issues.

    So why is the above setup an “allocation” problem? In my mind I assumed that that meant the SH couldn’t gather enough resources, but that setup should be orders of magnitude easier. I can only imagine that I am misinterpreting something, but the API documents don’t go into a lot of detail for what the error means or for limits that I might be hitting with my params.

    If I change the rbw to 100kHz, it works fine (which should take twice as much resources, hence why I am guessing I don’t understand the error).

    • This topic was modified 4 years, 6 months ago by jmatusiak.
    #240916
    AndrewAndrew
    Moderator

    The allocation error indicates we failed to allocate memory at some point during the configuration. Usually the result of malloc failing. You can see this more often when using the 32-bit version of the API since memory allocation limit is lower.

    Is it possible you were passing 200Hz instead of 200kHz as the RBW, or something similar?

    Are you using the 32-bit API? If yes, is it possible your own allocated memory was high enough that our API couldn’t stay within the 32-bit limitations?

    That being said, its certainly possible this is a bug and a specific combination of settings produces this error code. If you can provide a simple code example that reproduces the problem including information about your OS and what API version you are using, I can try to reproduce it. I was unable to reproduce the issue just based on the information you provided.

    Andrew

    • This reply was modified 4 years, 6 months ago by AndrewAndrew.
    #240918
    jmatusiak
    Participant

    (deleted)

    • This reply was modified 4 years, 6 months ago by jmatusiak.
    • This reply was modified 4 years, 6 months ago by jmatusiak.
    #240921
    jmatusiak
    Participant

    OK, I think I see my issue. When I initialized my device, I was setting the vbw to be what the rbw was. I then changed the rbw and kicked things off. The vbw wasn’t getting updated, so when I set the SweepCoupling to use the new rbw (200kHz now), but had the old vbw (100kHz), it caused the allocation error.

    Dumb question, How do I know if I am using the 32b API or not? I haven’t seen this distinction anywhere.

    #240922
    AndrewAndrew
    Moderator

    Thanks for the update.

    You would have copied the 32-bit API from the x86 folder in our SDK. Also if your application is 32-bit, then you are using the 32-bit API.

    Andrew

    • This reply was modified 4 years, 6 months ago by AndrewAndrew.
    #240929
    jmatusiak
    Participant

    I see the confusion. I am working in Linux, it doesn’t look like you offer both 32-bit AND 64-bit. I think you only offer a 64-bit version, right?
    libsm_api.so.2.1.17: ELF 64-bit LSB shared object

    #240935
    AndrewAndrew
    Moderator

    That’s correct. We only offer 64-bit builds on Linux.

    • This reply was modified 4 years, 6 months ago by AndrewAndrew.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.