• The added line is THIS COLOR.
  • The deleted line is THIS COLOR.
* Step-by-step instructions to install KAPSEL [#s1fa1365]
#freeze
* 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.

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

- If you want to use KAPSEL on Linux, goto STEP 1.
- To build KAPSEL on Linux, goto STEP 1.

- If you want to use KAPSEL on Windows,  install "[[Cygwin:http://cygwin.com]]" first, then goto STEP 1. Be sure to install "gcc" and "make" packages.
- 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 used on Mac OS X, but it is not officially supported. 
- KAPSEL can be build also on Mac OS-X. (not officially supported)

** STEP 1: Download and install "Gourmet" [#b5c31f22]
- "Gourmet" is a graphic platform developed by OCTA project. The entire OCTA package is not necessarily. Only Gourmet is required to use KAPSEL.
** STEP 1: Download and install GOURMET [#b5c31f22]

- Goto [[OCTA-BBS:http://octa001.muse.aist.go.jp/phpBB3/]] and register to get your ID.
- Visit [[OCTA-BBS:http://49.212.191.63/phpBB/]] and Login. Registration is required if you haven't yet complete it.

- Follow "DOWNLOAD" -> "OCTA2007" -> "Platform GOURMET2007 in OCTA2007 (for Windows)"  or "GOURMET 4.1.0 (on OCTA2007) for Windows and Linux" to download "Gourmet" package.
- For Linux
-- Go "DOWNLOAD" -> "OCTA2010" -> "Release of OCTA2010 (linux & source versions)".
-- Follow the instructions there to install GOURMET2010 in /usr/local/OCTA2010/

- Follow the instruction there to install "Gourmet". 

- 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.

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

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

- Instruction for Linux:
- For Linux:

    > su
    > cd /usr/local/OCTA2007/GOURMET_2007
    > tar xvfpz gourmet*_src.tar.gz
    > cd /usr/local/OCTA2010/GOURMET_2010
//    > tar zxvf gourmet2007_src.tar.gz
    > cd src
    > make
    > make install

- Instruction for Windows: (Logon Windows with an administrator authorization and open Cygwin window.)
- For Windows: 
-- Logon Windows with an administrator authorization
-- Open Cygwin window

    $ ln -s /cygdrive/c/OCTA2007/ /usr/local/.
    $ cd /usr/local/OCTA2007/GOURMET_2007
    $ unzip GOURMET_2007_SRC.zip
    $ ln -s /cygdrive/c/OCTA2010/ /usr/local/.
    $ cd /usr/local/OCTA2010/GOURMET_2010
//    $ unzip GOURMET_2007_SRC.zip
    $ cd src
    $ 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" [#hcf749f2]

- Goto [[KAPSEL-BBS:http://www.cheme.kyoto-u.ac.jp/1koza/kapsel/phpBB3/]] and register to get your ID.
** STEP 3: Download "KAPSEL" source code [#hcf749f2]

- Follow "DOWNLOAD" -> "KAPSEL-2" -> "KAPSEL-2" to download "kapsel.tar.gz".
- You can download the same files directly from here.

- Download "&ref(Makefile);" and overwrite an existing file included in the "kapsel.tar.gz"
-- Source code &ref(kapsel2.1_src.zip);
-- Examples &ref(examples.zip);
-- Makefile for OCTA2010 &ref(Makefile);

** STEP 4: Build "KAPSEL" [#h2d3c3c3]
//- Visit [[KAPSEL-BBS:http://www-tph.cheme.kyoto-u.ac.jp/kapsel/phpBB3/]] and Login. Registration is required if you haven't yet complete it.

//    > echo $PF_FILES (Set "PF_FILES" properly, if it has not done yet.) 
    > tar xvfpz kapsel.tar.gz
    > cd kapsel
    > make
//- Follow "DOWNLOAD" -> "KAPSEL-2"  -> "KAPSEL-2.10" to download "kapsel2.1_src.zip".

** STEP 5: Test "KAPSEL" [#l7319ece]

- Download "&ref(define.udf);" and "&ref(sample1.udf);". Put them into KAPSEL source directory and type the following command.
** STEP 4: Build "KAPSEL" binary executable [#h2d3c3c3]

    > ./kapsel -Isample1.udf -Ooutput.udf -Ddefine.udf -Rrestart.udf
    #using sample1.udf as input
    > unzip kapsel2.1_src.zip
    > make     (Windows)
    > make ENV=GCC    (Windows)

** STEP 5: Test run [#l7319ece]

    > ./kapsel -Icolloid_1.udf -Ooutput.udf -Ddefine_2.10.udf -Rrestart.udf
    #using colloid_1.udf as input
    #using output.udf as output
    #using define.udf as definition
    #using define_2.10.udf as definition
    #using restart.udf as restart
    #
    # Electrolyte eq. selected.
    #
    ...
- If you see the output as shown in the above panel, KAPSEL has been successfully installed. ''Congratulations!''
- If you see the output as shown in the above panel, KAPSEL has been successfully built.

* Optional information for Intel compiler [#v2b1c8eb]

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

- for icc 7.1:
- For icc 12.0

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

- for icc8.0:

    > su
    > cd /usr/local/OCTA2007/GOURMET_2007/src
    > make clean
    > make WITHFC=no CC=icc CXX="icpc -U GNU "
    > make install

- for icc8.1 or later:

    > su
    > cd /usr/local/OCTA2007/GOURMET_2007/src
    > make clean
    > make WITHFC=no CC=icc CXX="icpc -lcxaguard"
    > make install

- numerous warnings may appear but can be ignored them.

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

- for icc
- For icc

    > make clean
    > make ENV=ICC

- for icc + MKL + OpenMP
- For icc + MKL + OpenMP

    > make clean
    > make ENV=ICC_MKL_OMP

- numerous warnings may appear but can be ignored them.