ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 20 Sep 2019 15:25:00 -0500Batch file and Sagehttp://ask.sagemath.org/question/47997/batch-file-and-sage/Hi,
I am using SLURM (https://slurm.schedmd.com/) to run a batch process on a cluster of computers. Here is the following .slrm file that I have:
#!/bin/bash
#SBATCH --time=1:59:00
#SBATCH --ntasks=1
#SBATCH --mem=3820
#SBATCH -O
#SBATCH --output=/data/scratch/kbari/slrmbt_%A_%a.out
#SBATCH --array=1-50
sage --nodotsage /data/scratch/kbari/slurmbatchtest.py $SLURM_ARRAY_TASK_ID
I get an error that: "Error: HOME directory '/u/grad/kbari' does not exist.
Error setting environment variables by sourcing '/usr/local/SageMath/src/bin/sage-env';
possibly contact sage-devel (see http://groups.google.com/group/sage-devel)."
I understand the error to be that it is trying to access sage from a different directory, which it does not have access to and cannot find as a result. So how can I change the environment variable to just tell it to run Sage not from that directory?
Thanks for your time!BarkFri, 20 Sep 2019 15:25:00 -0500http://ask.sagemath.org/question/47997/When would sage -sh not work?http://ask.sagemath.org/question/8290/when-would-sage-sh-not-work/When is `./sage -sh` NOT supposed to work? That is, where should this work in the spkg build process? My sense is that it should work almost immediately - even before Python, right? - but sometimes I get the message about it not working in the middle of a build I need to `./sage -sh` in to set environment variables correctly.
I should point out that currently I have a lot of stuff built - Python, Pari, GSL, ecl, elliptic curves - but when I do what the message says (edit `$SAGE_ROOT` in `./sage`) then I just get a message about `sage-sage` not existing in `local/bin`, which it is true, it does not.
An acceptable answer to this could include any *other* way to set the appropriate variables during a build.kcrismanWed, 24 Aug 2011 07:49:59 -0500http://ask.sagemath.org/question/8290/