Skip to content

Commit

Permalink
doc: Update install instructions on readme
Browse files Browse the repository at this point in the history
For users and developers, where the information for the latter was
moved to the collaborative workflow see
NOAA-FIMS/collaborative_workflow#146.

A badge for R-universe was placed in the list of all badges!

Work was done by @k-doering-NOAA with suggestions by @kellijohnson-NOAA

Part of NOAA-FIMS/collaborative_workflow#98
  • Loading branch information
k-doering-NOAA authored and kellijohnson-NOAA committed Jun 21, 2024
1 parent 2c16ff4 commit f071a64
Showing 1 changed file with 7 additions and 35 deletions.
42 changes: 7 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<!-- badges: start -->
[![FIMS status badge](https://noaa-fims.r-universe.dev/badges/FIMS)](https://noaa-fims.r-universe.dev/FIMS)
[![R-CMD-check](https://github.com/NOAA-FIMS/FIMS/workflows/call-r-cmd-check/badge.svg)](https://github.com/NOAA-FIMS/FIMS/actions)
[![Codecov test coverage](https://codecov.io/gh/NOAA-FIMS/FIMS/branch/main/graph/badge.svg)](https://app.codecov.io/gh/NOAA-FIMS/FIMS?branch=main)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
Expand All @@ -9,46 +10,17 @@ The repository for development of FIMS.

The NOAA Fisheries Integrated Modeling System is a software system designed and architected to support next-generation fisheries stock assessment, ecosystem, and socioeconomic modeling. A team of experts within NOAA Fisheries is designing and developing the system, and we are advised by the FIMS Council which includes academic, industry, and international partners. The roles of internal and external collaborators are outlined in the [governance section](https://noaa-fims.github.io/collaborative_workflow/fims-governance.html) of our developer guide. We plan to have an operational software system that is released to the public in 2023. In the meantime, users and developers are welcome to submit feedback using Github issues. Please use the issues under [collaborative workflow](https://github.com/NOAA-FIMS/collaborative_workflow/issues) to make suggestions about the [developer guide](https://noaa-fims.github.io/collaborative_workflow/) and the issues under the FIMS software [repo](https://github.com/NOAA-FIMS/FIMS/issues) for software design and development feedback. You can follow the team discussion [here](https://github.com/NOAA-FIMS/FIMS/discussions).

## Installation
## Installing from R

The following software is required:
Install the latest precompiled version [FIMS from R universe](https://noaa-fims.r-universe.dev/FIMS) within R:

- R version 4.0.0 or newer (or RStudio version 1.2.5042 or newer)
- the `remotes` R package
- `TMB` version 1.8.0 or newer (install instructions are [here](https://github.com/kaskr/adcomp/wiki/Download).)

### Windows Users

- Rtools4 (available from [here](https://cran.r-project.org/bin/windows/Rtools/rtools40.html))

#### Fixing Fatal Error

Windows users can expect to see some derivative of the following error message in their R session if they have not yet set some flags using {withr}.
```r
install.packages("FIMS", repos = c("https://noaa-fims.r-universe.dev", "https://cloud.r-project.org"))
```
Fatal error: can't write <xxx> bytes to section .text of FIMS.o: 'file too big
```
You can easily fix this by running the following line in your local R session. Note that this call will need to be repeated each time you open a new session.
```
withr::local_options(pkg.build_extra_flags = FALSE)
```
This fix does not work when `devtools::test()` is called and FIMS is re-compiled. The call to `devtools::test()` in this case overwrites the local options set by withr. Compile FIMS first using `devtools::load_all()` prior to running `devtools::test()`.

This fix removes the debugger flag `-O0 -g` from being automatically inserted for certain devtools calls (e.g. `devtools::load_all()`). Windows developers wanting to compile FIMS with the debugger turned on will need to run the above script in addition to manually modifying the call to PKG_CXXFLAGS in the [Makevars.win](https://github.com/NOAA-FIMS/FIMS/blob/doc-install/src/Makevars.win) file in the src directory to the following:
## Local Install for Developers

```
PKG_CXXFLAGS = -DTMB_MODEL -DTMB_EIGEN_DISABLE_WARNINGS -O1 -g
```
To turn off the debugger flag, remove the `-O1 -g` flag:
```
PKG_CXXFLAGS = -DTMB_MODEL -DTMB_EIGEN_DISABLE_WARNINGS
```

### Installing from R

```
remotes::install_github("NOAA-FIMS/FIMS")
library(FIMS)
```
Follow instructions in the [Collaborative Workflow Chapter on Developer Software and Installation](https://noaa-fims.github.io/collaborative_workflow/developer-software-and-installation-guide.html).

## Getting Help
Please report bugs along with a minimal reproducible example on github [issues](https://github.com/NOAA-FIMS/FIMS/issues)
Expand Down

0 comments on commit f071a64

Please sign in to comment.