GSS Installation: How to Compile GSS-0.4x from Source Code

Step1: Prepare your System and Compiler

GSS can be installed on Linux/Unix system and Cygwin under Windows platform. It is reported that GSS has been successfully installed on the following system:
Mandriva 2005-2008, RedHat AS 3-6, Ubuntu 6-7 and
Sun Solaris 10 for both Sparc and Intel CPU with gcc.

For any system, please make sure your c/c++ compiler works, flex-2.5.4 and bison-2.0 are also needed. Although gcc 3.3/3.4/4.1/4.2 works, but vendor compiler (such as Intel c/c++ 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 an hardware float point accelerator. Please use the latest version of flex and bison. Some one has reported that bison-1.x stops work when compiling GSS. 

Step2: Install Critical Libraries

You should install two important libraries first. The first one is petsc-2.3.3 which contains basic nonlinear and linear solvers.
Until petsc-2.3.3-p8, a bug which will break Newton damping method still exists. I had reported it to PETSC development term, but they only
promise to fix it in the next patch level. You should put this patched ls.c into your $PETSC_DIR/src/snes/impls/ls and replace the existing file.

Note 1:
petsc must be configured with --with-clanguage=cxx to support c++ call and --with-mpi=0 to disable parallel mechanism.

Note 2:
GSS can be compiled with long double float number (default is double) to achieve better convergence rate and more accurate result. To support long double, configure PETSC with additional arguments: --with-precision=longdouble --download-c-blas-lapack=1
PETSC will compile a special version of Blas/Lapack for long double.

Here is some configure examples for petsc:

  • using g++, download FORTRAN blas and lapack (as a result, g77 is also needed).  

$ ./config/ --with-mpi=0 --with-clanguage=cxx --download-f-blas-lapack=1 --with-shared=0
  • using Intel c/c++ compiler and Intel MKL for best performance on EM64T system. Besides of default LU solver shipped with PETSC, external direct solvers (LU) SuperLU and UMFPACK are also installed. I should say, UMFPACK usually has the best performance in the three LU solvers. 

$ ./config/ --with-clanguage=cxx --with-mpi=0 --with-debugging=0 --with-vendor-compilers=intel \
   --with-blas-lapack-dir=/opt/intel/mkl/8.0/lib/em64t --with-shared=0 --with-superlu=1 --download-superlu=1 \
   --with-umfpack=1 --download-umfpack=1
  • using g++, download c blas and lapack to support long double 

$ ./config/ --with-clanguage=cxx --with-mpi=0 --with-debugging=0 --download-c-blas-lapack=1\
   --with-precision=longdouble --with-shared=0

Another required library is cgnslib-2.5-1 which supports reading and writing CGNS file. The compile and installation of this library is fairly easy. Just type the following command under the directory of cgnslib:

$ ./configure 
$ make
$ make install

At last, if libtiff and libtiff-devel have been installed on your system, the screen dump function will be compiled into GSS. You can save the plot image to a file with TIFF format. These libraries should be included in any distribution of Linux/Unix. You only need to check if they have been installed.  

Step3: Set GSS_DIR environment variable
You need to set environment GSS_DIR point to the directory of gss-0.46. For example, you can add the following line to your .bashrc or .bash_profile

export GSS_DIR=/home/gdiso/gss-0.46

Step4: Compile GSS-0.46

In the directory of $GSS_DIR, type

$ ./configure 
$ make
$ make install

Note 1:
The default installation dir of cgnslib is /usr/local/lib, if you change that, use "configure --with-cgns=CGNSdir". More help can be got by "configure --help".
If some library or head file can't be find, you can modify make.def file by yourself.

Note 2:
"Make install" will copy binary file to $GSS_DIR/bin and material data file to $GSS_DIR/lib

Note 3:
GSS use X11 system for graphic plotting by default. You can change to use Win32 native API for plotting under Cygwin by "configure --with-Win32". However, it is not as beautiful as X11 API.

Step5: Run Test Examples

If everything is ok, Add $GSS_DIR/bin to your path. You can go to example directory to check gss.

$ gss xxxx.inp

GSS has a simple text editor written by Tk, which can be invoked by

$ gssui

GSS: open source TCAD software.