smc-compute script: factor out get_memory command and catch all errors
smc-compute script: factor out get_memory command and catch all errors

sagemathinc/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,DrXyzzy/smc,sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc