COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Please note that the software and its documentation are work in progress. If you find problems or no documentation for something you're looking for please let us know.
The COSMOS/core is the basic element of the COSMOS project with the essential libraries and programs. The api documentation includes the descriptions of the basic support functions necessary to make COSMOS/core work, as well as the most useful agent and support programs. The cosmos core is broadly divided into COSMOS Programs and Core Libraries.
If you haven't downloaded or setup the COSMOS software please go to the COSMOS 101 tutorial. Also for the latest information on COSMOS refer to the website: http://www.cosmos-project.org/. The cosmos-core api documentation is available on http://cosmos-project.org/docs/core/current/ with instructions on how to compile the code in different architectures, the api structure, some tutorials and the description for most classes and functions. Note: remember to update the code regularly (git pull).
Build and install cosmos/core and run two agents that talk to each other. These instructions assume that you are in the cosmos/src/core folder. Make sure you have all the tools required to build COSMOS including Cmake (please check the required setup from https://bitbucket.org/cosmos-project/tutorial/wiki/Setup).
Quick-start:
**1) Using the terminal **
Open a terminal and type
you can make the code compile faster by using multiple cores. This example shows how to use 8 cores:
2) Using Qt Creator
The two COSMOS agents should be talking to each other at this point.
Alternatively you can use the cosmos-core.pro file (qmake) or cosmos-core.qbs (QBS) but these are just experimental build options for the moment.
For more detailed instructions to get started with COSMOS please read the core/docs/README.md inside the documentation folder.
This is only valid for MinGW and GCC compilers (msvc uses Jom to handle multiple cores). To compile the code faster using all the cores on your machine go to Qt Creator -> Projects (icon on left side bar) -> Build Steps -> Make : Details (expand the icon) on arguments add "-j4" or whatever number of cores that your computer supports. In some cases you may have to add a space in between "-j 4". In some cases it is also possible to just add '-j' and the compiler will automatically use as many processes it can to compile. This approach works well on Windows but in Linux it seems to freeze the computer because it starts more threads than cores. Use it with caution. If you really need super compilation times then install MSVC 2013 or above. See the results and make your decision.
Compilation tests from cosmos-core.pro using a Win7 with Qt 5.5.1 MinGW 32 bit, AMD FX(tm)-8120 Eight Core Processor 3.11 GHz, 16 GB Ram, 64 bit OS
Kit | Build Step | Cores used | Compile time |
---|---|---|---|
Desktop Qt 5.5.1 MinGW 32bit | mingw32-make.exe (default) | 1 | 3m 30s |
Desktop Qt 5.5.1 MinGW 32bit | mingw32-make.exe -j4 | 4 | 1m 16s |
Desktop Qt 5.5.1 MinGW 32bit | mingw32-make.exe -j8 | 8 | 1m 4s |
Desktop Qt 5.5.1 MinGW 32bit | mingw32-make.exe -j9 | 8 | 1m 4s |
Desktop Qt 5.5.1 MinGW 32bit | mingw32-make.exe -j | 8 | 58 s |
Desktop Qt 5.5.1 MinGW 32bit | jom.exe (custom step) | 8 | 1m 16s |
Desktop Qt 5.5.1 MSVC2013 64bit | jom.exe (default) | 8 | 30s |
Qt creator on Linux and Windows has an option to close the programs automatically when running another program. You will need to disable this behavior to run the two agents at the same time. Go to Tools > Options > Build and Run > General. Change �Stop applications before building:� to None.