-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
91 lines (65 loc) · 3.11 KB
/
INSTALL
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
PREREQUISITES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- GNU compilers
- Available from most package managers
- To use other compilers, you will need to modify CMakeLists.txt
- CMake
- Version 3.12 or higher
- Available from most package managers
- Download CMake directly at: https://cmake.org/download
- Make
- Standard on most *nix operating systems
- LAPACK
- I use LAPACK version 3.9.0 but older versions should work fine
- Available at: http://www.netlib.org/lapack
- Hdef can be compiled without LAPACK; some programs will not work at all, and a few
others will have LAPACK-dependent options disabled
- I recommend installing LAPACK with the same compilers as Hdef
COMPILING HDEF DIRECTIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I did not think too hard about other users installing the software, so this process is a little
haphazard. Sorry. (It is better now than it was!)
!! NOTE: THERE IS NO LONGER A CONFIGURATION SCRIPT OR A MAKEFILE
!! HDEF IS NOW CONFIGURED AND BUILT WITH CMAKE!
1. Go to the Hdef directory in your terminal and make a new directory called build/.
Change into the build/ directory:
>> mkdir build
>> cd build
2. Enter the following cmake command one one line, replacing the variables with the appropriate
values for your environment:
>> cmake \
-DCMAKE_INSTALL_PREFIX=/path/to/hdef/installation/directory \
-DCMAKE_C_COMPILER=[/path/to/]gcc \
-DCMAKE_Fortran_COMPILER=[/path/to/]gfortran \
[-DLAPACK_LIB_DIR=/path/to/lapack] \
..
The following variables need to be defined with the CMake command line arguments in order for
Hdef to be built and installed:
- CMAKE_INSTALL_PREFIX: location to install Hdef code
- CMAKE_C_COMPILER: (path to) gcc
- CMAKE_Fortran_COMPILER: (path to) gfortran
- LAPACK_LIB_DIR: path to LAPACK libraries (OPTIONAL)
For example, on my machine I go to /Users/mherman2-local/Research/Hdef/build/ and type:
>> cmake \
-DCMAKE_INSTALL_PREFIX=.. \
-DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_Fortran_COMPILER=gfortran-10 \
-DLAPACK_LIB_DIR=/Users/mherman2-local/Research/lapack-3.9.0 \
..
3. Once cmake has finished configuring, type:
>> make
to compile the Hdef executables. Then type:
>> make install
to create the bin/, lib/, and test/ directories in the installation directory you specified,
and copy the Hdef programs, libraries, and tests to these directories.
4. To test all subroutines and executables, go to the build/ directory and type:
>> make test
To test only the executables and see the standard output from the test scripts, go to the
build/ directory and type:
>> make test-exec
If the codes are compiled and installed correctly, the tests *should* complete with no errors.
However, the tests are still a bit of a work in progress. So please report testing issues to
me if you run into them!
QUESTIONS, COMMENTS, OR CONCERNS?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Contact matthew.w.herman@gmail.com.