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