Skip to content

Commit bd7ea32

Browse files
Merge pull request #72 from totorotoby/main
added -l option for sourcing bashrc on andes when running a batch script
2 parents 9e46ebd + b2ce7bd commit bd7ea32

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/m/classes/clusters/andes.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function BuildQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrin
9797

9898
%write queuing script
9999
fid=fopen([modelname '.queue'],'w');
100-
fprintf(fid,'#!/bin/bash\n');
100+
fprintf(fid,'#!/bin/bash -l\n');
101101
fprintf(fid,'#SBATCH --job-name=%s\n',modelname);
102102
fprintf(fid,'#SBATCH --account=ice\n'); %Make sure we use the ICE account for this run
103103
fprintf(fid,'#SBATCH -o %s.outlog \n',modelname);
@@ -111,9 +111,6 @@ function BuildQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrin
111111
fprintf(fid,'#SBATCH --mail-user=%s@%s\n',cluster.login, cluster.email_domain);
112112
end
113113
fprintf(fid,'\n');
114-
fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath);
115-
fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');
116-
fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname);
117114
fprintf(fid,'mpirun -n %i %s/issm.exe %s %s %s\n',cluster.nprocs(), cluster.codepath,solution,[cluster.executionpath '/' dirname],modelname);
118115
if ~io_gather, %concatenate the output files:
119116
fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);

0 commit comments

Comments
 (0)