@@ -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