-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathINSTALL
104 lines (81 loc) · 4.33 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
92
93
94
95
96
97
98
99
100
101
102
Install from source code
========================
This section describes how to install from source code taken direct
from git@github.
Pre-requisites
--------------
1. The GCC compilers (gcc, g++ and gfortran) are required.
Most modern GCC versions (starting from 3.4.6) should work.
We recommend 4.1 and later versions.
Intel Compilers (ver 10 and 11) are supported. The Intel math library alone
provides significant performance enhancement, due to the more
efficient pow(x,y) function.
2. Flex (>=2.5.4a) and Bison (>=2.0) are required.
3. Petsc
Petsc 3.1 to 3.6 should work. And petsc-3.5 version is recommended.
The latest petsc-3.6 works, but not fully tested.
The compiling of PETSC requires you to set two system variables:
'PETSC_DIR' point to the directory of PETSC.
'PETSC_ARCH' to give a tag of PETSC configuation.
For MPI version of petsc, both MPICH2 and OpenMPI works well.
The recommended configure arguments for petsc are
./configure --download-mpich=1 \
--with-debugging=0 --with-shared=0 --with-x=0 --with-pic=1 \
--download-f-blas-lapack=1 \
--download-superlu=1 --download-superlu_dist=1 \
--download-blacs=1 --download-scalapack=1 \
--download-parmetis=1 --download-mumps=1 \
--COPTFLAGS="-O2" --CXXOPTFLAGS="-O2" --FOPTFLAGS="-O2"
For serial version of petsc
The recommended configure arguments for petsc are
./configure --with-mpi=0 \
--with-debugging=0 --with-shared=0 --with-x=0 --with-pic=1 \
--download-f-blas-lapack=1 \
--download-metis=1 \
--download-superlu=1 \
--COPTFLAGS="-O2" --CXXOPTFLAGS="-O2" --FOPTFLAGS="-O2"
NOTE: --download-parmetis=1 or --download-metis=1 is requred.
Genius will use (par)metis as its mesh partitioner
4. cgnslib-2.5.
By default, the headers and libraries are installed installed in
/usr/local/include and /usr/local/lib, respectively.
Note: cgns 3.0 is not tested, and probably will not work.
5. VTK-5.4.x.
By default, the headers and libraries are installed installed in
/usr/local/include/vtk-5.4 and /usr/local/lib/vtk-5.4, respectively.
Note: VTK 5.6 and 5.8 also works, others not tested.
6. Configure and build Genius
./waf --prefix=$PWD --with-petsc-dir=$PETSC_DIR \
--with-petsc-arch=$PETSC_ARCH configure build install
Basic Options:
--prefix Where Genius binaries will be installed
--with-petsc-dir=<dir> Directory of Petsc installation (PETSC_DIR)
--with-petsc-arch=<arch> PETSC_ARCH
If CGNS and VTK are installed in non-standard directories, you need the
following options:
--with-cgns-dir=<dir> Directory of CGNS installation (/usr and
/usr/local will be automatically searched).
--with-vtk-dir=<dir> Directory to VTK installation (/usr and
/usr/local will be automatically searched).
--with-vtk-ver=<str> Version of VTK (vtk-5.4 or vtk-5.6, etc.).
Further options:
--version=<str> Version string for the build
--with-git=<path/to/git> git binary
--cc-opt=<compiler opt> CC optimization options (e.g. -O2 -unroll).
If one doesn't specify this, we will try to
detect what the compiler supports.
--debug Enable debug, and disable optimization.
To get a complete list of options, run
./waf --help
7. Start using Genius
export GENIUS_DIR=<path/to/genius/>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH/:$GENIUS_DIR/lib
cd examples/PN_Diode/2D
$GENIUS_DIR/bin/genius.LINUX -i pn2d.inp
8. Solve cannot open shared object file problem
Genius dependent on some third part libraries, some of them may be shared object file (libxxx.so). If genius executable code report i.e.:
error while loading shared libraries: libpetsc.so.3.5: cannot open shared object file: No such file or directory
Please set environment variable LD_LIBRARY_PATH point to the directory which contains the shared library file libpetsc.so.3.5, which is the directory contains library file of petsc.
Also, genius may report can't file shared libraries of VTK,please also point LD_LIBRARY_PATH to the directory contains library file of VTK.
Here is my environment variable LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/local/petsc/arch-linux2-c-opt/lib:/usr/local/slepc/arch-linux2-c-opt/lib:/usr/local/vtk-5.8/lib/vtk-5.8:/usr/local/mpich-3.1.4/lib:/home/gdiso/develop/genius/lib