Wiki

Clone wiki

jCODE-public / CFD Package

Getting jCODE

The public version of the code currently resides in a git repository stored on bitbucket.org. To obtain the source code, you must first become a member of bitbucket.org and request access to the jCODE repository by sending an e-mail to jcaps@umich.edu with subject line jCODE request. In the email provide your name, institution, and general purpose for using the code.

You should create a branch by clicking Create branch found at the top-left side of this page. You want to Branch from maint and choose an appropriate name for your new branch.

Next, you need to clone your branch to your local machine. You must download git in order to do this. From the terminal window create a new directory called jcode, change into this directory and type

git clone https://yourBitbucketName@bitbucket.org/jcaps/jcode-public.git -b <branch name>

Note that Mac users should download SourceTree, a git GUI that is integrated with BitBucket. If you have SourceTree you can click Clone at the top-left of this page and select Clone in SourceTree instead of using the git command from the terminal.

Compiling

The source code of jCODE is available in the src directory. To compile, the code requires two files

Makefile
Makefile.in

The first file is a generic Makefile that is architecture and compiler independent. The second file (Makefile.in) contains all the information about the compilers. For information on the required compilers, go to Compiler installation. There is no default Makefile.in file when you download the code for the first time. However, you can find templates for different architectures and compilers in the Makefiles directory.

Choosing a Makefile.in

Take a template from the Makefiles directory and copy it into src

cp Makefiles/Makefile.in Makefile.in.

Make sure the Makefile.in file is adapted to your architecture and set of compilers.

  • Open the Makefile.in file.
  • Check and (eventually) change the location of the compilers
CC =<path to MPICH>/bin/mpicc
CXX=<path to MPICH>/bin/mpicxx
F90=<path to MPICH>/bin/mpif90
F77=<path to MPICH>/bin/mpif77
LD =<path to MPICH>/bin/mpif90

Choosing the Type of Compilation

There are different types of compilation. For production runs, compile the code with optimization using make opt

(If you get an error such as ifort not found, then you need to install or set the path to the intel compilers. See the compiler installation page.)

This target enables all optimization flags. With this option, the code will run the fastest. This is the most general way of compiling the code.

make debug

Use this target if you want to compile the code with all debug flags enabled. Depending on the set of compilers, these flags might include: detecting of unused variables, uninitialized variables, out-of bounds arrays, unassociated pointers, etc. If you have a bug in the code and don't know where it is, it is usually a good way to find it.

make distclean

Use this target if you want to remove all modules (.mod in mod), all object files (.o in obj), and all libraries (.a in lib).

Compilation might take up to 15min on certain machines.

Now that the CFD package is installed, you may start running the code.

Updated