You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple catchments can be processed during a single execution of the standalone version of Snow-17. However, the program will crash when there is a conflict with an open file unit.
Current behavior
The program crashes when concurrently processing 44 or more catchments.
Expected behavior
There should be a check for open unit numbers and an error check if the user tries to process more than an established number of catchments simultaneously.
Considerations
Snow-17 runs within NGEN execute a single catchment at a time. This method processes each catchment, however, it is slow and does not support code optimization to process many catchments simultaneously.
The number of input forcing files could become unwieldy if there is a strict one-to-one correspondence between forcing files and catchments.
The Fortran specs indicate the one can open as few as 100 files at a time (file units 0-99) and some of these file units are dedicated to standard I/O (e.g. unit numbers 4,5,6). The number of files one can open at a time is implementation specific.
One reference indicated that you can change #define MXUNIT 100 and recompile the Fortran compiler to increase the number of files that can be opened at a time. However, there is also an OS limitation. On this Mac M1 the limitation is 256:
% ulimit -n
256
Suggested solutions
Write a function/subroutine to check for open unit numbers and dole out an unused unit number starting at 10 to avoid the OS range. Avoid unit numbers that are explicitly utilized by the program (e.g., 51) or change the code such that all unit numbers are doled out.
Error check for requests that exceed an established number of catchments, e.g., 80.
The text was updated successfully, but these errors were encountered:
Multiple catchments can be processed during a single execution of the standalone version of Snow-17. However, the program will crash when there is a conflict with an open file unit.
Current behavior
The program crashes when concurrently processing 44 or more catchments.
Expected behavior
There should be a check for open unit numbers and an error check if the user tries to process more than an established number of catchments simultaneously.
Considerations
#define MXUNIT 100
and recompile the Fortran compiler to increase the number of files that can be opened at a time. However, there is also an OS limitation. On this Mac M1 the limitation is 256:Suggested solutions
The text was updated successfully, but these errors were encountered: