• The added line is THIS COLOR.
  • The deleted line is THIS COLOR.
* Step-by-step instructions to build KAPSEL [#s1fa1365]

If KAPSEL binaries do not run on your machine, or if you want to modify KAPSEL source codes for your own purpose, you can build KAPSEL binaries from the source package. Here we assume that OCTA(GOURMET)-2010 is used, but the latest version of them should work fine.
If KAPSEL binaries do not run on your machine, or if you want to modify KAPSEL source codes for your own purpose, you can build KAPSEL binaries from the source package. Here we assume that OCTA(GOURMET)-2013 is used, but the latest version of them should work fine.

** STEP 0: Linux or Windows? [#sd4e991d]

- To build KAPSEL on Linux, goto STEP 1.

- To build KAPSEL on Windows,  install "[[Cygwin:http://cygwin.com]]" first, then goto STEP 1. Be sure to include "gcc", "make" (both exist under "Devel" tree), and "unzip" (under "Archive" tree) packages.

- KAPSEL can be build also on Mac OS-X. (not officially supported)

** STEP 1: Download and install GOURMET [#b5c31f22]
** STEP 1: Download and install OCTA/GOURMET [#b5c31f22]

- Visit [[OCTA-BBS:http://49.212.191.63/phpBB/]] and Login. Registration is required if you haven't yet complete it.

- For Linux
-- Go "DOWNLOAD" -> "OCTA2010" -> "Release of OCTA2010 (linux & source versions)".
-- Follow the instructions there to install GOURMET2010 in /usr/local/OCTA2010/
-- Follow "DOWNLOAD" -> "OCTA2013" -> "OCTA2013 for linux iso image".
-- Download "OCTA2013LINUX.ISO" and install OCTA2013.


- For Windows
-- Follow "DOWNLOAD" -> "OCTA2010" -> "OCTA2010 (for Windows 64bit) " or "OCTA2010 (for Windows 32bit) ".
-- download "GOURMET2010W64.exe" or "GOURMET2010W32.exe" and click it to install GOURMET2010.
-- Follow "DOWNLOAD" -> "OCTA2013" -> "OCTA2013 for Windows 32/64bit iso image".
-- Download "OCTA2013WIN.ISO" and install OCTA2013.

** STEP 2: Build "libplatform" [#b16eb306]

- "libplatform" is an I/O library developed by OCTA project. One needs this library to access to UDF-formatted files.

- For Linux:

    > su
    > cd /usr/local/OCTA2010/GOURMET_2010
//    > tar zxvf gourmet2007_src.tar.gz
    > cd /usr/local/OCTA2013/GOURMET_2013
    > cd src
    > ./configure
    > make
    > make install

- For Windows: 
-- Logon Windows with an administrator authorization
-- Open Cygwin window

    $ ln -s /cygdrive/c/OCTA2010/ /usr/local/.
    $ cd /usr/local/OCTA2010/GOURMET_2010
//    $ unzip GOURMET_2007_SRC.zip
    $ ln -s /cygdrive/c/OCTA2013/ /usr/local/.
    $ cd /usr/local/OCTA2013/GOURMET_2013
    $ cd src
    $ ./configure
    $ make
    $ make install

- See manuals for more detailed information on libplatform
-- English: &ref(libplatform_eng.pdf);
-- Japanese: &ref(libplatform_jpn.pdf);


** STEP 3: Download "KAPSEL" source code [#hcf749f2]

- You can download the same files directly from here.

-- Source code &ref(kapsel3.0.zip);
-- Source code &ref(kapsel3.02.zip);
//-- Examples &ref(examples.zip);
//-- Makefile for OCTA2010 &ref(Makefile);


** STEP 4: Build "KAPSEL" binary executable [#h2d3c3c3]

    > unzip kapsel3.0.zip
    > cd kapsel3.0
    > make 'ENV=CYGWIN'    (Windows)
    > make 'ENV=GCC'    (Linux)
    > make 'ENV=CYGWIN'       (Cygwin on Windows)
    > make 'ENV=GCC'          (gcc on Linux)
    > make 'ENV=ICC'          (icc on Linux)
    > make 'ENV=ICC_MKL_OMP'  (icc + MKL + OpenMP on Linux)
    > make clean   (clean-up working files)


** STEP 5: Test run [#l7319ece]

    > cd UDF
    > ../kapsel -Iinput.udf -Ooutput.udf -Ddefine.udf -Rrestart.udf
   #using input.udf as input
   #using output.udf as output
   #using define.udf as definition
   #using restart.udf as restart
   #
   # Navier_Stokes eq. selected.
    ...
- If you see a command-line output as shown above, KAPSEL has been successfully built and run.

* Optional information for Intel compiler [#v2b1c8eb]

** STEP 2a: Build "libplatform" with icc on Linux [#b16eb306]

- For icc 12.0

    > su
    > cd /usr/local/OCTA2010/GOURMET_2010/src
    > make clean
    > make WITHFC=no CC=icc CXX=icpc
    > make install


** STEP 4a: Build "KAPSEL" with icc on Linux [#h2d3c3c3]

- For icc

    > make clean
    > make 'ENV=ICC'

- For icc + MKL + OpenMP

    > make clean
    > make 'ENV=ICC_MKL_OMP'