forked from ElsevierSoftwareX/SOFTX-D-16-00023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
instructions.txt
115 lines (65 loc) · 2.96 KB
/
instructions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
=============
Linux Ubuntu:
1. Install netcdf and C and Fortran compilers on Linux Ubuntu (full howto: https://cloud-gc.readthedocs.io/en/stable/chapter04_developer-guide/install-basic.html)
Update package metadata:
$ sudo apt-get update
Install GNU compiler:
$ sudo apt-get install gcc gfortran
Executables will be installed to /usr/bin/:
$ which gcc gfortran
/usr/bin/gcc
/usr/bin/gfortran
Check versions:
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
...
$ gfortran --version
GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
...
Install netcdf
$ sudo apt-get install libnetcdf-dev libnetcdff-dev
Check NetCDF-C configuration:
$ nc-config --all
This netCDF 4.4.0 has been built with the following features:
...
Check NetCDF-Fortran configuration:
$ nf-config --all
This netCDF-Fortran 4.4.3 has been built with the following features:
...
--prefix -> /usr
--includedir-> /usr/include
--version -> netCDF-Fortran 4.4.3
--includedir will be used to include this NetCDF library when compiling Fortran code.
2. Navigate to SOFTX-D-16-00023
$ cd SOFTX-D-16-00023
and modify NA and NI paths in EBM/src/Makefile and paths in EBM/preprocess/preprocess.sh according to the ones indicated by --includedir above.
3. Navigate to EBM/src/
$ cd EBM/src/
and compile the EBM code:
$ make -f Makefile
It might be necessary to remove the following line from Makefile if it hinders compiling (the line seems to be required for MacOS users)
FC=gfortran -fallow-argument-mismatch
4. Give executable permissions to EBM program:
$ chmod +x ebm.sh
5. Run the EBM program:
$ ./ebm.sh
===========
MacOS
A. Install gfortran compiler using Homebrew: https://www.macinchem.org/reviews/cheminfo/cheminfoMacUpdate.php
B. Install netcdf using this command in the Terminal
brew install netcdf
C. Modify paths in EBM/scr/Makefile and /preprocess/preprocess.sh (see pt 2. in Linux version)
D. At the beginning of Makefile add the following line
FC=gfortran -fallow-argument-mismatch
E. Compile program and change permissions (see points 3., 4. in Linux version)
F. Run program
EBM/src/ebm.sh
============
Git-ignoring files:
In addition to .gitignore (which does not ignore existing, modified files) one can choose to ingore the two files with local paths, and all the files in EBM/output/directory by running the follwoging two commands:
$ git update-index --assume-unchanged EBM/src/Makefile EBM/preprocess/preprocess.sh
$ git ls-files -z EBM/output/ | xargs -0 git update-index --assume-unchanged
In order to revoke ignoring with the above method run:
$ git update-index --no-assume-unchanged <file>
In order to override ignoring by .gitignore, change the local.gitignore content, or run:
$ git add -f <file>