@@ -49,19 +49,18 @@ This repository is not complete at this time.
49
49
50
50
## Simple Setup
51
51
52
- To set up this project to run some of the analysis scripts contained within, you
53
- can simply invoke
54
-
55
- ``` console
56
- source setup_all.sh
57
- ```
58
-
59
- sourcing is necessary to make sure that the Julia project is set up correctly.
60
- You will need to have Julia, Cargo, and RStudio installed in order for this to run without
61
- errors. (Note: This script requires the use of a Unix based operating system, such as
62
- MacOS or Linux. Windows users may invoke this by setting up the subsystem for Linux)
63
-
52
+ Note: These instructions are intended for Mac and Linux users. Windows users
53
+ may follow along by using the
54
+ [ Windows Subsystem for Linux] ( https://learn.microsoft.com/en-us/windows/wsl/install )
55
+ and
56
+ [ Windows Terminal] ( https://apps.microsoft.com/detail/9n0dx20hk701?ocid=webpdpshare )
57
+ which allow for the use of Linux commands within a Windows environment. Windows users
58
+ will also need to install the appropriate subsystem, for which we recommend
59
+ [ Ubuntu 22.04.5 LTS] ( https://apps.microsoft.com/detail/9pn20msr04dw?ocid=webpdpshare )
60
+ due to the ease-of-use and quantity of support documentation for Ubuntu users.
64
61
62
+ To set up this project to run some of the analysis scripts contained within, you
63
+ must make sure that you have Cargo, Julia, and R (or RStudio) installed.
65
64
To install Cargo, visit the
66
65
[ Rustup Download Page] ( https://doc.rust-lang.org/cargo/getting-started/installation.html )
67
66
and follow the instructions for your operating system. Likewise, to install Julia,
@@ -78,9 +77,19 @@ than installing from the Julia website.)
78
77
> :warning : There appears to be a memory leak bug that sometimes appears when running the ` redist `
79
78
> package. This memory leak appears to be an issue with the R interpreter not freeing memory
80
79
> appropriately when the R base language and the relevant RCpp and Rarmadillo libraries
81
- > are compiled with an earler version of gcc. To avoid this bug, please make sure to have
82
- > R version >= 4.4.2 and a gcc released after 15 May 2024. Relevant gdal and fortran compilation
83
- > libraries should also be up-to-date.
80
+ > are compiled with an earler version of gcc/gfortran. To avoid this bug, please make sure to have
81
+ > R version >= 4.4.2 and a verson ofgcc released after 15 May 2024. Relevant gdal and fortran
82
+ > compilation libraries should also be up-to-date.
83
+
84
+
85
+ After making sure the appropriate programming languages are installed on your
86
+ machine, you can simply invoke
87
+
88
+ ``` console
89
+ source setup_all.sh
90
+ ```
91
+
92
+ sourcing is necessary to make sure that the Julia project is set up correctly.
84
93
85
94
## More Detailed Setup instructions in case the script fails
86
95
@@ -116,11 +125,11 @@ To run the Sequential Monte Carlo (SMC) code for this repository, you will need
116
125
appropriate version of R (you don't _ need_ RStudio, but it is nice to have) installed, as
117
126
well as the following packages:
118
127
119
- - argparser
120
- - dplyr
121
- - ggplot2
122
- - remotes
123
- - sf
128
+ - ` argparser `
129
+ - ` dplyr `
130
+ - ` ggplot2 `
131
+ - ` remotes `
132
+ - ` sf `
124
133
125
134
To install these packages, you can simply invoke the R terminal (or open RStudio)
126
135
and call
@@ -183,12 +192,50 @@ If you are on mac, then the corresponding brew packages would be:
183
192
brew update && brew install \
184
193
gdal \
185
194
geos \
195
+ gfortran \
186
196
proj \
187
197
udunits \
188
198
openssl \
189
199
cairo
190
200
```
191
201
202
+ In some versions of R, especially on newer Mac installations, there can be a slight issue
203
+ during the installation of the ` redist ` package. Specifically, you might see something like
204
+
205
+ ``` console
206
+ ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0' not found
207
+ ld: warning: search path '/opt/gfortran/lib' not found
208
+ ld: library 'gfortran' not found
209
+ clang++: error: linker command failed with exit code 1 (use -v to see invocation)
210
+ make: *** [redist.so] Error 1
211
+ ERROR: compilation failed for package 'redist'
212
+ * removing '/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/redist'
213
+ Warning message:
214
+ In i.p(...) :
215
+ installation of package '/var/folders/r_/xjlnv23j48v1p28d0tq18wcc0000gn/T//RtmpxA09fJ/file130a75c9fcf76/redist_4.1.2.tar.gz' had non-zero exit status
216
+ ```
217
+
218
+ In this message, the key line is
219
+
220
+ ``` console
221
+ ld: warning: search path '/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0' not found
222
+ ```
223
+
224
+ which indicates that R is trying to grab a gfortran library that was not installed with the
225
+ brew package manager. The easiest way to try and fix this is to just adjust the compilation
226
+ flags for R (i.e. edit the file ` ~/.R/Makevars/ ` ). Most likely, you have never touched
227
+ this file before, so the easiest way to fix this is to invoke the following from the console:
228
+
229
+ ``` console
230
+ mkdir -p ~/.R && echo "CC = clang
231
+ CXX = clang++
232
+ FC = /opt/homebrew/bin/gfortran
233
+ F77 = /opt/homebrew/bin/gfortran
234
+ FLIBS = -L/opt/homebrew/opt/gcc/lib/gcc/current -lgfortran -lquadmath -lm" > ~/.R/Makevars
235
+ ```
236
+
237
+
238
+
192
239
### Other dependencies
193
240
194
241
In order to convert the "atlas" format that is output by the MSMS code to an assignment-vector
0 commit comments