Permalink
Browse files

update from the main repo 20110405.

  • Loading branch information...
1 parent e639e29 commit 7ae237420e9d4ef9c7cd7f1c8237ab4ff011f008 shenchen committed Apr 5, 2011
Showing 747 changed files with 101,541 additions and 64,680 deletions.
View
154 INSTALL
@@ -4,102 +4,74 @@ Install from source code
This section describes how to install from source code taken direct
from git@github.
-First, download source 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 (>=10.0) are supported. The Intel math library alone
+provides significant performance enhancement, due to the more
+efficient pow(x,y) function.
-Now change directories in to the top-level source directory (where this
-INSTALL file can be found).
+2. Flex (>=2.5.4a) and Bison (>=2.0) are required.
-The project uses the GNU build process. This is still very crude and needs
-work, but basically you should be able to do the following:
-$ acloal
-$ autoheader
-$ autoconf
-$ ./configure
-$ make
-$ make install
-
-At present it is normal for there to be some warning generated during this
-process.
-
-
-If a problem is found with the build proccess, please submit a report to me.
-Please provide information about you system
-and any ./configure arguments you are using, together with any error
-messages. Ideally you would have tried to fix the problem yourself first,
-and details about this and any thought you may has as to the cause of the
-problem should also be provided. If you have fixed the problem then the
-development team will love to hear from you.
-
-
-Basic Installation
-==================
-This covers installation from a tar-ball (for example genius-1.6.tar.gz).
-
-----------------------------------------------------------------------------------------------
-First, you should prepare some libraries genius dependent.
- 1 the latest petsc-3.0.0 is recommended.
- 2 cgnslib-2.5, earlier version has memory leak problem.
- 3 Optional: VTK-5.4.2 However, you can still export VTK file with ascii format if you do not have VTK lib.
+3. Petsc
+ the latest petsc-3.1 version is recommended.
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.
-GENIUS configure script will check PETSC_DIR to determin if PETSC installed.
-
-The default installation directory of cgns and vtk are /usr/local,
-GENIUS configure script will check this directory for cgns and vtk.
-It means if you install cgns/vtk by their default directory, GENIUS
-can find them automatically.
-
-
-----------------------------------------------------------------------------------------------
-Second, make sure your compiler works, flex (version 2.5.4a, no 2.5.3x) and bison (version >=2.0, no 1.8x) are also needed.
-
-Note 1:
-Although gcc version 3.4~4.3 have been tested ok, vendor compiler (such as Intel icc on PC)
-works much faster (50% faster than gcc). That mainly because the math library
-used by gcc compute pow(x,y) in an inefficient way but icc seems using a hardware
-float point arithmatic accelerator.
-
-Note 2:
-Intel icc 9.x has a bug: nan==nan is considered as true, which breaks all the nan test.
-Fortunately, Intel icc 10.x has corrected this bug.
-
-----------------------------------------------------------------------------------------------
-You need to set environment GENIUS_DIR point to the directory of genius.
-for example, under bash:
- export GENIUS_DIR=/home/gdiso/genius
-
-----------------------------------------------------------------------------------------------
-After downloading the tar ball to a local directory unpack it using:
-
-$ tar -zxf genius.tar.gz
-
-Now change directories in to the top-level source directory (where this
-INSTALL file can be found).
-
-Generate the configure script by auto-conf tools
-$ acloal
-$ autoheader
-$ autoconf
-
-Then, you should be able to do:
-
-$ ./configure
-$ make
-$ make install
-
-Note 1:
-If cgns lib is not installed at /usr/local, you need to add argument "--with-cgns=<cgns_path>"
-cgnslib.h should be found at <cgns_path>/include
-libcgns.a should be found at <cgns_path>/lib
+And MPI implemention is requird. MPICH2 is recommended.
+The recommended configure arguments are
+ ./configure --download-f-blas-lapack=1 --with-debugging=0 --with-umfpack=1 --download-umfpack=1 \
+ --with-superlu=1 --download-superlu=1 --with-superlu_dist=1 --download-superlu_dist=1 \
+ --with-blacs=1 --download-blacs=1 --with-scalapack=1 --download-scalapack=1 \
+ --with-parmetis=1 --download-parmetis=1 --with-mumps=1 --download-mumps=1 \
+ --COPTFLAGS="-O2" --CXXOPTFLAGS="-O2" --FOPTFLAGS="-O2" --useThreads=0 --with-shared=1
+
+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.x has some API changes, and is not supported yet.
+
+6. Configure and build Genius
+ ./waf --prefix=$PWD --with-petsc-dir=/usr/local/petsc \
+ --with-petsc-arch=linux-gcc 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.2, 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
+
+7. Start using Genius
+export GENIUS_DIR=<path/to/genius/installation>
+cd examples/PN_Diode/2D
+$GENIUS_DIR/bin/genius.LINUX -i pn2d.inp
-Note 2:
-"make install" will copy binary file to GENIUS_DIR/bin and material data files to GENIUS_DIR/lib
-----------------------------------------------------------------------------------------------
-If everything is ok, add GENIUS_DIR/bin to your path.
-You can goto example directory to check genius.
- genius -i xxxx.inp
-for parallel version
- mpiexec -n x genius -i xxxx.inp
View
@@ -1,126 +0,0 @@
-Compile genius under windows platform.
-
-It is possible to compile genius code under windows platform with Intel cluster compiler or MS VC.
-The main idea is using cygwin to emulate linux environment (offer make tools), and use a small tool "win32fe"
-to wrap intel C/C++/Fortran compiler for windows or MSVC to have the behavior as linux native compilers.
-
-step 1: install Microsoft Visual Studio 2005/2008.
- Or one can install a free express version of Visual Studio 2005/2008 plus system SDK.
- The Microsoft Visual Studio can be installed in the default directory.
-
-step 2: install Intel Cluster Toolkit Compiler Edition 3.1.1 for windows.
- This package contains intel c/c++ compiler icl, intel fortran compiler ifort, MKL library and MPI library.
- For convenient, please install it under some directory DOES NOT contain blank, i.e. C:\usr\ICTCE.
-
- The is an optional choise. If no Intel Compiler, only MSVC can do.
- However, one should install a MPI implementation such as mpich2 instead of intel mpi.
- It can be downloaded from http://www.mcs.anl.gov/mpi/mpich. Please install it at the default directory.
-
-step 3: install cygwin. please make sure "binutils", "make" and "python" packages are selected, "flex" and "bison" can be optianl.
- The directory should NOT contain blank, can be i.e. c:\usr\cygwin.
- add c:\usr\cygwin\bin\ to your PATH
-
-step 4: Launch a command prompt window.
- With intel compiler, Run the ictvars.bat batch file at C:\usr\ICTCE\ictvars.bat to setup Intel compiler environment.
- (For MSVC 2005, Run C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat to set MSVC environment)
- And then run the Cygwin batch file C:\usr\cygwin\cygwin.bat to setup the unix-like environment.
- The following steps are all done within this command window.
-
-step 5: put petsc-2.3.3-p13.tar.gz under windows path c:\usr\cygwin\usr\local, this directory is /usr/local for cygwin environment.
-
- untar petsc-2.3.3-p13.tar.gz within the command window by cygwin command:
- tar -zxf petsc-2.3.3-p13.tar.gz
- make a symbolic link for convenience
- ln -s petsc-2.3.3-p13 petsc
- patch petsc with ls.c seems still required.
-
- For intel compiler and intel mpi:
- set system env by type following command:
- export PETSC_DIR=/usr/local/petsc
- export PETSC_ARCH=win32-intel-mpi
- then configure the petsc with following arguments:
- ./config/configure.py --with-cc='win32fe icl' --with-fc='win32fe ifort' \
- --with-mpi-include=/cygdrive/c/usr/ICTCE/mpi/3.1/ia32/include/ \
- --with-mpi-lib=/cygdrive/c/usr/ICTCE/mpi/3.1/ia32/lib/impi.lib \
- --download-f-blas-lapack=1 --with-debugging=0 --useThreads=0 --with-shared=0
-
- Note:
- I can't make intel MKL work at present. just download a fortran version blas/lapack instead.
-
- I had compiled SuperLU_DIST into petsc with addtional command line argument --with-superlu_dist=1 --download-superlu_dist=1
- However, other external packages such as hypre, superlu, umfpack are all faild.
- Here is a small problem: petsc generates lib with suffix .a, but icl thinks the lib suffix should be .lib.
- As a result, configure script will generate an error after the SuperLU_DIST lib are successfully built.
- One can change the lib suffix manually.
-
- And for MSVC and mpich2:
- set system env by type following command:
- export PETSC_DIR=/usr/local/petsc
- export PETSC_ARCH=win32-msvc-mpi
- then configure the petsc with following arguments:
- ./config/configure.py --with-cc='win32fe cl' --with-fc=0 \
- --download-c-blas-lapack=1 --with-debugging=0
-
- Note:
- Since no fortran compiler exist, we have to use --download-c-blas-lapack=1
- Petsc can find mpich2 automatically if mpich2 is installed at default directory
-
- after the configure done, type
- make
- to build petsc
-
- petsc has a tool win32fe which convert compiler flag from linux type to windows type.
- i.e. win32fe convert -I(linux type include path) to /I(windows type include path).
- we will use this tool later.
-
-
-step 6: Here we should borrow the idea of petsc bulid system. Copy win32fe.exe and win32feutils.dll from PETSC_DIR/bin/win32fe
- to c:\usr\cygwin\bin. As a result, one can override compiler setting for cygwin environment with
- For intel compiler
- export CC='win32fe icl'
- export CXX='win32fe icl'
- export F77='win32fe ifort'
- And MSVC
- export CC='win32fe cl'
- export CXX='win32fe cl'
-
- One can add above lines to c:\usr\cygwin\home\your_user_name\.bashrc
-
-step 7: build cgns. just untar cgnslib-2.5-3.tar.gz, configure it and make, make install.
- here configure script will use CC, the intel compiler or MSVC defined at step 6 to build win32 native cgns lib.
-
-NOTE: One can install precompiled cgns and petsc library for win32 platform.
- Then one can skip step 5 and 7.
- For this situation, one MUST install Intel Cluster Toolkit Compiler Edition 3.1.1 for windows under C:\usr\ICTCE
-
- put cgns-win32.tar.gz under cygwin dir /usr/local, that is windows dir C:\usr\cygwin\usr\local, untar it with
- tar -zxf cgns-win32.tar.gz
-
- put petsc-2.3.3-p13-win.tar.gz also under cygwin dir /usr/local (windows dir C:\usr\cygwin\usr\local), untar it with
- tar -zxf petsc-2.3.3-p13-win.tar.gz
- make the symbolic link
- ln -s petsc-2.3.3-p13 petsc
-
- The following lines should be put at c:\usr\cygwin\home\your_user_name\.bashrc
- export PETSC_DIR=/usr/local/petsc
- export PETSC_ARCH=win32-intel-mpi
-
- When configure genius, one should specify cgns lib by extra argument --with-cgns=/usr/local/cgns
- And don't forget to do step 6!
-
-step 8: build genius. untar the genius.tar.gz to a directory, i.e. c:\usr\genius, configure it and type make, make install.
- Just ignore many warnings.
-
- Note:
- 1 Configure script will generate config.h contains #define CYGWIN
- 2 Mixed simulation features are disabled when CYGWIN flag is set.
- 3 The file dependent for makefile does not work for windows.
- 4 Do not use -O3 flag, the generated code will crash.
-
-step 9: set windows system environment variable GENIUS_DIR i.e. c:\usr\genius\, add c:\usr\genius\bin to system PATH. run genius examples with
- mpiexec -n 2 -genv GENIUS_DIR c:\usr\genius\ genius -i xxxx.inp
-
- Note: should also add the intel mpi bin directory to system PATH.
-
- mpiexec requires user's account and password for first time running.
- Here "-genv GENIUS_DIR c:\usr\genius\" set the global environment variable GENIUS_DIR to "c:\usr\genius\"
Oops, something went wrong.

0 comments on commit 7ae2374

Please sign in to comment.