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

Release/devel v7.2.0 #372

Merged
merged 93 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
4a3aaba
Remove snprintf - LogError
Aug 26, 2023
65e4d81
Remove use of `LOGNOTE` outside of echoing in/output
Aug 26, 2023
fa1dc62
Swap `malloc()` with `Mem_Malloc()` - General
Aug 27, 2023
2997e10
Swap `malloc()` with `Mem_Malloc()` - Str_CompareI
Aug 27, 2023
e2e3627
Replace `sw_error()` with `LogError()`
Aug 28, 2023
e99665b
Output `echo` values to the command line
Aug 28, 2023
a43257f
New functions `SW_*_init_ptrs()`
Aug 28, 2023
87f23ab
Prepare LOG_INFO for storing messages
Aug 28, 2023
1513326
Merge branch 'master' into feature_ErrorHandling
Aug 29, 2023
2d070a2
Correct number of warnings var comment in `LOG_INFO`
Sep 2, 2023
43523de
Remove `LOG_INFO` from all "echo" functions
Sep 2, 2023
06aa51b
Correct DEBUG_MEM calls to `LogError` and `Mem_Malloc`
Sep 2, 2023
198939b
New functions - `sw_init_logs()` & `sw_write_logs()`
Sep 2, 2023
30ac9d9
Correct `sw_check_log()`'s comment to not mention `atexit()`
Sep 2, 2023
55a9a88
Make warning/error strings in LOG_INFO constant size
Sep 3, 2023
f78103d
Update `LogError()` to store messages
Sep 3, 2023
4fa927c
Tests now use `sw_init_logs()`
Sep 3, 2023
5f560f5
Initialize VegEstab's "days" to NULL for deallocation
Sep 3, 2023
ea6ceee
`SW_*_init_ptrs()` now sets all output aggregation time periods
Sep 3, 2023
d5c0670
Remove `sw_strdup`
Sep 3, 2023
e45f3ae
Make `sw_error` private
Sep 5, 2023
f44bc91
Remove `init_silent_tests()`
Sep 5, 2023
76440de
Remove message defines but `LOGWARN` and `LOGERROR`
Sep 9, 2023
e247bed
`SW_MDL_read()` uses MAX_LOG_SIZE, not MAX_ERROR
Sep 9, 2023
bf30bef
Remove accidental print statement
Sep 9, 2023
a7d4be5
Remove `sw_error()`
Sep 9, 2023
1bdeb25
Increase buffer sizes within `LogError()`
Sep 9, 2023
3fc940a
Update `sw_write_logs()` "too many warns" message
Sep 9, 2023
a9cd731
Update makefile to use googlemock
Sep 9, 2023
bb6dbd5
Remove "*DeathTest" Test Suites
Sep 9, 2023
00508aa
Increase maximum log size
Sep 9, 2023
f23a48e
Modify/repurpose `sw_check_log()`
Sep 10, 2023
5e98228
Functions now exit early when an error occurs
Sep 11, 2023
1d5b88f
Modify `main()` to test for error
Sep 11, 2023
f3a3648
Revert `vsprintf` to `vsnprintf` in `LogError()`
N1ckP3rsl3y Sep 12, 2023
229af92
Fix crash condition and R compile warn (`sw_check_exit`)
N1ckP3rsl3y Sep 12, 2023
8dda729
Fix `sw_write_logs()`
N1ckP3rsl3y Sep 12, 2023
38c89ce
Remove obsolete code in DEBUG_MEM* sections
dschlaep Sep 15, 2023
9e8daee
Safe copy message format in `LogError()`
N1ckP3rsl3y Sep 16, 2023
d42b749
Restrict format size in `LogError()` (in DEBUG mode)
N1ckP3rsl3y Sep 17, 2023
2c673a4
Reset the value of MAX_LOG_SIZE
N1ckP3rsl3y Sep 17, 2023
454ec80
Update file includes
N1ckP3rsl3y Sep 17, 2023
97d6bac
Correct `sw_write_logs()` warning/copying
N1ckP3rsl3y Sep 17, 2023
813541f
New weather function - `initializeClimatePtrs()`
N1ckP3rsl3y Sep 17, 2023
44ac417
New function - `initializeMonthlyClimatePtrs()`
N1ckP3rsl3y Sep 17, 2023
3b8698f
`deallocateClimateStructs()` does not deallocate NULL memory
N1ckP3rsl3y Sep 17, 2023
261ebf6
Fix message formats in `checkAllWeather()`
N1ckP3rsl3y Sep 17, 2023
ff21f23
Fix possible memory leak in `SW_check_soil_properties()`
N1ckP3rsl3y Sep 17, 2023
e2009ce
Merge branch 'feature_ErrorHandling' into feature_IndivErrorHandling
N1ckP3rsl3y Sep 17, 2023
a1847f1
Change `create_test_soillayers()` to crash if needed
N1ckP3rsl3y Sep 17, 2023
1bec52e
Fix commit that removed obsolete code in DEBUG_MEM* sections
dschlaep Sep 18, 2023
8c7c755
Functions now exit early when an error occurs - Part 2
N1ckP3rsl3y Sep 19, 2023
9fa2064
Fix `initializeMonthlyClimatePtrs()`
N1ckP3rsl3y Sep 22, 2023
e7559fe
Correct `LogError()` - message overwriting
N1ckP3rsl3y Sep 22, 2023
0b0d97a
Fix rSOILWAT error reporting in `sw_write_logs()`
N1ckP3rsl3y Sep 22, 2023
c7384ba
Merge branch 'feature_ErrorHandling' into feature_IndivErrorHandling
N1ckP3rsl3y Sep 22, 2023
9796d7a
Functions now exit early when an error occurs - Part 3
N1ckP3rsl3y Sep 22, 2023
1198697
Fix `LOG_INFO` placement in arguments
N1ckP3rsl3y Sep 22, 2023
870fd7e
Correct early returns in `RemoveFiles()` and `itp_FXW_for_phi()`
N1ckP3rsl3y Sep 26, 2023
4e07625
Merge pull request #371 from DrylandEcology/feature_remove_debug_mem
dschlaep Sep 26, 2023
f2416fb
Fix `Mem_ReAlloc()` return value in rSOILWAT2
N1ckP3rsl3y Sep 27, 2023
add4910
Merge pull request #370 from DrylandEcology/feature_IndivErrorHandling
N1ckP3rsl3y Sep 30, 2023
d0a52d7
Merge branch 'release/devel_v7.2.0' into feature_ErrorHandling
N1ckP3rsl3y Sep 30, 2023
71b2685
Fix `LogError()` for gcc `-Wformat-truncation=`
dschlaep Oct 4, 2023
b98cf6d
Simplify warning and error message functionality
dschlaep Oct 4, 2023
c7ebda2
New unit tests for messages and errors
dschlaep Oct 4, 2023
2cec8aa
Clarify that `SW_SWC_new_year()` is currently not functional for rSOI…
dschlaep Oct 4, 2023
6423e4f
Fix documentation of `sw_init_args()`
dschlaep Oct 5, 2023
cafc45b
Finish possible early-exit memory leaks
N1ckP3rsl3y Oct 8, 2023
c212e08
Update LOG_INFO doxygen to in/output of functions
N1ckP3rsl3y Oct 8, 2023
d28e6c1
Complete exit early in `SW_MKV_setup()`
N1ckP3rsl3y Oct 9, 2023
2ea380d
Fix doxygen for `initializeAllWeather()`
N1ckP3rsl3y Oct 9, 2023
2a199af
`uniqueIndices()`: free already allocated memory on early return
dschlaep Oct 10, 2023
142190f
SWRC_SWCtoSWP(): more intelligible error/warning messages
dschlaep Oct 10, 2023
871a90d
Update error handling in unit tests/test executable
dschlaep Oct 10, 2023
3b6a1cb
Close open files when returning early
dschlaep Oct 11, 2023
12c88aa
Clean up more code associated with DEBUG_MEM* sections
dschlaep Oct 13, 2023
75cfbd4
Encapsulate RNG variable in dedicated type
dschlaep Oct 13, 2023
d05beeb
Merge pull request #374 from DrylandEcology/feature_no_pcg_for_rSOILWAT2
dschlaep Oct 13, 2023
f5afcc5
Finalize early-exit memory leaks part 2
N1ckP3rsl3y Oct 16, 2023
c439bc9
`allocateAllWeather()` uses all-weather history, not SW_WEATHER
N1ckP3rsl3y Oct 16, 2023
f2b5037
Add gcc13 and clang-17 to tools "check_SOILWAT2.sh"
dschlaep Oct 16, 2023
d09cbda
Generalized `deallocateAllWeather()`uses all-weather history, not SW_…
dschlaep Oct 16, 2023
e3227db
Merge branch 'release/devel_v7.2.0' into feature_ErrorHandling
dschlaep Oct 16, 2023
43da1ab
Clarify `Mem_ReAlloc()`
dschlaep Oct 16, 2023
6701547
Merge pull request #367 from DrylandEcology/feature_ErrorHandling
dschlaep Oct 16, 2023
dc7b17b
Update NEWS for v7.2.0
dschlaep Oct 16, 2023
e1990ed
SOILWAT2 library currently compiles with C99
dschlaep Oct 19, 2023
6bc3812
New helper make targets to run `leaks` program
dschlaep Oct 19, 2023
8de0f64
Update README and user guides
dschlaep Oct 19, 2023
a9329cc
Finalize NEWS for v7.2.0
dschlaep Oct 20, 2023
933d543
New function `sw_strtok()`
N1ckP3rsl3y Oct 24, 2023
b85850c
Wrap up sw_strtok
dschlaep Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main_nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Run binary (with sanitizers)
# Apple clang does not support "AddressSanitizer: detect_leaks" (at least as of clang-1200.0.32.29)
if: ${{ runner.os != 'macOS' }}
run: make clean bin_leaks
run: make clean bin_sanitizer

- name: Unit tests (shuffle and repeat 3x)
run: make clean test_rep3rnd
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Severe unit tests (with sanitizers)
# Apple clang does not support "AddressSanitizer: detect_leaks" (at least as of clang-1200.0.32.29)
if: ${{ runner.os != 'macOS' }}
run: make clean test_leaks
run: make clean test_sanitizer


check_code_coverage:
Expand All @@ -60,7 +60,7 @@ jobs:
submodules: recursive

- name: Generate coverage report
run: CC=gcc CXX=g++ GCOV=gcov make clean clean_cov cov
run: CXX=g++ GCOV=gcov make clean clean_cov cov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
23 changes: 22 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
# NEWS

# SOILWAT2 v7.2.0
* Simulation output remains the same as the previous version.

* SOILWAT2 now handles errors more gracefully (#346; @N1ckP3rsl3y, @dschlaep).
* Code no longer crashes on error immediately (except for STEPWAT2).
* Code stores messages of warnings and error status.
* All functions now check for errors and return early
(after cleaning up memory).

* SOILWAT2 now defines its own structure for random numbers (#373; @dschlaep).
This allows to hide implementation details, i.e., STEPWAT2 will no
longer need to interact directly with `pcg` and rSOILWAT2 will no longer
depend on `pcg` which it never has used.

* New `sw_strtok()` is thread-safe and replaces not thread-safe `strtok()`
(#376; @N1ckP3rsl3y).

* Obsolete code in DEBUG_MEM* sections is removed (#369; @dschlaep).


# SOILWAT2 v7.1.0
* Simulation output remains the same as the previous version.

* Prepare for SOILWAT2 to become thread-safe and reentrant (#346; @N1ckP3rsl3y)
* Prepare for SOILWAT2 to become thread-safe and reentrant
(#346; @N1ckP3rsl3y, @dschlaep)
* Definition clarifications
* Thread-safe - Multiple threads (a future SOILWAT2 development)
will not influence each other unintentionally. Here, we implemented
Expand Down
60 changes: 33 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ A full code documentation may be built, see [here](#get_documentation).
<a name="compile"></a>
### Compilation
* Requirements:
- the `gcc` or `clang/llvm` toolchains compliant with `C11`
- for unit tests (using `googletest`), additionally,
- `g++ >= v5.0` or `clang++ >= v5.0` compliant with `C++11`
- the `gcc` or `clang/llvm` toolchains compliant with `C99`
- for unit tests (using `googletest`)
- toolchains compliant with `C++14`
- `POSIX API`
- GNU-compliant `make`
- On Windows OS: an installation of `cygwin`
Expand All @@ -113,7 +113,13 @@ A full code documentation may be built, see [here](#get_documentation).
available targets), for instance,
```{.sh}
cd SOILWAT2/
make bin
make
```

You can use a specific compiler, e.g.,
```{.sh}
CC=gcc make
CC=clang make
```
<br>

Expand Down Expand Up @@ -208,9 +214,9 @@ causes some complications, see `makefile`.

Run unit tests locally on the command-line with
```{.sh}
make test test_run # compiles and executes the unit-tests
make test_severe test_run # compiles/executes with strict/severe flags
make clean # cleans build artifacts
make test_run # compiles and executes the tests
make test_severe # compiles/executes with strict/severe flags
make clean_test # cleans build artifacts
```


Expand Down Expand Up @@ -308,24 +314,31 @@ Currently, the following is implemented:

__Continous integration checks__

Development/feature branches can only be merged into master if they pass
all checks on the continuous integration servers.
Running the following tests locally helps to increase chances that
they will work well on the servers as well:
Development/feature branches can only be merged into the main branch and
released if they pass all checks on the continuous integration servers
(see `.github/workflows/`).

Please run the "severe", "sanitizer", and "leak" targets locally
(see also `tools/check_SOILWAT2.sh`)
```{.sh}
make clean bin_debug_severe bint_run
make clean test_severe test_run
make clean_build bin_debug_severe
make clean_test test_severe
```

<br>

__Sanitizer__
__Sanitizers & leaks__

Running tests with the `severe` targets may require excluding known memory leaks
(see [issue #205](https://github.com/DrylandEcology/SOILWAT2/issues/205)):
Run the simulation and tests with the `leaks` program, For instance,
```{.sh}
make clean_build bin_leaks
make clean_test test_leaks
```

Run the simulation and tests with sanitizers. For instance,
```{.sh}
ASAN_OPTIONS=detect_leaks=1 LSAN_OPTIONS=suppressions=.LSAN_suppr.txt make clean test_severe test_run
make clean_build bin_sanitizer
make clean_test test_sanitizer
```

The address sanitizer may not work correctly and/or fail when used with the
Expand All @@ -343,7 +356,7 @@ This can be fixed, for instance, with the following steps

```{.sh}
# build test executable with clang and leak detection
CC=clang CXX=clang++ ASAN_OPTIONS=detect_leaks=1 LSAN_OPTIONS=suppressions=.LSAN_suppr.txt make clean test_severe
CXX=clang++ ASAN_OPTIONS=detect_leaks=1 LSAN_OPTIONS=suppressions=.LSAN_suppr.txt make clean test_severe

# check faulty library path
otool -L sw_test
Expand Down Expand Up @@ -386,21 +399,14 @@ This can be fixed, for instance, with the following steps
with, e.g.,

```{.sh}
make bin bint_run CPPFLAGS=-DSWDEBUG
make bin_run CPPFLAGS=-DSWDEBUG
```

* Alternatively, use the pre-configured debugging targets
`bin_debug` and `bin_debug_severe`, for instance, with

```{.sh}
make bin_debug_severe bint_run
```

* If **valgrind** is installed, then call the target `bind_valgrind`
(see description in `makefile`) with

```
make bind_valgrind
make bin_debug_severe
```

<br>
Expand Down
20 changes: 9 additions & 11 deletions doc/additional_pages/A_SOILWAT2_user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ on your side.

### Minimal requirements
- on any platform:
- to compile the `SOILWAT2` executable
- `C11` compliant [gcc][] or [clang/llvm][] toolchains;
ideally, `gcc >= v4.9` or `clang >= v3.3`
- to compile the `SOILWAT2` unit tests (using `googletest`)
- `C++11` compliant [gcc][] or [clang/llvm][] toolchains;
where `gcc >= v5.0` or `clang >= v5.0`
- to compile the `SOILWAT2` simulation program
- `C99` compliant [gcc][] or [clang/llvm][] toolchains
- to compile the `SOILWAT2` tests program (using `googletest`)
- `C++14` compliant [gcc][] or [clang/llvm][] toolchains
(see [googletest cxx support](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md));
- `POSIX API` (needs to be activated on `cygwin`, see `makefile`)
- POSIX- [make](https://pubs.opengroup.org/onlinepubs/9699919799/) or
GNU-compliant [make](https://www.gnu.org/software/make/)
- GNU-compliant [make](https://www.gnu.org/software/make/)
- [git][] to download the code from the `github` repository
- additionally, on Windows OS:
- a `*nix` emulator, e.g., an installation of [cygwin][] or [docker][]
Expand All @@ -56,7 +54,7 @@ on your side.
- having agreed to the xcode license (run `xcodebuild -license`)
- or, alternatively, the full [xcode][] installation
- optional:
- [doxygen][] (ideally `>= v1.8.17`) and
- [doxygen][] (ideally `>= v1.9.3`) and
a minimal `latex` installation (see below)
to generate a local copy of the documentation

Expand Down Expand Up @@ -111,7 +109,7 @@ on your side.
* Compile an executable binary, e.g.,
```{.sh}
cd SOILWAT2/
make bin
make
```

<br>
Expand Down Expand Up @@ -141,7 +139,7 @@ on your side.
```
or, equivalently,
```{.sh}
make bin
make
bin/SOILWAT2 -d ./tests/example -f files.in
```

Expand Down
5 changes: 1 addition & 4 deletions include/SW_Control.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern "C" {
/* =================================================== */
/* Global Function Declarations */
/* --------------------------------------------------- */
void SW_CTL_init_ptrs(SW_ALL* sw, char *InFiles[]);
void SW_CTL_setup_model(SW_ALL* sw, SW_OUTPUT_POINTERS* SW_OutputPtrs,
PATH_INFO* PathInfo, LOG_INFO* LogInfo);
void SW_CTL_clear_model(Bool full_reset, SW_ALL* sw, PATH_INFO* PathInfo);
Expand All @@ -39,10 +40,6 @@ void SW_CTL_main(SW_ALL* sw, SW_OUTPUT_POINTERS* SW_OutputPtrs,
void SW_CTL_run_current_year(SW_ALL* sw, SW_OUTPUT_POINTERS* SW_OutputPtrs,
LOG_INFO* LogInfo);

#ifdef DEBUG_MEM
void SW_CTL_SetMemoryRefs(SW_OUTPUT SW_Output[]);
#endif


#ifdef __cplusplus
}
Expand Down
22 changes: 22 additions & 0 deletions include/SW_Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include <math.h> /* >= C99; for: atan(), isfinite() */
#include "include/generic.h"

#if !defined(RSOILWAT) /* rSOILWAT2 uses R's RNGs */
#include "external/pcg/pcg_basic.h" // see https://github.com/imneme/pcg-c-basic
#endif


#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -97,6 +102,12 @@ extern "C" {
#define MAX_FILENAMESIZE 512
#define MAX_PATHSIZE 2048

/* Maximum number of messages to store in LOG_INFO */
#define MAX_MSGS 10

/* Maximum number of characters for a single message in LOG_INFO */
#define MAX_LOG_SIZE 300

/* this could be defined by STEPWAT */
#ifndef DFLT_FIRSTFILE
#define DFLT_FIRSTFILE "files.in"
Expand Down Expand Up @@ -245,6 +256,17 @@ typedef unsigned int TimeInt;
typedef unsigned int LyrIndex;
typedef signed char flag;


/* =================================================== */
/* RNG structs */
/* --------------------------------------------------- */
#if defined(RSOILWAT)
typedef int sw_random_t; /* not used by rSOILWAT2; it uses instead R's RNG */
#else
typedef pcg32_random_t sw_random_t;
#endif


#ifdef __cplusplus
}
#endif
Expand Down
7 changes: 2 additions & 5 deletions include/SW_Files.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,12 @@ typedef enum {
/* Global Function Declarations */
/* --------------------------------------------------- */
void SW_F_read(PATH_INFO* PathInfo, LOG_INFO* LogInfo);
void SW_F_construct(char *InFiles[], const char *firstfile, char _ProjDir[],
void SW_F_init_ptrs(char *InFiles[]);
void SW_F_construct(const char *firstfile, char _ProjDir[],
LOG_INFO *LogInfo);
void SW_F_deconstruct(char *InFiles[]);
void SW_CSV_F_INIT(const char *s, LOG_INFO* LogInfo);

#ifdef DEBUG_MEM
void SW_F_SetMemoryRefs(void);
#endif


#ifdef __cplusplus
}
Expand Down
6 changes: 4 additions & 2 deletions include/SW_Main_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ extern "C" {
/* =================================================== */
/* Global Function Declarations */
/* --------------------------------------------------- */
void sw_init_args(int argc, char **argv, Bool *QuietMode,
void sw_init_args(int argc, char **argv,
Bool *EchoInits, char **_firstfile, LOG_INFO* LogInfo);
void sw_print_version(void);
void sw_check_log(Bool QuietMode, LOG_INFO* LogInfo);
void sw_fail_on_error(LOG_INFO* LogInfo);
void sw_init_logs(FILE* logInitPtr, LOG_INFO* LogInfo);
void sw_write_warnings(LOG_INFO* LogInfo);

#ifdef __cplusplus
}
Expand Down
5 changes: 1 addition & 4 deletions include/SW_Markov.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extern "C" {
/* =================================================== */
/* Global Function Declarations */
/* --------------------------------------------------- */
void SW_MKV_init_ptrs(SW_MARKOV* SW_Markov);
void SW_MKV_construct(unsigned long rng_seed, SW_MARKOV* SW_Markov,
LOG_INFO* LogInfo);
void SW_MKV_deconstruct(SW_MARKOV* SW_Markov);
Expand All @@ -33,10 +34,6 @@ void SW_MKV_setup(SW_MARKOV* SW_Markov, unsigned long Weather_rng_seed,
void SW_MKV_today(SW_MARKOV* SW_Markov, TimeInt doy0, TimeInt year,
RealD *tmax, RealD *tmin, RealD *rain, LOG_INFO* LogInfo);

#ifdef DEBUG_MEM
void SW_MKV_SetMemoryRefs( void);
#endif


#ifdef __cplusplus
}
Expand Down
10 changes: 3 additions & 7 deletions include/SW_Output.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ extern char const *styp2str[];
/* =================================================== */
/* Global Function Declarations */
/* --------------------------------------------------- */
void SW_OUT_init_ptrs(SW_ALL* sw);
void SW_OUT_construct(Bool make_soil[], Bool make_regular[],
SW_OUTPUT_POINTERS* SW_OutputPtrs, SW_OUTPUT* SW_Output,
LyrIndex n_layers, SW_GEN_OUT *GenOutput);
Expand All @@ -152,8 +153,8 @@ void SW_OUT_flush(SW_ALL* sw, SW_OUTPUT_POINTERS* SW_OutputPtrs,
LOG_INFO* LogInfo);
void _collect_values(SW_ALL* sw, SW_OUTPUT_POINTERS* SW_OutputPtrs,
Bool bFlush_output, TimeInt tOffset, LOG_INFO* LogInfo);
void _echo_outputs(SW_ALL* sw, LOG_INFO* LogInfo);
void _echo_all_inputs(SW_ALL* sw, LOG_INFO* LogInfo);
void _echo_outputs(SW_ALL* sw);
void _echo_all_inputs(SW_ALL* sw);

void find_OutPeriods_inUse(SW_GEN_OUT* GenOutput, SW_OUTPUT* SW_Output);
Bool has_OutPeriod_inUse(OutPeriod pd, OutKey k, IntUS used_OUTNPERIODS,
Expand Down Expand Up @@ -306,11 +307,6 @@ void get_biomass_SXW(OutPeriod pd, SW_ALL* sw);
#endif


#ifdef DEBUG_MEM
void SW_OUT_SetMemoryRefs(SW_OUTPUT SW_Output[]);
#endif


#ifdef __cplusplus
}
#endif
Expand Down
6 changes: 1 addition & 5 deletions include/SW_Site.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void SW_SIT_read(SW_SITE* SW_Site, char *InFiles[],
SW_CARBON* SW_Carbon, LOG_INFO* LogInfo);
void SW_SIT_init_run(SW_VEGPROD* SW_VegProd, SW_SITE* SW_Site,
LOG_INFO* LogInfo);
void _echo_inputs(SW_SITE* SW_Site, LOG_INFO* LogInfo);
void _echo_inputs(SW_SITE* SW_Site);

/* these used to be in Layers */
void SW_LYR_read(SW_SITE* SW_Site, char *InFiles[], LOG_INFO* LogInfo);
Expand All @@ -255,10 +255,6 @@ void set_soillayers(SW_VEGPROD* SW_VegProd, SW_SITE* SW_Site,
void derive_soilRegions(SW_SITE* SW_Site, int nRegions,
RealD *regionLowerBounds, LOG_INFO* LogInfo);

#ifdef DEBUG_MEM
void SW_SIT_SetMemoryRefs(void);
#endif


#ifdef __cplusplus
}
Expand Down
Loading