Skip to content

Commit

Permalink
update all files to make ss3 to be ss3 and ss3_opt
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA committed Feb 15, 2024
1 parent 83a70eb commit cf4c3b5
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 75 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ss3-warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ 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
- 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
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/build-ss3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-ss3-bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ 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
- 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-ss3-mcmc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-ss3-no-est.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ 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
- 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-ss3-with-est.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ 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
- 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-r4ss-with-ss3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ 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
- 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
Expand Down
16 changes: 8 additions & 8 deletions Compile/Make_SS_fast.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ 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

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
)
)
Expand All @@ -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
)

Expand All @@ -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
)
18 changes: 9 additions & 9 deletions Compile/Make_SS_safe.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
48 changes: 24 additions & 24 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit cf4c3b5

Please sign in to comment.