Skip to content

Commit

Permalink
Adding error to submit scripts if Data directory does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mkavulich committed Dec 16, 2016
1 parent 31b3367 commit 2cb7386
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bsub_this_to_run_all_compilers.csh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#BSUB -N

unsetenv MP_PE_AFFINITY

if ( ! -e Data ) then
echo "ERROR ERROR ERROR"
echo ""
echo "'Data' directory not found"
echo "If on Yellowstone, link /glade/p/wrf/Data into your WTF directory"
exit 1
endif

if ( ! -d /glade/scratch/${user}/TMPDIR_FOR_PGI_COMPILE ) then
mkdir /glade/scratch/${user}/TMPDIR_FOR_PGI_COMPILE
endif
Expand Down
9 changes: 9 additions & 0 deletions run_from_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ def usage(exit_code=0): #If no exit code is specified, this indicates successful

def main():

# First things first: check if user has a "Data" directory, quit with helpful message if they don't
if not os.path.isfile("Data"):
print("\nERROR ERROR ERROR\n")
print("'Data' directory not found")
print("If on Yellowstone, link /glade/p/wrf/Data into your WTF directory")
print("If you do not have access to Yellowstone, contact [email protected] for help")
sys.exit("\nExiting script")


tardir = "tarballs"

if len(sys.argv) > 1:
Expand Down

0 comments on commit 2cb7386

Please sign in to comment.