C++ main module for emicrom Package  1.0
Installation

The E-MicroM software contains following source paths:

The following paths are automatically created:

The licence files are:

It contains also makefile to configure the compiling (see makefiles files configuration.):

code

The source codes are available here .
The compiled codes are available here .
This code is protected under GNU License Legal

To run the compiled code on your platform, download the corresponding EMicroM_<platform>_V.vv.tar.gz and untar it in your computer and run if it is explained in the section man. If it does not work, you have to compile the code

The code are composed of modules. A module name is "path"_name. the .c .cpp files of the module are located in src/path/name and the .h .hpp files aere locate in include/path/name.

Pre-Required

The doxygen software must be installed on your computer to generate the documentation http://www.doxygen.nl/

The libraries needed for the program is boost :

The optional library for using the parallel version of the code is OpenMP. To disable this module, set the USE_OPENMP_MODULE=0 in the makefile_env.mk otherwise set it to 1

Those libraries are furnished by default in the ThirdParty path. You can also get it from the dedicated web site and install it on your computer.

On mac operating system, to use the OpenMP module, the gcc-x (x=7,8,9..) version must be installed.

Boost need not to be compiled because only the include file are used. Optionally, to compile boost, go to the source code of boost and:

To compile fxt :

To compile fftw with gcc-x, do as follow:

makefiles files configuration.

to compile the program, it is necessary to copy the 2 files in .mk extension and to change all the string finishing by _VAR by the corresponding value.

This files may be build by the install.sh script.

Note that on windows, the compilation is done by mingw by cross compilation with x64_84-w64-mingw32

makefile_env

The makefile_env.mdl defines the environment variables

This file contains variables to define the module used in the code

This file contains variables to define the computational types:

makefile_lib

The makefile_lib.mdl contained the location of the pre-required libraries:

makefile_body

The makefile_body.mk defines the makefile available commands.

Makefile

The Makefile defines the main makefile.

When the environnement & library variables are set, compile the program by :

file : install.sh

This install script build the .mk file from command line as indicated by the man ./install.sh –help

script for creation :
- makefile_env.mk from makefile_env.mdl
- makefile_lib.mk from makefile_lib.mdl
set the VAR variables in the makefile_env.mdl & makefile_lib.mdl
options are
--help: print this help
--target : the target platform in {linux,mac,win}
--release : the compilation option in {true,false}
--third-party : default third party path (thirdParty)
--use-float : to set the real type to float
--use-double : to set the real type to double
--use-ldouble : to set the real type to long double
--use-sint : to set the integer type to short int
--use-int : to set the integer type to int
--use-lint : to set the integer type to long int
--use-llint : to set the integer type to long long int
--cxx : the c++ compiler
--cxx-flags : the flags of c++ compiler
--c : the c compiler
--c-flags : the flags of c compiler
--d-flags : the define variables of the code at compilation
--ddd : the debugger
--ar : the archive bin
--ranlib : the ranlib bin
--ld : the ld bin
--ldd : the ldd bin
--nm : the nm bin
--libname-hdir : the path to find the lib of the library with name libname
--libname-ldir : the path to find the include of the library with name libname
--libname-dir : the parent path to find the include/lib paths for the library with name libname
libname may be:
- boost
- MinGW
- zlib
- dl
- mpi
- openmp
- fftw
- fxt
usage:
./install.sh --libname-dir=<path to include files of libname library > --os=linux64 --release in {true,false}, true by default
for example: ./install.sh --boost-dir=/usr/local/lib/boost --release=true

The install script for linux is done by install-linux64.sh

#!/bin/sh
#
#RELEASE=false
RELEASE=true
OS=linux
ARCH=64
CC=gcc
CXX=g++
AR=ar
RANLIB=ranlib
FXT_DIR=/externalLibraries/math/fxt/linux64/
FFTW_DIR=/externalLibraries/math/fftw/linux64/
BOOST_HDIR=
BOOST_LDIR=
MODULES=
#MODULES+="--use-openmp "
#REAL=--use-float
#REAl=--use-double
#REAL=--use-ldouble
REAL=
#INT=--use-sint
#INT=--use-int
#INT=--use-lint
#INT=--use-llint
INT=
./install.sh --target=$OS --arch=$ARCH --fftw-dir=$FFTW_DIR --fxt-dir=$FXT_DIR --boost-hdir=$BOOST_HDIR --boost-ldir=$BOOST_LDIR --release=$RELEASE $REAL $INT $MODULES --cxx=$CXX --c=$CC --ar=$AR --ranlib=$RANLIB

The install script for windows cross compilation is done by install-mac64.sh

#!/bin/sh
#RELEASE=false
RELEASE=true
OS=mac
ARCH=64
CC=gcc-7
CXX=g++-7
AR=ar
RANLIB=ranlib
MODULES=
#MODULES+="--use-openmp "
ZLIB_DIR=
DL_DIR=
LAPACK_DIR=
BOOST_DIR=/usr/local/opt/boost
FFTW_DIR=/usr/local/opt/fftw
FXT_DIR=/usr/local/opt/fxt
#REAL=--use-float
#REAl=--use-double
#REAL=--use-ldouble
REAL=
#INT=--use-sint
#INT=--use-int
#INT=--use-lint
#INT=--use-llint
INT=
./install.sh --target=$OS --arch=$ARCH --fxt-dir=$FXT_DIR --dl-dir=$DL_DIR --zlib-dir=$ZLIB_DIR --fftw-dir=$HDF5_DIR --boost-dir=$BOOST_DIR --release=$RELEASE $REAL $INT $MODULES --cxx=$CXX --c=$CC --ar=$AR --ranlib=$RANLIB

The install script for windows cross compilation is done by install-win64.sh

/bin/bash
#
#RELEASE=false
RELEASE=true
OS=win
ARCH=64
BIN_PATH=x86_64-w64-mingw32-
CC=${BIN_PATH}gcc
CXX=${BIN_PATH}g++
AR=${BIN_PATH}ar
RANLIB=${BIN_PATH}ranlib
MODULES=" "
#MODULES+="--use-openmp "
#HDF5_DIR=
#BOOST_DIR=
#REAL=--use-float
#REAl=--use-double
#REAL=--use-ldouble
REAL=
#INT=--use-sint
#INT=--use-int
#INT=--use-lint
#INT=--use-llint
INT=
./install.sh --target=$OS --arch=$ARCH --release=$RELEASE $REAL $INT $MODULES --cxx=$CXX --c=$CC --ar=$AR --ranlib=$RANLIB

type make clean lib prog install document tests to :