Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUMMA crashes when paths in fileManager text file miss / at the end #561

Open
kasra-keshavarz opened this issue Mar 1, 2024 · 5 comments

Comments

@kasra-keshavarz
Copy link

kasra-keshavarz commented Mar 1, 2024

Bug Report

Apparently, SUMMA crashes when the paths in the fileManager text file miss the / at the end. The error I receive is the following:

$ ./summa.exe -g 93 1 -m ./settings/fileManager_1month.txt > ./answers/1.1.1.run.txt
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
STOP 1

This normally shouldn't happen. I guess.

Here is the setting file for fileManager that I am using:

controlVersion       'SUMMA_FILE_MANAGER_V3.0.0'                           !  file manager version (defined string)
simStartTime         '1988-01-01 01:00'                                    ! 
simEndTime           '1988-01-31 23:00'                                    ! 
tmZoneInfo           'utcTime'                                             ! 

! These need to be updated
settingsPath         '/home/kasra.keshavarz1/pbhmCourse_student/4_high_performance_computing/settings/' !  setting path
outputPath           '/home/kasra.keshavarz1/pbhmCourse_student/4_high_performance_computing/output/'    !  output path

! This may need to be updated
forcingPath          '/work/TALC/enci619.05_2024w/hpc_forcing' !  forcing path

! This can remain unchanged
decisionsFile        'modelDecisions.txt'                                  !  model decision file
outputControlFile    'outputControl_wb.txt'                                !  output control specs
globalHruParamFile   'localParamInfo.txt'                                  !  local parameters
globalGruParamFile   'basinParamInfo.txt'                                  !  basin parameters
attributeFile        'local_attribute_camels.nc'                           !  local attributes
trialParamFile       'ParamTrial.camels.direct_calib_15.nc'                !  trial parameters
forcingListFile      'forcingFileList.txt'                                 !  forcing file list
initConditionFile    'warmState_1988010100.nc'                             !  initial conditions
outFilePrefix        'camels_nldas_1month'                                 !  output_prefix ('_' appended)
vegTableFile         'VEGPARM.TBL'                                         ! 
soilTableFile        'SOILPARM.TBL'                                        ! 
generalTableFile     'GENPARM.TBL'                                         ! 
noahmpTableFile      'MPTABLE.TBL'                                         ! 
! history Sat Sep 26 16:49:40 2020: convert_summa_config_v2_v3.py fileManager.txt
  • Version: commit 3ca07b7
  • Compiler: gcc/gfortran 7.3.0
  • OS: Rocky Linux 8.8 (Green Obsidian)
  • A description of relevant model settings: Not Applicable
  • A summary of the bug or error message you are getting: stated above
@andywood
Copy link
Collaborator

andywood commented Mar 2, 2024

Can you send the output from executing this without redirecting output into another file?
We see the error message but not what leads up to it. I don't think it has crashed, but rather trapped the error (such as file not found) and stopped. e.g., run: ./summa.exe -g 93 1 -m ./settings/fileManager_1month.txt

@kasra-keshavarz
Copy link
Author

Thank you Andy, and sorry for the oversight in documenting the error message. I have pasted the error in the following:

$ ./summa.exe -g 93 1 -m ./settings/fileManager_1month.txt
 GRU-Parallelization run activated. 1 GRUs are selected for simulation.
file_master is './settings/fileManager_1month.txt'.
   1 controlVersion: SUMMA_FILE_MANAGER_V3.0.0
   2 simStartTime: 1988-01-01 01:00
   3 simEndTime: 1988-01-31 23:00
   4 tmZoneInfo: utcTime
   5 settingsPath: /home/kasra.keshavarz1/pbhmCourse_student/4_high_performance_computing/settings/
   6 outputPath: /home/kasra.keshavarz1/pbhmCourse_student/4_high_performance_computing/output/
   7 forcingPath: /work/TALC/enci619.05_2024w/hpc_forcing
   8 decisionsFile: modelDecisions.txt
   9 outputControlFile: outputControl_wb.txt
  10 globalHruParamFile: localParamInfo.txt
  11 globalGruParamFile: basinParamInfo.txt
  12 attributeFile: local_attribute_camels.nc
  13 trialParamFile: ParamTrial.camels.direct_calib_15.nc
  14 forcingListFile: forcingFileList.txt
  15 initConditionFile: warmState_1988010100.nc
  16 outFilePrefix: camels_nldas_1month
  17 vegTableFile: VEGPARM.TBL
  18 soilTableFile: SOILPARM.TBL
  19 generalTableFile: GENPARM.TBL
  20 noahmpTableFile: MPTABLE.TBL
 id variable requested in outputControl, will be skipped: variable=hruId


FATAL ERROR: summa_paramSetup/ffile_info/FileNotFound[file='/work/TALC/enci619.05_2024w/hpc_forcingnldasForcing_198801.nc']

Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG
STOP 1

@wknoben
Copy link
Collaborator

wknoben commented Mar 5, 2024

It seems that the fileManager you shared does have the final / in forcingPath. Did you already fix this after running into the error, or is there some sort of odd bug where it eats the final / in the path?

forcingPath          '/work/TALC/enci619.05_2024w/hpc_forcing/' !  forcing path

Expecting the final / has been default behaviour for a long time. I imagine it's not hard to check for this and append a / if needed.

@kasra-keshavarz
Copy link
Author

Sorry for the inconsistency, I revised my first post. It should be accurate now.

@andywood
Copy link
Collaborator

andywood commented Mar 6, 2024

Wouter is correct, this works as expected -- SUMMA doesn't crash, it exits. The error message shows you that you should put the '/' at the end of the directory path in the fileManager. It's a convention, although if someone wanted to they could easily add some code to include a '/' on the end of whatever is entered in the directory path names or with slightly more effort check to see if a '/' exists first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants