ODESSA code builder

ODESSA means Organization of Data Exchange in scientific Software Architectures. This system contains several tools. The code builder is just one of them.

The code builder is a freeware. It is presently a beta version proposed for evaluation.

Download

builder-win32.exe

builder-linux.tar.gz

builder.pdf

Intallation

Windows

automatic installation on windows. The builder must be used in a command windows (cmd.exe). The builder command is %builder%

Linux

local=`pwd`
tar zxvf builder-linux.tar.gz
alias builder=$local/odessa/proc/builder

Command options

Windows

%builder% [-h] [-v] [-d project-directory] [-f configuration-file] [platform-name]

Linux

builder [-h] [-v] [-d project-directory] [-f configuration-file] [platform-name]

Option flags

-h short user manual
-v verbose mode : explanations of the builder work
-d to provide the root directory of the software
-f to provide the name of the configuration file (builder.cfg by default)

Main features

The main idea consists in simplifying the task of a developer when compiling and linking his program. The usual tool for that is make, possibly associated to automake and autoconf, but its use is not obvious as far as FORTRAN is concerned. Indeed, the module files are not easy to manage and tools like sfmakedepend are often applied to generate dependencies.

But make has other drawbacks :

So the new proposed tool has the following objectives :

Example : a simple configuration file

Case of a software which file sources are located in a sub-directory. The best place for the configuration file is the root directory of the software. The default name is builder.cfg.
STRUCTURE TASK
  NAME    mycode                ! task name
  PROGRAM mycode                ! main target : the executable program
  DIR     src                   ! the directory containing sources
  SUFFIX  '.f'                  ! the suffixes of the files to compile
  SUFFIX  '.c'
  SUFFIX  '.f90'
END

STRUCTURE PLATFORM              ! description of a first platform
  NAME "unix-intel"             ! platform name
  BUILD "bin/unix-intel"        ! building directory
  OBJ '.o' MOD '.mod'           ! main suffixes of various files
  LIB '.a' EXE ''
  STRUCTURE COMPILER            ! compiler description
    SUFFIX '.f90' SUFFIX '.f'   ! source file suffixes
    COMMAND "ifort"             ! command
    FLAGS   "-O3 -openmp"       ! compilation flags
    NOLINK  "-c"                ! the special flag peventing the link phase
    OUT     "-o"                ! the flag to precise the name of the main output file
    INC     "-I"                ! the flag to precise directories for includes and modules
    MOD     "-module"           ! the flag to precise the directory receiving modules
  END
  STRUCTURE COMPILER            ! compiler for C files
    SUFFIX '.c'   SUFFIX '.cc'  ! source file suffixes
    COMMAND "icc"               ! command
    FLAGS   "-O3"               ! compilation flags
    NOLINK  "-c"                ! the special flag preventing the link phase
    OUT     "-o"                ! the flag to precise the name of the main output file
  END
  STRUCTURE PROGRAM             ! the linker
    COMMAND "ifort"             ! command to use.
    OUT     "-o"                ! the flag to precise the program file
    FLAGS   "-openmp"           ! optimizations flags
    TAIL    "-lX11 -lphread"    ! command tail
  END
END

To install the code, one just need to got to the root directory and to launch the command :

Linux :

cd my_root_directory
builder

Windows (in a command windows) :

cd my_root_directory
%builder%

It is possible to launch the command without changing the current directory

Linux :

builder -d /.../my_root_directory

Windows :

%builder% -d \...\my_root_directory