-
Notifications
You must be signed in to change notification settings - Fork 78
HOWTO configure & compile
Before compiling, users need to have installed all dependencies as indicated here. Please stick to the exact package versions we recommend in order to avoid compilation issues with those libraries whose API can change from one version to another.
NOTE: if you are a VKI user, you don't need to install dependencies. You can simply load preinstalled dependencies.
After having dowloaded the source code, for instance using svn as explained here, go into your COOLFluiD base directory. You will have one of the following two options:
-
coolfluid_dir = YOUR_COOLFluiD/trunk
(if you work in the trunk) -
coolfluid_dir = YOUR_COOLFluiD/branches/YOUR_BRANCH
(if you work in a branch).
NOTE: for the moment, we strongly recommend to work in the trunk, but your are free to create your own branches if you are familiar with that and you plan to work on a major development that might deeply affect the existing code.
Go to your directory:
cd coolfluid_dir
Copy and rename one of the coolfluid.conf*
files inside tools/conf
(see here). For example:
cp tools/conf/coolfluid.conf.vki.example coolfluid.conf
Edit the coolfluid.conf
and set the appropriate values for the COOLFluiD folders (coolfluid_dir
, basebuild_dir
, install_dir
) the main dependencies (mpi_dir
, curl_dir
, boost_dir
, petsc_dir
, parmetis_dir
) and for the compilers (cc
, cxx
, fc
) according to your installation paths.
NOTE: if you are have installed the dependencies as expained here, using the ./install-coolfluid-deps.pl script with default options. The paths to the dependencies libraries in your coolfluid.conf
will be as follows (First check that you have access to these directories):
mpi_dir = $HOME/local/coolfluid_deps/x86_64
curl_dir = $HOME/local/coolfluid_deps/x86_64
boost_dir = $HOME/local/coolfluid_deps/x86_64
petsc_dir = $HOME/local/coolfluid_deps/x86_64/petsc
parmetis_dir = $HOME/local/coolfluid_deps/x86_64
NOTE: if you are a VKI user, coolfluid.conf.vki
already contains the right settings for you, except for the COOLFluiD "dirs" which must be set appropriately.
COOLFluiD contains more than 100 libraries. If you want to compile them all, please make sure to have at least 15GB of free disk space and then specify:
allactive = 1
inside your coolfluid.conf
. Alternatively, you can explicitly specify the libraries that you want to compile, after having set:
allactive = 0
.
There are two kind of libraries, kernel and plugin. Their actual names are declared into the CMakeList.txt
file inside the corresponding folder (respectively src
or plugins
), as the argument of the macros CF_ADD_KERNEL_LIBRARY
or CF_ADD_PLUGIN_LIBRARY
. For example, you can look at how CF_ADD_KERNEL_LIBRARY ( MathTools )
is used here or at CF_ADD_PLUGIN_LIBRARY ( NavierStokes )
here.
The example coolfluid.conf.minimal shows how to declare the minimum set of libraries to achieve a successful compilation (only the kernel, basically):
lib_Common = on
lib_MathTools = on
lib_logcpp = on
lib_Config = on
lib_Environment = on
lib_Framework = on
lib_ShapeFunctions = on
lib_AnalyticalModel = on
More libraries can be specified by adding more lines of the type:
lib_LIBRARYNAME = on
where LIBRARYNAME
is the actual name of the library to be activated (off
is the default).
NOTE: before proceeding with the configuration step, do not forget to set the paths PATH, LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on Mac OS X) in order to include the new dependencies for COOLFluiD once you have installed them. If your paths are correct than the following commands:
which mpirun
which mpicc
which mpic++
will return the right MPI executables. Also, double-check that the library paths to boost, petsc, parmetis libraries are correct and compatible with the ones inside your coolfluid.conf
.
All Makefiles
needed for the compilation can be automatically built by running:
./prepare.pl --build=optim
NOTE: if you want to use a name for the configuration file different from "coolfluid.conf"
, you certainly can do that, but you have to add "--config-file=name_of_your_file"
to the previous prepare.pl
command. This allows the user to compile using totally different sets of configuration settings, potentially using different dependencies (e.g. different MPI, different versions of the same package) within the same COOLFluiD folder.
NOTE: before embarking in a full compilation, after the execution of ./prepare.pl --build=optim
, you can check if all the paths to MPI, PETSC, PARMETIS, BOOST have been detected correctly inside the optim/CMakeCache.txt.
If you don't have errors, you should be ready to compile now:
cd basebuild_dir/BUILD_MODE
(see what you specified in coolfluid.conf
for "basebuild_dir"
)
make -jN
(where N
is the maximum number of cores you can use in your machine).
If you have specified an install_dir
inside your coolfluid.conf
, you can install with:
make install
In this case, API of the plugins (i.e. header files) will also be installed only if a comma-separated list of COOLFluiD libraries has been declared inside the coolfluid.conf
following the keyword install_api
(no spaces allowed). For example:
install_api = NavierStokes,FiniteVolume,FiniteVolumeNavierStokes,Tecplot
The COOLFluiD team is involved and open to new collaborations in Horizon2020, ESA and other research projects dealing with complex multi-disciplinary problems and computational challenges.
Training sessions and consulting services can also be provided on demand.
For any request or suggestions please contact andrea.lani@gmail.com
Parallel mesh decomposition
High-performance computing (strong scaling on NASA Pleiades for 1/2 billion-cells 3D grid)
Chemically reacting flows and plasma
Complex all-speed flow simulations