From b464a1f011ade135cc2e7dcb1a2190a04049c7bd Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 31 Jan 2024 14:40:03 -0800 Subject: [PATCH 01/17] update make file --- .gitignore | 6 ++++-- Compile/Make_SS_safe.bat | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 5c306277..2d39ecb0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,12 +8,14 @@ *.obj *.log ss.tpl +ss3.tpl ss_opt.tpl ss_trans.tpl ~$*.* Compile/ss.log +Compile/ss3.log .Rproj.user *.Rproj .Rhistory -Compile/ssFileLabels.txt -StockSynthesis.code-workspace +Compile/ssFileLabels.txt +StockSynthesis.code-workspace diff --git a/Compile/Make_SS_safe.bat b/Compile/Make_SS_safe.bat index a69560c0..7859331d 100644 --- a/Compile/Make_SS_safe.bat +++ b/Compile/Make_SS_safe.bat @@ -7,8 +7,8 @@ del SS_functions.temp ::create SS_functions.temp file combining various functions copy/b SS_biofxn.tpl+SS_miscfxn.tpl+SS_selex.tpl+SS_popdyn.tpl+SS_recruit.tpl+SS_benchfore.tpl+SS_expval.tpl+SS_objfunc.tpl+SS_write.tpl+SS_write_ssnew.tpl+SS_write_report.tpl+SS_ALK.tpl+SS_timevaryparm.tpl+SS_tagrecap.tpl SS_functions.temp -::combine remaining files to create ss.tpl -copy/b SS_versioninfo_330safe.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss.tpl" +::combine remaining files to create ss3.tpl +copy/b SS_versioninfo_330safe.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss3.tpl" ::path=c:\admb;C:\rtools40\mingw64\bin;%path% @@ -16,4 +16,4 @@ cd "Compile" ::set CXX=cl set CXX=g++ -admb ss +admb ss3 From 9e3b70e7154702458e7990afba5e1980877b1f28 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Fri, 2 Feb 2024 09:28:20 -0800 Subject: [PATCH 02/17] Update StockSynthesis.code-workspace --- StockSynthesis.code-workspace | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StockSynthesis.code-workspace b/StockSynthesis.code-workspace index 068856cf..2bfc56e8 100644 --- a/StockSynthesis.code-workspace +++ b/StockSynthesis.code-workspace @@ -9,7 +9,8 @@ "*.tpl": "c", "\"*.extension\":": "\"tpl\"", "*.htp": "c", - "ostream": "c" + "ostream": "c", + "iosfwd": "c" }, "explorer.excludeGitIgnore": true } From 61427a062f3cc27e1c28c56b99059b8264caa252 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 14 Feb 2024 15:26:23 -0800 Subject: [PATCH 03/17] fix unguarded For loop --- .vscode/settings.json | 6 ++++++ SS_objfunc.tpl | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..1474b617 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.tpl": "c", + "*.htp": "c" + } +} \ No newline at end of file diff --git a/SS_objfunc.tpl b/SS_objfunc.tpl index ea70db73..c0f277fe 100644 --- a/SS_objfunc.tpl +++ b/SS_objfunc.tpl @@ -125,7 +125,7 @@ FUNCTION void evaluate_the_objective_function() } // SS_Label_Info_25.1.4 #calc the logL - for (i = 1; i <= Svy_N_fleet(f); i++) + for (i = 1; i <= Svy_N_fleet(f); i++) { if (Svy_use(f, i) > 0) { if (Svy_errtype(f) == 0) { // lognormal @@ -152,7 +152,8 @@ FUNCTION void evaluate_the_objective_function() // values <-2 are trapped in readdata } } - surv_like(f) = sum(Svy_like_I(f)); + } // end loop of obs + surv_like(f) = sum(Svy_like_I(f)); } // end having obs for this survey } if (do_once == 1) From 6946c80d94bdff8ac6710b8b7b2f7489b3f0e7c1 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 31 Jan 2024 14:40:03 -0800 Subject: [PATCH 04/17] update make file --- .gitignore | 6 ++++-- Compile/Make_SS_safe.bat | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5c306277..2d39ecb0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,12 +8,14 @@ *.obj *.log ss.tpl +ss3.tpl ss_opt.tpl ss_trans.tpl ~$*.* Compile/ss.log +Compile/ss3.log .Rproj.user *.Rproj .Rhistory -Compile/ssFileLabels.txt -StockSynthesis.code-workspace +Compile/ssFileLabels.txt +StockSynthesis.code-workspace diff --git a/Compile/Make_SS_safe.bat b/Compile/Make_SS_safe.bat index 81e74ea7..930b8e38 100644 --- a/Compile/Make_SS_safe.bat +++ b/Compile/Make_SS_safe.bat @@ -11,8 +11,8 @@ del SS_functions.temp ::create SS_functions.temp file combining various functions copy/b SS_biofxn.tpl+SS_miscfxn.tpl+SS_selex.tpl+SS_popdyn.tpl+SS_recruit.tpl+SS_benchfore.tpl+SS_expval.tpl+SS_objfunc.tpl+SS_write.tpl+SS_write_ssnew.tpl+SS_write_report.tpl+SS_ALK.tpl+SS_timevaryparm.tpl+SS_tagrecap.tpl SS_functions.temp -::combine remaining files to create ss.tpl -copy/b SS_versioninfo_330safe.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss.tpl" +::combine remaining files to create ss3.tpl +copy/b SS_versioninfo_330safe.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss3.tpl" ::path=c:\admb;C:\rtools40\mingw64\bin;%path% From 38114d37ecea1f41dd98d850153bd32aa7ffecb2 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Fri, 2 Feb 2024 09:28:20 -0800 Subject: [PATCH 05/17] Update StockSynthesis.code-workspace --- StockSynthesis.code-workspace | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StockSynthesis.code-workspace b/StockSynthesis.code-workspace index 068856cf..2bfc56e8 100644 --- a/StockSynthesis.code-workspace +++ b/StockSynthesis.code-workspace @@ -9,7 +9,8 @@ "*.tpl": "c", "\"*.extension\":": "\"tpl\"", "*.htp": "c", - "ostream": "c" + "ostream": "c", + "iosfwd": "c" }, "explorer.excludeGitIgnore": true } From de51a8eb50b1273e2274ded4d9ed1f0e861dee4a Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 14 Feb 2024 15:26:23 -0800 Subject: [PATCH 06/17] fix unguarded For loop --- .vscode/settings.json | 6 ++++++ SS_objfunc.tpl | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..1474b617 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "*.tpl": "c", + "*.htp": "c" + } +} \ No newline at end of file diff --git a/SS_objfunc.tpl b/SS_objfunc.tpl index ea70db73..c0f277fe 100644 --- a/SS_objfunc.tpl +++ b/SS_objfunc.tpl @@ -125,7 +125,7 @@ FUNCTION void evaluate_the_objective_function() } // SS_Label_Info_25.1.4 #calc the logL - for (i = 1; i <= Svy_N_fleet(f); i++) + for (i = 1; i <= Svy_N_fleet(f); i++) { if (Svy_use(f, i) > 0) { if (Svy_errtype(f) == 0) { // lognormal @@ -152,7 +152,8 @@ FUNCTION void evaluate_the_objective_function() // values <-2 are trapped in readdata } } - surv_like(f) = sum(Svy_like_I(f)); + } // end loop of obs + surv_like(f) = sum(Svy_like_I(f)); } // end having obs for this survey } if (do_once == 1) From cf4c3b583ea9593b9cc9477a2248bcdea0385673 Mon Sep 17 00:00:00 2001 From: e-gugliotti-NOAA Date: Thu, 15 Feb 2024 10:09:51 -0500 Subject: [PATCH 07/17] update all files to make ss3 to be ss3 and ss3_opt --- .github/workflows/build-ss3-warnings.yml | 4 +- .github/workflows/build-ss3.yml | 30 +++++++-------- .github/workflows/run-ss3-bootstrap.yml | 4 +- .github/workflows/run-ss3-mcmc.yml | 4 +- .github/workflows/run-ss3-no-est.yml | 4 +- .github/workflows/run-ss3-with-est.yml | 4 +- .github/workflows/test-r4ss-with-ss3.yml | 4 +- Compile/Make_SS_fast.bat | 16 ++++---- Compile/Make_SS_safe.bat | 18 ++++----- GNUmakefile | 48 ++++++++++++------------ Make_SS_330_new.sh | 14 +++---- 11 files changed, 75 insertions(+), 75 deletions(-) diff --git a/.github/workflows/build-ss3-warnings.yml b/.github/workflows/build-ss3-warnings.yml index 21bb038a..5f3f176f 100644 --- a/.github/workflows/build-ss3-warnings.yml +++ b/.github/workflows/build-ss3-warnings.yml @@ -45,7 +45,7 @@ jobs: - name: Build stock synthesis with warnings displayed in console using admb docker image run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 -w @@ -53,7 +53,7 @@ jobs: - name: Build stock synthesis with warnings again to save to file run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 -w &> warnings.txt diff --git a/.github/workflows/build-ss3.yml b/.github/workflows/build-ss3.yml index 02d16ce2..0348e82b 100644 --- a/.github/workflows/build-ss3.yml +++ b/.github/workflows/build-ss3.yml @@ -207,10 +207,10 @@ jobs: run: | mkdir SS330 chmod 777 SS330 - mv Compile/ss.exe SS330/ - mv Compile/ss_opt.exe SS330/ - mv SS330/ss.exe SS330/ss3_win.exe - mv SS330/ss_opt.exe SS330/ss3_opt_win.exe + mv Compile/ss3.exe SS330/ + mv Compile/ss3_opt.exe SS330/ + mv SS330/ss3.exe SS330/ss3_win.exe + mv SS330/ss3_opt.exe SS330/ss3_opt_win.exe - name: Build stock synthesis for mac with admb docker image if: matrix.config.os == 'macos-latest' @@ -220,7 +220,7 @@ jobs: docker pull johnoel/admb:linux rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 @@ -231,22 +231,22 @@ jobs: - name: Verify binary on mac if: matrix.config.os == 'macos-latest' run: | - shasum -a 256 SS330/ss - shasum -a 256 SS330/ss_opt + shasum -a 256 SS330/ss3 + shasum -a 256 SS330/ss3_opt - name: Delete unneeded files and change exe names on mac if: matrix.config.os == 'macos-latest' run: | cd SS330 - rm *.obj *.htp *.cpp ss_opt.tpl - mv ss ss3_osx - mv ss_opt ss3_opt_osx + rm *.obj *.htp *.cpp ss3_opt.tpl + mv ss3 ss3_osx + mv ss3_opt ss3_opt_osx - name: Build stock synthesis for linux with p flag and admb docker image if: matrix.config.os == 'ubuntu-latest' run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 -p @@ -255,16 +255,16 @@ jobs: - name: Verify binary on linux if: matrix.config.os == 'ubuntu-latest' run: | - sha256sum SS330/ss - sha256sum SS330/ss_opt + sha256sum SS330/ss3 + sha256sum SS330/ss3_opt - name: Delete unneeded files and change exe names on linux if: matrix.config.os == 'ubuntu-latest' run: | cd SS330 rm *.obj *.htp *.cpp ss_opt.tpl ss.tpl - mv ss ss3_linux - mv ss_opt ss3_opt_linux + mv ss3 ss3_linux + mv ss3_opt ss3_opt_linux - name: Archive binaries if: success() diff --git a/.github/workflows/run-ss3-bootstrap.yml b/.github/workflows/run-ss3-bootstrap.yml index 02ad347c..ebceb6b6 100644 --- a/.github/workflows/run-ss3-bootstrap.yml +++ b/.github/workflows/run-ss3-bootstrap.yml @@ -58,7 +58,7 @@ jobs: - name: Build stock synthesis with admb docker image run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 @@ -66,7 +66,7 @@ jobs: - name: move exes, scripts to needed locations run: | mv test-models-repo/models test-models-repo/model_runs - mv SS330/ss test-models-repo/model_runs/Simple_with_DM_sizefreq/ss3 + mv SS330/ss3 test-models-repo/model_runs/Simple_with_DM_sizefreq/ss3 - name: change permissions on ss3 exes run: sudo chmod a+x test-models-repo/model_runs/Simple_with_DM_sizefreq/ss3 diff --git a/.github/workflows/run-ss3-mcmc.yml b/.github/workflows/run-ss3-mcmc.yml index b265d85b..cba1203d 100644 --- a/.github/workflows/run-ss3-mcmc.yml +++ b/.github/workflows/run-ss3-mcmc.yml @@ -56,7 +56,7 @@ jobs: - name: Build stock synthesis with admb docker image run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 @@ -67,7 +67,7 @@ jobs: mv test-models-repo/models/Simple/forecast.ss forecast.ss mv test-models-repo/models/Simple/control.ss control.ss mv test-models-repo/models/Simple/data.ss data.ss - mv SS330/ss ss3 + mv SS330/ss3 ss3 ls - name: change permissions on ss exe diff --git a/.github/workflows/run-ss3-no-est.yml b/.github/workflows/run-ss3-no-est.yml index de0cff1e..912ced4a 100644 --- a/.github/workflows/run-ss3-no-est.yml +++ b/.github/workflows/run-ss3-no-est.yml @@ -62,7 +62,7 @@ jobs: - name: Build stock synthesis with admb docker image run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 @@ -70,7 +70,7 @@ jobs: - name: move exes, scripts to needed locations run: | mv test-models-repo/models test-models-repo/model_runs - mv SS330/ss test-models-repo/model_runs/ss3 + mv SS330/ss3 test-models-repo/model_runs/ss3 mv test-models-repo/.github/r_scripts/run_from_par.R test-models-repo/run_from_par.R mv test-models-repo/.github/r_scripts/run_compare_noest.R test-models-repo/run_compare_noest.R diff --git a/.github/workflows/run-ss3-with-est.yml b/.github/workflows/run-ss3-with-est.yml index da32e049..667068c3 100644 --- a/.github/workflows/run-ss3-with-est.yml +++ b/.github/workflows/run-ss3-with-est.yml @@ -52,7 +52,7 @@ jobs: - name: Build stock synthesis with admb docker image run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 @@ -60,7 +60,7 @@ jobs: - name: move exes, scripts to needed locations run: | mv test-models-repo/models test-models-repo/model_runs - mv SS330/ss test-models-repo/model_runs/ss3 + mv SS330/ss3 test-models-repo/model_runs/ss3 - name: change permissions on ss3 exes run: sudo chmod a+x test-models-repo/model_runs/ss3 diff --git a/.github/workflows/test-r4ss-with-ss3.yml b/.github/workflows/test-r4ss-with-ss3.yml index 9aee8dda..c4dce171 100644 --- a/.github/workflows/test-r4ss-with-ss3.yml +++ b/.github/workflows/test-r4ss-with-ss3.yml @@ -64,7 +64,7 @@ jobs: - name: Build stock synthesis with admb docker image run: | rm -rf SS330 - rm -rf ss_osx.tar + rm -rf ss3_osx.tar mkdir SS330 chmod 777 SS330 /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 @@ -72,7 +72,7 @@ jobs: - name: move exes, scripts to needed locations run: | mv test-models-repo/models test-models-repo/model_runs - mv SS330/ss test-models-repo/model_runs/ss3 + mv SS330/ss3 test-models-repo/model_runs/ss3 mv test-models-repo/.github/r_scripts/run_from_par.R test-models-repo/run_from_par.R mv test-models-repo/.github/r_scripts/run_compare_noest.R test-models-repo/run_compare_noest.R diff --git a/Compile/Make_SS_fast.bat b/Compile/Make_SS_fast.bat index 8f5c44ab..d2a60c6d 100644 --- a/Compile/Make_SS_fast.bat +++ b/Compile/Make_SS_fast.bat @@ -12,8 +12,8 @@ del SS_functions.temp @REM create SS_functions.temp file combining various functions copy/b SS_biofxn.tpl+SS_miscfxn.tpl+SS_selex.tpl+SS_popdyn.tpl+SS_recruit.tpl+SS_benchfore.tpl+SS_expval.tpl+SS_objfunc.tpl+SS_write.tpl+SS_write_ssnew.tpl+SS_write_report.tpl+SS_ALK.tpl+SS_timevaryparm.tpl+SS_tagrecap.tpl SS_functions.temp -@REM combine remaining files to create ss.tpl -copy/b SS_versioninfo_330opt.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss_opt.tpl" +@REM combine remaining files to create ss3_opt.tpl +copy/b SS_versioninfo_330opt.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss3_opt.tpl" cd Compile @@ -21,7 +21,7 @@ if defined ADMB_HOME ( if exist "%ADMB_HOME%\\admb.cmd" ( @echo "-- Building ss_opt.exe with %ADMB_HOME%\admb.cmd in '%CD%' --" set CXX=g++ - %ADMB_HOME%\\admb.cmd -f ss_opt + %ADMB_HOME%\\admb.cmd -f ss3_opt goto CHECK ) ) @@ -30,7 +30,7 @@ if defined ADMB_HOME ( for /f "tokens=*" %%i in ('where admb.cmd 2^>^&1 ^| findstr "admb.cmd"') do ( @echo "-- Building ss_opt.exe with admb.cmd in '%CD%' --" set CXX=g++ - admb -f ss_opt.tpl + admb -f ss3_opt.tpl goto CHECK ) @@ -41,15 +41,15 @@ for /f "tokens=*" %%i in ('where docker.exe 2^>^&1 ^| findstr "docker.exe"') do set "ISWINDOWS10=found" ) if defined ISWINDOWS10 ( - docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2019-winlibs -f ss_opt.tpl + docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2019-winlibs -f ss3_opt.tpl ) else ( - docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2022-winlibs -f ss_opt.tpl + docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2022-winlibs -f ss3_opt.tpl ) goto CHECK ) :CHECK -if not exist ss_opt.exe ( - @echo "Error: Unable to build ss_opt.exe" +if not exist ss3_opt.exe ( + @echo "Error: Unable to build ss3_opt.exe" exit /b 1 ) diff --git a/Compile/Make_SS_safe.bat b/Compile/Make_SS_safe.bat index 930b8e38..ee0860ba 100644 --- a/Compile/Make_SS_safe.bat +++ b/Compile/Make_SS_safe.bat @@ -20,37 +20,37 @@ cd Compile if defined ADMB_HOME ( if exist "%ADMB_HOME%\\admb.cmd" ( - @echo "-- Building ss.exe with %ADMB_HOME%\admb.cmd in '%CD%' --" + @echo "-- Building ss3.exe with %ADMB_HOME%\admb.cmd in '%CD%' --" set CXX=g++ - %ADMB_HOME%\\admb.cmd ss + %ADMB_HOME%\\admb.cmd ss3 goto CHECK ) ) @REM check if admb.cmd is in path for /f "tokens=*" %%i in ('where admb.cmd 2^>^&1 ^| findstr "admb.cmd"') do ( - @echo "-- Building ss.exe with admb.cmd in '%CD%' --" + @echo "-- Building ss3.exe with admb.cmd in '%CD%' --" set CXX=g++ - admb ss.tpl + admb ss3.tpl goto CHECK ) @REM compile executable for /f "tokens=*" %%i in ('where docker.exe 2^>^&1 ^| findstr "docker.exe"') do ( - @echo "-- Building ss.exe with docker in '%CD%' --" + @echo "-- Building ss3.exe with docker in '%CD%' --" for /f "tokens=*" %%j in ('ver ^| findstr "10.0.1"') do ( set "ISWINDOWS10=found" ) if defined ISWINDOWS10 ( - docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2019-winlibs ss.tpl + docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2019-winlibs ss3.tpl ) else ( - docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2022-winlibs ss.tpl + docker run --rm --mount source=%CD%,destination=C:\compile,type=bind --workdir C:\\compile johnoel/admb:windows-ltsc2022-winlibs ss3.tpl ) goto CHECK ) :CHECK -if not exist ss.exe ( - @echo "Error: Unable to build ss.exe" +if not exist ss3.exe ( + @echo "Error: Unable to build ss3.exe" exit /b 1 ) diff --git a/GNUmakefile b/GNUmakefile index 45404ac2..158bdee7 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -16,53 +16,53 @@ export CXXFLAGS=-Wall -Wextra all: clean - $(MAKE) ss - $(MAKE) ss_opt + $(MAKE) ss3 + $(MAKE) ss3_opt docker: chmod -R 777 $(CURDIR) $(MAKE) USE_DOCKER=yes all -ss: ss.tpl +ss3: ss3.tpl ifdef USE_DOCKER ifeq ($(OS),Windows_NT) - docker run --rm --volume $(CURDIR):C:\\workdir\\ss --workdir C:\\workdir\\ss johnoel/admb:windows-ltsc2022-winlibs ss.tpl + docker run --rm --volume $(CURDIR):C:\\workdir\\ss --workdir C:\\workdir\\ss johnoel/admb:windows-ltsc2022-winlibs ss3.tpl else - docker run --rm --volume $(CURDIR):/workdir/ss:rw --workdir /workdir/ss johnoel/admb:linux ss.tpl + docker run --rm --volume $(CURDIR):/workdir/ss:rw --workdir /workdir/ss johnoel/admb:linux ss3.tpl endif else - $(MY_ADMB_HOME)admb $(DEBUG)$(STATIC_BUILD) ss.tpl + $(MY_ADMB_HOME)admb $(DEBUG)$(STATIC_BUILD) ss3.tpl endif -ss_opt: ss_opt.tpl +ss3_opt: ss3_opt.tpl ifdef USE_DOCKER ifeq ($(OS),Windows_NT) - docker run --rm --volume $(CURDIR):C:\\workdir\\ss_opt --workdir C:\\workdir\\ss_opt johnoel/admb:windows-ltsc2022-winlibs ss_opt.tpl + docker run --rm --volume $(CURDIR):C:\\workdir\\ss_opt --workdir C:\\workdir\\ss_opt johnoel/admb:windows-ltsc2022-winlibs ss3_opt.tpl else - docker run --rm --volume $(CURDIR):/workdir/ss_opt:rw --workdir /workdir/ss_opt johnoel/admb:linux ss_opt.tpl + docker run --rm --volume $(CURDIR):/workdir/ss_opt:rw --workdir /workdir/ss_opt johnoel/admb:linux ss3_opt.tpl endif else - $(MY_ADMB_HOME)admb -f $(DEBUG)$(STATIC_BUILD) ss_opt.tpl + $(MY_ADMB_HOME)admb -f $(DEBUG)$(STATIC_BUILD) ss3_opt.tpl endif -ss.tpl: SS_functions.temp - cat SS_versioninfo_330safe.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > ss.tpl +ss3.tpl: SS_functions.temp + cat SS_versioninfo_330safe.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > ss3.tpl -ss_opt.tpl: SS_functions.temp - cat SS_versioninfo_330opt.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > ss_opt.tpl +ss3_opt.tpl: SS_functions.temp + cat SS_versioninfo_330opt.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > ss3_opt.tpl SS_functions.temp: cat SS_biofxn.tpl SS_miscfxn.tpl SS_selex.tpl SS_popdyn.tpl SS_recruit.tpl SS_benchfore.tpl SS_expval.tpl SS_objfunc.tpl SS_write.tpl SS_write_ssnew.tpl SS_write_report.tpl SS_ALK.tpl SS_timevaryparm.tpl SS_tagrecap.tpl > SS_functions.temp clean: - @rm -vf ss - @rm -vf ss_opt - @rm -vf ss.tpl - @rm -vf ss_opt.tpl + @rm -vf ss3 + @rm -vf ss3_opt + @rm -vf ss3.tpl + @rm -vf ss3_opt.tpl @rm -vf SS_functions.temp - @rm -vf ss.cpp - @rm -vf ss.htp - @rm -vf ss.obj - @rm -vf ss_opt.cpp - @rm -vf ss_opt.htp - @rm -vf ss_opt.obj + @rm -vf ss3.cpp + @rm -vf ss3.htp + @rm -vf ss3.obj + @rm -vf ss3_opt.cpp + @rm -vf ss3_opt.htp + @rm -vf ss3_opt.obj diff --git a/Make_SS_330_new.sh b/Make_SS_330_new.sh index ed14b9d0..096d867f 100755 --- a/Make_SS_330_new.sh +++ b/Make_SS_330_new.sh @@ -36,7 +36,7 @@ function cat_safe_files() { # concatenate all tpl files to a single file cat SS_biofxn.tpl SS_miscfxn.tpl SS_selex.tpl SS_popdyn.tpl SS_recruit.tpl SS_benchfore.tpl SS_expval.tpl SS_objfunc.tpl SS_write.tpl SS_write_ssnew.tpl SS_write_report.tpl SS_ALK.tpl SS_timevaryparm.tpl SS_tagrecap.tpl > SS_functions.temp -cat SS_versioninfo_330safe.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > $BUILD_DIR/ss.tpl +cat SS_versioninfo_330safe.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > $BUILD_DIR/ss3.tpl } # create opt source tpl @@ -44,14 +44,14 @@ function cat_opt_files() { # concatenate all tpl files to a single file cat SS_biofxn.tpl SS_miscfxn.tpl SS_selex.tpl SS_popdyn.tpl SS_recruit.tpl SS_benchfore.tpl SS_expval.tpl SS_objfunc.tpl SS_write.tpl SS_write_ssnew.tpl SS_write_report.tpl SS_ALK.tpl SS_timevaryparm.tpl SS_tagrecap.tpl > SS_functions.temp -cat SS_versioninfo_330opt.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > $BUILD_DIR/ss_opt.tpl +cat SS_versioninfo_330opt.tpl SS_readstarter.tpl SS_readdata_330.tpl SS_readcontrol_330.tpl SS_param.tpl SS_prelim.tpl SS_global.tpl SS_proced.tpl SS_functions.temp > $BUILD_DIR/ss3_opt.tpl } # default directories SRC_DIR=. BUILD_DIR=SS330 # other defaults (safe build is the default) -BUILD_TYPE=ss +BUILD_TYPE=ss3 WARNINGS=off DEBUG=off GREP= @@ -101,10 +101,10 @@ while [ "$1" != "" ]; do -p ) STATICFLAG=-p ;; # build safe version - -f | --safe ) BUILD_TYPE=ss + -f | --safe ) BUILD_TYPE=ss3 ;; # build fast version - -o | --opt ) BUILD_TYPE=ss_opt + -o | --opt ) BUILD_TYPE=ss3_opt OPTFLAG=-f ;; esac @@ -124,10 +124,10 @@ if [[ ! -d "$BUILD_DIR" ]]; then mkdir -p $BUILD_DIR fi case $BUILD_TYPE in - ss_opt ) grep "opt" SS_versioninfo_330opt.tpl + ss3_opt ) grep "opt" SS_versioninfo_330opt.tpl cat_opt_files ;; - ss ) grep "safe" SS_versioninfo_330safe.tpl + ss3 ) grep "safe" SS_versioninfo_330safe.tpl cat_safe_files ;; esac From ffdfd0543066e50fc170a7f6454ceedd2685a8a3 Mon Sep 17 00:00:00 2001 From: e-gugliotti-NOAA Date: Wed, 21 Feb 2024 09:23:53 -0500 Subject: [PATCH 08/17] fix ubuntu files to delete --- .github/workflows/build-ss3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-ss3.yml b/.github/workflows/build-ss3.yml index 0348e82b..66c9a361 100644 --- a/.github/workflows/build-ss3.yml +++ b/.github/workflows/build-ss3.yml @@ -262,7 +262,7 @@ jobs: if: matrix.config.os == 'ubuntu-latest' run: | cd SS330 - rm *.obj *.htp *.cpp ss_opt.tpl ss.tpl + rm *.obj *.htp *.cpp ss3_opt.tpl ss3.tpl mv ss3 ss3_linux mv ss3_opt ss3_opt_linux From 8b0700a6048231165f47418bdd04b3b37ae19c5a Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 21 Feb 2024 13:32:18 -0800 Subject: [PATCH 09/17] try to remove guard warning --- SS_write_report.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/SS_write_report.tpl b/SS_write_report.tpl index a1ede57a..217dfddc 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -1390,6 +1390,7 @@ FUNCTION void write_bigoutput() { SS2out << " SmryNum_SX:" << gg << "_GP:" << gp; } + SS2out << " mature_bio mature_num "; for (f = 1; f <= Nfleet; f++) From 908ff51021c9fe4faf269e891b40e2ba555116d9 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 21 Feb 2024 13:46:03 -0800 Subject: [PATCH 10/17] try again with more whitespace --- SS_write_report.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/SS_write_report.tpl b/SS_write_report.tpl index 217dfddc..9874e532 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -1385,6 +1385,7 @@ FUNCTION void write_bigoutput() { SS2out << " SmryBio_SX:" << gg << "_GP:" << gp; } + for (gg = 1; gg <= gender; gg++) for (gp = 1; gp <= N_GP; gp++) { From bae8af42ef6cd2c7f0fd518c50f7545028ca2ce0 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Wed, 21 Feb 2024 16:14:02 -0800 Subject: [PATCH 11/17] create local warn option --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2d39ecb0..2f77a86a 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ ss_trans.tpl ~$*.* Compile/ss.log Compile/ss3.log +make_SS_warn.bat .Rproj.user *.Rproj .Rhistory From c233c61783785fd4a606e2f67fa8e64665c7b354 Mon Sep 17 00:00:00 2001 From: Ian Taylor Date: Wed, 21 Feb 2024 16:42:42 -0800 Subject: [PATCH 12/17] add additional brackets to test warnings about indent --- SS_write_report.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SS_write_report.tpl b/SS_write_report.tpl index 9874e532..4054e822 100644 --- a/SS_write_report.tpl +++ b/SS_write_report.tpl @@ -1387,11 +1387,12 @@ FUNCTION void write_bigoutput() } for (gg = 1; gg <= gender; gg++) + { for (gp = 1; gp <= N_GP; gp++) { SS2out << " SmryNum_SX:" << gg << "_GP:" << gp; } - + } SS2out << " mature_bio mature_num "; for (f = 1; f <= Nfleet; f++) From dcda1ac10c9b3c1b2c230a6c8902983982e0e1c5 Mon Sep 17 00:00:00 2001 From: Ian Taylor Date: Wed, 21 Feb 2024 16:56:19 -0800 Subject: [PATCH 13/17] make build-warnings workflow robust to mismatched warnings --- .github/workflows/build-ss3-warnings.yml | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-ss3-warnings.yml b/.github/workflows/build-ss3-warnings.yml index 5f3f176f..950c226e 100644 --- a/.github/workflows/build-ss3-warnings.yml +++ b/.github/workflows/build-ss3-warnings.yml @@ -64,18 +64,20 @@ jobs: txt <- readLines("warnings.txt", encoding = "UTF-8" ) warn_line <- grep(pattern = "g++ -c -std=c++17 -O3 -Wall -Wextra -D_USE_MATH_DEFINES -DUSE_ADMB_CONTRIBS", x = txt, fixed = TRUE) end_warn_line <- grep(pattern = "*** Linking: ss.obj ", x = txt, fixed = TRUE) - txt <- txt[(warn_line+2):(end_warn_line-1)] - rm_warn_start_lines <- grep(pattern = "/usr/local/admb/include/admodel.h", x = txt, fixed = TRUE) - all_warning_end_lines <- grep(pattern = "^", x = txt, fixed = TRUE) - to_rm <- NULL - for (l in rm_warn_start_lines) { - tmp_end_line <- min(all_warning_end_lines[all_warning_end_lines > l]) - to_rm <- c(to_rm, l:tmp_end_line) - } - txt <- txt[-to_rm] - n_errors <- length(grep(pattern = "^", x = txt)) - message("There are ", n_errors, " warning messages related to SS.") - write.table(n_errors, "n_warn.txt") + if (length(warn_line) == 1 & length(end_warn_line) == 1) { + txt <- txt[(warn_line+2):(end_warn_line-1)] + rm_warn_start_lines <- grep(pattern = "/usr/local/admb/include/admodel.h", x = txt, fixed = TRUE) + all_warning_end_lines <- grep(pattern = "^", x = txt, fixed = TRUE) + to_rm <- NULL + for (l in rm_warn_start_lines) { + tmp_end_line <- min(all_warning_end_lines[all_warning_end_lines > l]) + to_rm <- c(to_rm, l:tmp_end_line) + } + txt <- txt[-to_rm] + n_errors <- length(grep(pattern = "^", x = txt)) + message("There are ", n_errors, " warning messages related to SS.") + write.table(n_errors, "n_warn.txt") + } writeLines(txt, "warnings_ss.txt") # warn_line <- grep(pattern = "compiling a second time to get warnings", x = txt, fixed = TRUE) # txt <- txt[(warn_line+1):length(txt)] From 657cb751742145e741ec4e9a1ae893b78337a95f Mon Sep 17 00:00:00 2001 From: Elizabeth Perl Date: Thu, 22 Feb 2024 16:03:10 +0000 Subject: [PATCH 14/17] fix build warnings and warnings ref --- .github/workflows/build-ss3-warnings.yml | 20 +++++++------------ .../reference_files/warnings_ss_ref.txt | 20 +++++++++++-------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-ss3-warnings.yml b/.github/workflows/build-ss3-warnings.yml index 950c226e..f1343a17 100644 --- a/.github/workflows/build-ss3-warnings.yml +++ b/.github/workflows/build-ss3-warnings.yml @@ -61,21 +61,15 @@ jobs: # Runs a set of commands using the runners shell - name: Use R to parse warnings output run: | - txt <- readLines("warnings.txt", encoding = "UTF-8" ) + txt <- readLines("warnings.txt", encoding = "UTF-8") warn_line <- grep(pattern = "g++ -c -std=c++17 -O3 -Wall -Wextra -D_USE_MATH_DEFINES -DUSE_ADMB_CONTRIBS", x = txt, fixed = TRUE) - end_warn_line <- grep(pattern = "*** Linking: ss.obj ", x = txt, fixed = TRUE) + end_warn_line <- grep(pattern = "*** Linking: ss3.obj ", x = txt, fixed = TRUE) if (length(warn_line) == 1 & length(end_warn_line) == 1) { - txt <- txt[(warn_line+2):(end_warn_line-1)] - rm_warn_start_lines <- grep(pattern = "/usr/local/admb/include/admodel.h", x = txt, fixed = TRUE) - all_warning_end_lines <- grep(pattern = "^", x = txt, fixed = TRUE) - to_rm <- NULL - for (l in rm_warn_start_lines) { - tmp_end_line <- min(all_warning_end_lines[all_warning_end_lines > l]) - to_rm <- c(to_rm, l:tmp_end_line) - } - txt <- txt[-to_rm] - n_errors <- length(grep(pattern = "^", x = txt)) - message("There are ", n_errors, " warning messages related to SS.") + txt <- txt[(warn_line+3):(end_warn_line-1)] + rm_warn_start_lines <- grep(pattern = "/usr/local/admb/include/admodel.h: ", x = txt, fixed = TRUE, invert = TRUE) + txt <- txt[rm_warn_start_lines] + n_errors <- length(grep(pattern = "^ [0-9]", x = txt)) + message("There are ", n_errors, " warning messages related to SS3.") write.table(n_errors, "n_warn.txt") } writeLines(txt, "warnings_ss.txt") diff --git a/.github/workflows/reference_files/warnings_ss_ref.txt b/.github/workflows/reference_files/warnings_ss_ref.txt index c7b50e46..d92da4e6 100644 --- a/.github/workflows/reference_files/warnings_ss_ref.txt +++ b/.github/workflows/reference_files/warnings_ss_ref.txt @@ -1,8 +1,12 @@ -In file included from ss.cpp:7: -ss.cpp: In member function 'void model_parameters::evaluate_the_objective_function()': -ss.cpp:27544:9: warning: this 'for' clause does not guard... [-Wmisleading-indentation] -27544 | for (i = 1; i <= Svy_N_fleet(f); i++) - | ^~~ -ss.cpp:27571:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' -27571 | surv_like(f) = sum(Svy_like_I(f)); - | ^~~~~~~~~ +/usr/local/admb/include/admodel.h:1915:38: warning: unused parameter 'gradients' [-Wunused-parameter] + 1915 | virtual void report(const dvector& gradients){;}; + | ~~~~~~~~~~~~~~~^~~~~~~~~ +/usr/local/admb/include/admodel.h:2501:43: warning: unused parameter 'ofs' [-Wunused-parameter] + 2501 | virtual void save_value(const ofstream& ofs, int prec,const dvector&, + | ~~~~~~~~~~~~~~~~^~~ +/usr/local/admb/include/admodel.h:2501:52: warning: unused parameter 'prec' [-Wunused-parameter] + 2501 | virtual void save_value(const ofstream& ofs, int prec,const dvector&, + | ~~~~^~~~ +/usr/local/admb/include/admodel.h:2502:10: warning: unused parameter 'offset' [-Wunused-parameter] + 2502 | int& offset){} + | ~~~~~^~~~~~ From 868105e96d1debb6574e72c73a725c59a83218f6 Mon Sep 17 00:00:00 2001 From: e-gugliotti-NOAA Date: Thu, 22 Feb 2024 11:23:47 -0500 Subject: [PATCH 15/17] remove warnings_ss.txt --- warnings_ss.txt | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 warnings_ss.txt diff --git a/warnings_ss.txt b/warnings_ss.txt deleted file mode 100644 index 4619e22c..00000000 --- a/warnings_ss.txt +++ /dev/null @@ -1,9 +0,0 @@ -In file included from ss.cpp:7: -In file included from ss.cpp:7: -ss.cpp: In member function ‘void model_parameters::write_bigoutput()’: -ss.cpp:34714:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] -34714 | for (gg = 1; gg <= gender; gg++) - | ^~~ -ss.cpp:34719:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ -34719 | SS2out << " mature_bio mature_num "; - | ^~~~~~ From 0e00dffb748b9e78df69b2c317af270d812002bc Mon Sep 17 00:00:00 2001 From: e-gugliotti-NOAA Date: Thu, 22 Feb 2024 11:26:43 -0500 Subject: [PATCH 16/17] small change to contributing.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 571ba1e9..4e2a655a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ All code contributions should be submitted as pull requests to be reviewed by an 3. Add ADMB to the PATH or use the ADMB command window for the following commands. 4. On Linux or Mac: - Change directory to the cloned Stock Synthesis repository and use the script [Make_SS_330_new.sh](https://github.com/nmfs-ost/ss3-source-code/blob/main/Make_SS_330_new.sh) by calling `./Make_SS_330_new.sh`. To see all options for the function, use `./Make_SS_330_new.sh --help`. - - Follow the instructions found in the [GNUmakefile](https://github.com/nmfs-ost/ss3-source-code/blob/main/GNUmakefile) which will allow you to compile Stock Synthesis using the command `~/stock-synthesis$ make` within a command line opened in the cloned Stock Synthesis repository folder. + - Follow the instructions found in the [GNUmakefile](https://github.com/nmfs-ost/ss3-source-code/blob/main/GNUmakefile) which will allow you to compile Stock Synthesis using the command `~/ss3-source-code$ make` within a command line opened in the cloned Stock Synthesis repository folder. 6. On Windows: Change directory to the cloned Stock Synthesis repository's [Compile](https://github.com/nmfs-ost/ss3-source-code/tree/main/Compile) subfolder and call the [Make_SS_safe batch script](https://github.com/nmfs-ost/ss3-source-code/blob/main/Compile/Make_SS_safe.bat) to build the "safe" version of Stock Synthesis. (to build the fast (aka optimized) version of Stock Synthesis, call the Make_SS_fast.bat batch scripts instead). Upon calling the batch script, SS3 will be built in the Compile subfolder. # Still have a question on the contributing workflow? From 7a2fa55d3da11d34f6a021511190343dd150af85 Mon Sep 17 00:00:00 2001 From: RickMethot Date: Fri, 23 Feb 2024 10:16:22 -0800 Subject: [PATCH 17/17] add make_ss_warn.bat --- .gitignore | 1 - Compile/Make_SS_warn.bat | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Compile/Make_SS_warn.bat diff --git a/.gitignore b/.gitignore index 2f77a86a..2d39ecb0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ ss_trans.tpl ~$*.* Compile/ss.log Compile/ss3.log -make_SS_warn.bat .Rproj.user *.Rproj .Rhistory diff --git a/Compile/Make_SS_warn.bat b/Compile/Make_SS_warn.bat new file mode 100644 index 00000000..3fdb0d20 --- /dev/null +++ b/Compile/Make_SS_warn.bat @@ -0,0 +1,33 @@ + +::compiling ss.exe (safe executable) with generic path +::requires "Compile" directory in the same directory as the .tpl files and this .bat file + +cd .. + +::deleted temporary file +del SS_functions.temp + +::create SS_functions.temp file combining various functions +copy/b SS_biofxn.tpl+SS_miscfxn.tpl+SS_selex.tpl+SS_popdyn.tpl+SS_recruit.tpl+SS_benchfore.tpl+SS_expval.tpl+SS_objfunc.tpl+SS_write.tpl+SS_write_ssnew.tpl+SS_write_report.tpl+SS_ALK.tpl+SS_timevaryparm.tpl+SS_tagrecap.tpl SS_functions.temp + +::combine remaining files to create ss3.tpl +copy/b SS_versioninfo_330safe.tpl+SS_readstarter.tpl+SS_readdata_330.tpl+SS_readcontrol_330.tpl+SS_param.tpl+SS_prelim.tpl+SS_global.tpl+SS_proced.tpl+SS_functions.temp "Compile\ss3.tpl" + +::path=c:\admb;C:\rtools40\mingw64\bin;%path% + +cd Compile + +if exist ss3.exe ( + if exist ss3_old.exe ( + del ss3old.exe + ) + ren ss3.exe ss3_old.exe +) + +tpl2cpp ss3 + +g++ -c -std=c++14 -O2 -D_FILE_OFFSET_BITS=64 -DUSE_ADMB_CONTRIBS -D_USE_MATH_DEFINES -I. -I"C:\ADMB-13.1\include" -I"C:\ADMB-13.1\include\contrib" -Wall -Wextra -o ss3.obj ss3.cpp + +g++ -static -o ss3.exe ss3.obj "C:\ADMB-13.1\lib\libadmb-contrib-mingw64-g++8.a" + +dir *.exe