Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/build_run_SETAS1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:

- name: checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Ensures all branches and tags are fetched

Expand All @@ -39,13 +39,13 @@ jobs:
r-version: '4.2.0'


- name: Compile and Run Atlantis in Ubuntu 18.04 using Docker
- name: Compile and Run Atlantis in Ubuntu 20.04 using Docker
run: |
docker run --rm -v $(pwd):/workspace -w /workspace ubuntu:18.04 bash -c "
docker run --rm -v $(pwd):/workspace -w /workspace ubuntu:20.04 bash -c "
TZ=America/New_York &&
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &&
apt-get update &&
apt-get install -yq build-essential autoconf libnetcdf-dev libxml2-dev libproj-dev subversion valgrind dos2unix gawk nano r-base git &&
apt-get install -yq build-essential autoconf libnetcdf-dev libxml2-dev libproj-dev subversion valgrind dos2unix gawk nano r-base r-base-dev git &&
cd atlantis && aclocal && autoheader && autoconf && automake -a && ./configure --enable-rassesslink && make && make install &&
echo 'Now run the model!' &&
cd ../example &&
Expand Down
24 changes: 11 additions & 13 deletions atlantis/PreRules.am
Original file line number Diff line number Diff line change
Expand Up @@ -100,30 +100,28 @@ endif
# AM_CFLAGS += -D SS3_LINK_ENABLED -I$(top_srcdir)/atSS3Link/include
#endif

if RASSESS_LINK_ENABLED
AM_CFLAGS += -D RASSESS_LINK_ENABLED

# NOTE: nested if statments
# For the R links
# A working R installation is required.
# R must have been built with the '--enable-R-shlib' option enabled to provide the R shared library
# Ensure the R_HOME environment variable is set appropriately
#
# R_HOME = $(shell R RHOME)
# on Ubuntu Linux
if OS_LINUX
R_HOME = /usr/lib/R
R_BASE = /usr/lib/R
endif
# on OS X
if OS_MACOS
R_BASE = /Library/Frameworks/R.framework/Resources
R_HOME = /Library/Frameworks/R.framework/Resources
R_BASE = /usr/lib/R
R_HOME = /usr/lib/R
else
#if OS_MACOS
R_BASE = /Library/Frameworks/R.framework/Resources
R_HOME = /Library/Frameworks/R.framework/Resources
endif

AM_CFLAGS += -I$(R_BASE)/include -I/usr/share/R/include
if RASSESS_LINK_ENABLED
AM_CFLAGS += -D RASSESS_LINK_ENABLED
AM_CFLAGS += -I$(R_BASE)/include -I/usr/share/R/include
AM_LDFLAGS = -L$(R_BASE)/lib
LIBS += -L$(R_BASE)/lib -lR
endif

#fetching repo version from git
AM_CFLAGS += -DRELEASE_VERSION=\"$(RELEASE_VERSION)\"

1 change: 1 addition & 0 deletions atlantis/atecology/atprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,7 @@ void Calculate_Catch(MSEBoxModel *bm, BoxLayerValues *boxLayerInfo, FILE *llogfp
if (FunctGroupArray[guild].isVertebrate == TRUE) {
FunctGroupArray[guild].SizeNumCaught[cohort][nf][bm->current_box] += bm->FishingResults[nf][CatchAtAge_result_id];
FunctGroupArray[guild].SizeNumDiscard[cohort][nf][bm->current_box] += bm->FishingResults[nf][DiscardsAtAge_result_id];
FunctGroupArray[guild].SizeCaught[cohort][nf][bm->current_box] += bm->FishingResults[nf][Catch_result_id];
}
} else {
bm->RecCatch[bm->current_box][guild][nf] += bm->FishingResults[nf][Catch_result_id];
Expand Down
5 changes: 4 additions & 1 deletion atlantis/atlantisUtil/atUtilGroupIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ int Util_Read_Functional_Group_XML(MSEBoxModel *bm, char *fileName, FILE *llogfp
FunctGroupArray[i].X_RS = Util_Alloc_Init_1D_Double(FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].RAssessSpringSurvey = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].RAssessAutumnSurvey = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);

FunctGroupArray[i].RAssessSpringSurveySize = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].RAssessAutumnSurveySize = Util_Alloc_Init_2D_Double(bm->nbox, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].min_wgt = Util_Alloc_Init_1D_Double(FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].max_wgt = Util_Alloc_Init_1D_Double(FunctGroupArray[i].numCohortsXnumGenes, 0.0);
FunctGroupArray[i].rolling_wgt = Util_Alloc_Init_2D_Double(bm->K_rolling_cap_num + 1, FunctGroupArray[i].numCohortsXnumGenes, 0.0);
Expand Down Expand Up @@ -1289,6 +1290,8 @@ void Free_Functional_Group_Memory(MSEBoxModel *bm) {
free4d(FunctGroupArray[i].boxPopRatio);
free2d(FunctGroupArray[i].RAssessSpringSurvey);
free2d(FunctGroupArray[i].RAssessAutumnSurvey);
free2d(FunctGroupArray[i].RAssessSpringSurveySize);
free2d(FunctGroupArray[i].RAssessAutumnSurveySize);
free1d(FunctGroupArray[i].min_wgt);
free1d(FunctGroupArray[i].max_wgt);
free2d(FunctGroupArray[i].rolling_wgt);
Expand Down
3 changes: 3 additions & 0 deletions atlantis/atlantisUtil/include/atFunctGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ typedef struct {
double ***SizeCaught; /**< Sampled catch - size in catch */
double **RAssessSpringSurvey; /**< Spring survey abundance - for RAssess */
double **RAssessAutumnSurvey; /**< Autumn survey abundance - for RAssess */
double **RAssessSpringSurveySize; /**< Spring survey size - for RAssess */
double **RAssessAutumnSurveySize; /**< Autumn survey size - for RAssess */


/* Used in tracking informaiton for calcualting system cap in fisheries */
double *min_wgt;
Expand Down
7 changes: 6 additions & 1 deletion atlantis/atlantismain/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ atlantisMergeddir=$(includedir)/atlantismain
atlantisMerged_SOURCES = atlantismain.c atlantisboxmodel.h

atlantisMerged_LDADD = -latlantisutil -latassess -latphysics -latecology -lateconomic -latmanage -latharvest \
-latimplementation -latphysics -latConvertAtlantis -latlantisutil -lsjwlib -latSS3Link
-latimplementation -latphysics -latConvertAtlantis -latlantisutil -lsjwlib -latSS3Link \
$(LIBS)

SVNWCPATH = -D'ATLANTIS_WCPATH="$(shell svn info ../| grep URL | sed 's/URL: //g')"'
SVNWCDATE = -D'ATLANTIS_WCDATE="$(shell svn info ../| grep "Last Changed Date:" | sed 's/Last Changed Date: //g')"'
Expand Down Expand Up @@ -61,6 +62,10 @@ atlantisMerged_INCLUDES += -I$(top_srcdir)/atCLAMLink/include
atlantisMerged_DEPENDENCIES += $(top_srcdir)/atCLAMLink/libatCLAMLink.a
endif

if RASSESS_LINK_ENABLED
LIBDIRS += -L$(R_BASE)/lib
atlantisMerged_LDADD += -lR
endif

#if SS3_LINK_ENABLED
#LIBDIRS += -L$(top_srcdir)/atSS3Link
Expand Down
Loading
Loading