Integrated Development Environment (IDE)

This document briefly details how user/developers can use C/C++ integrated development environments (C/C++ IDEs) that provide a comprehensive set of tools for DEST development, in the C and/or C++ programming languages

How to build and run on Visual Studio

Currently the only IDE that can generate all three executables (DEST_analyser, DEST_optimiser and DEST_conveyor) for Windows.

Installing Visual Studio

VS

First, you should download and install your favorite desktop IDE packages (links to the various Visual Studio versions on the Visual Studio website: https://visualstudio.microsoft.com/free-developer-offers/)

Once you have downloaded the installer, you can run the installer.

Note

For more detailed approach visit https://visualstudio.microsoft.com/free-developer-offers/

start Visual Studio and click on Switch between solutions and available views

win8x

you will see then the following figure, select analyser.sln and then OK

win16

then right click on solution explorer and select Rebuild solution

win17

After everything done you will see the following

win18

next right click on solution explorer and select properties

win19

then enter the arguments for DEST (e.g. -filename /home/kevinb/Videos/DEST-master/src/TESTS/B_013/B_013.dat) [apply and close]

win21

now you can run the solver

win22

How to build and run on Visual Studio Code

Installing Visual Studio Code

VSC1

First, you should download and install your favorite desktop IDE packages (links to the various Visual Studio Code versions on the Visual Studio Code website: https://code.visualstudio.com/)

Once you have downloaded the installer, you can run the installer.

Note

For more detailed approach visit https://code.visualstudio.com/docs [Visual Studio Code Docs Documentation for Visual Studio Code, including Getting Started videos Visual Studio Code Introductory Videos]

Next, enter the work directory (your working directory) and clone the DEST code into a folder, e.g. DEST-master

cd yourwork
git clone https://gitlab.DEST_master

After the code is cloned, start Visual Studio Code, and select open folder, and choose the root directory DEST

VSC2

click on yes, I trust authors (of the code)

VSC3

now you will be able to see DEST project inside Visual Studio Code-IDE. Next you need to install the following extensions in visual studio code

VSC0

then click on build button as shown in figure

VSC4

select [unspecified] let CMake guess what compiler and environment to use

VSC5

configuring and generating and build will be done (the executable file in ../DEST-master/src/BIN), as shown in figure

VSC6

next you need to create a launch json file (this will create a folder with the name .vscode and a file within with the name launch.json)

VSC7

then you need to modify the json file as follows

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
 "configurations": [

{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/BIN/DEST_analyser_Debug",
"args": ["-filename","yours/DEST-master/src/TESTS/B_013/B_013.dat"],  <-- need to be modified!
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
    "description": "Enable pretty-printing for gdb",
    "text": "-enable-pretty-printing",
    "ignoreFailures": true
},
{
    "description":  "Set Disassembly Flavor to Intel",
    "text": "-gdb-set disassembly-flavor intel",
    "ignoreFailures": true
    }
   ]
  },
 ]
}

next go run –> debugging or press F5 and you will see that the solver will start running as shown in figure

VSC8

you are now able to run and debug the code using Visual Studio Code-IDE.

How to build and run on Eclipse

Installing Eclipse

Eclipse1

First, you should download and install your favorite desktop IDE packages (links to the various Eclipse versions on the Eclipse website: https://www.eclipse.org/downloads/)

Once you have downloaded the installer, you can run Eclipse installer.

Note

For more detailed approach visit https://www.eclipse.org/downloads/packages/installer

then select Eclipse IDE for Scientific Computing and install it:

Eclipse2

Package Description:

Tools for C, C++, Fortran, and UPC, including MPI, OpenMP, OpenACC, a parallel debugger, and remotely building, running and monitoring applications.

This package includes:
    C/C++ Development Tools
    Git integration for Eclipse
    Mylyn Task List
    Parallel Tools Platform
    Eclipse XML Editors and Tools

Next, enter the work directory (your working directory) and clone the DEST code into a folder, e.g. DEST-master

cd yourwork
git clone https://gitlab.DEST_master
After the code is cloned, enter your work folder, make a build directory outside DEST folder and enter it

From within the build directory, run the configure command (with updated path!). Note the use of CC and CXX to select the special compilers.

cmake -G "Eclipse CDT4 - Ninja"   -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="/home/kevinb/Videos/DEST-master/src/Install"  -DCMAKE_C_COMPILER="/usr/bin/cc"  -DCMAKE_CXX_COMPILER="/usr/bin/c++"  /home/kevinb/Videos/DEST-master/src/CMakeLists.txt

If configuring and generating using CMake were successful you will see something similar to the following:

Eclipse3

At this point you can run cmake .. to e.g. disable unnecessary solvers, then run cmake as usual to build the code (with updated path!)

cmake --build /home/kevinb/Videos/Build  --clean-first  --config Debug -- "-v"

Finally, if building using CMake was successful you will see something similar to the following:

Eclipse4

Then check the executable file in ../DEST-master/src/BIN

file DEST_analyser_Debug
For testing the executable file you can run the following:
./DEST_analyser_Debug   -filename ../TESTS/B_013/B_013.dat

Now you can start Eclipse and select/create a directory as eclipse-workspace:

Eclipse5

then click on import a project with working Makefile

Eclipse6

fill the project name, existing code location, etc. click on finish button as shown in figure

Eclipse7

now you will be able to see DEST project inside Eclipse-IDE. To view or edit the project’s properties, right-click the project and select Properties and then select C/C++ build and fill it as follows (note that ninja should be already installed on system) [apply and close]

Eclipse8

right-click the project again and select debug configurations and change it as the follows [apply and close]

Eclipse9

on the same window click Arguments and enter the arguments for DEST (e.g. -filename /home/kevinb/Videos/DEST-master/src/TESTS/B_013/B_013.dat) [apply and close]

Eclipse10

to configure run, right-click the project again and select run configurations and change it as the follows [apply and close]

Eclipse11

finally, click on run button and you will see that the solver will start running

Eclipse12

you are now able to run and debug the code using Eclipse-IDE.

How to build and run on CLion

Installing CLion

CL0

First, you should download and install your favorite desktop IDE packages (links to the various CLion versions on the CLion website: https://www.jetbrains.com/clion/)

Once you have downloaded the installer, you can run the installer.

Note

For more detailed approach visit https://www.jetbrains.com/clion/

Next, enter the work directory (your working directory) and clone the DEST code into a folder, e.g. DEST-master

cd yourwork
git clone https://gitlab.DEST_master

After the code is cloned, start CLion and select open (folder), and choose the root directory DEST

CL1

click on next

CL2

click on finish

CL3

as shown in the following figure select Edit Configuration

CL4
enter the arguments for DEST as shown in the following figure:
-filename  path to/TESTS/B_013/B_013.dat
CL5

you are now able to run and debug the code using CLion-IDE.

CL6