Skip to content

meminfo bug: AA no longer supports non-bash shells #191

Description

@jooh

I have been getting a few user complaints like the below:

Error in aas_shell (line 45)

    aas_log([],stopforerrors,sprintf('***WITH ENVIRONMENT VARIABLES\n%s',wenv));

 

Error in meminfo (line 103)

                [junk, out] = aas_shell('ulimit -m',true); out = deblank(out);

 

Error in aas_convertseries_fromstream (line 80)

    memLimit = meminfo; memLimit = memLimit.ResFree;

 

Error in aamod_convert_structural (line 28)

        [aap, convertedfns, dcmhdr] = aas_convertseries_fromstream(aap, subjInd, inStream);

This happens because ulimit is sh-family, not csh, so it's not available on our standard CBU shells. The meminfo function appears to have been refactored under the assumption that this function is always available.

A possible workaround for now is to set aap.directory_conventions.linuxshell = 'bash'. But reading the code I can see that there are ulimit calls that use system directly rather than the aas_shell wrapper in the ismac block. So I suspect this workaround wouldn't work if you are weird enough to use CSH on a mac...

At a higher level, the complexity we introduce by supporting different options for linuxshell, fslshell, freesurfershell AND also using the odd direct system call should not be underestimated. It might be useful to consider simplifying this by a) simply using bash throughout in AA, b) using whatever the user's $SHELL is set to, and making a best effort to run all our tests twice in the future: once after starting matlab from CSH, and once after starting matlab from Bash.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions