Changes between Version 23 and Version 24 of almosOnTsarDoc
- Timestamp:
- Aug 21, 2012, 10:17:00 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
almosOnTsarDoc
v23 v24 22 22 == Compatibility == 23 23 24 The distribution package contains some binary executables (e.g. GCC cross-compiler, TSAR simulator). These programs can run on a Linux based distribution. They were tested on Ubuntu 10.04/12.04 and on Scientific Linux 6.2. Both 64 and 32 bits host machines are supported.24 The distribution package contains some binary executables (e.g. GCC cross-compiler, TSAR simulator). These programs can run on a Linux based distribution. They were tested on Ubuntu 10.04/12.04 and on Scientific Linux 6.2. Both of 64 and 32 bits host machines are supported. 25 25 26 26 == Setup == … … 36 36 == Start the simulation == 37 37 38 Before ''' any use''' of the distribution package you need to set some environment variables:38 Before '''''any use''''' of the distribution package you need to set some environment variables: 39 39 40 40 {{{ … … 43 43 }}} 44 44 45 '''Note''': by default you have to source this file from its local directory: that is, you have to be in the ''DISTRIB'' directory .45 '''Note''': by default you have to source this file from its local directory: that is, you have to be in the ''DISTRIB'' directory before typing the ''source'' command. 46 46 47 47 Now, lets go to ''DISTRIB/test/pf1'' and run ''make sim1'': … … 56 56 That is it ... you are done !! 57 57 58 The tty0 and tty3 are reserved for the kernel trace and information messages. For a user application, the tty1 represent the stdin and stdout while the tty2 represent the stderr.59 60 ''Sim1'' rule means the simulator of TSAR is configured to one cluster: that is, 4 cores. Using ''sim4'', ''sim16'', ''sim64'' or ''sim128'' lets you start the simulator with (respectively) 4, 16, 64 or 128 clusters of 4 cores each. 58 The tty0 and tty3 are reserved for the kernel logs. For a user application, the tty1 represent the stdin and stdout while the tty2 represent the stderr. 59 60 ''Sim1'' rule means the simulator of TSAR is configured to one cluster: that is, 4 cores. Using ''sim4'', ''sim16'', ''sim64'' or ''sim128'' lets you start the simulator with (respectively) 4, 16, 64 or 128 clusters of 4 cores each. The frame-buffer is only present when using the ''sim1'' rule. For the other supported rules, the frame-buffer is absent. 61 61 62 62 '''Note''': although the hardware configuration can be changed at each simulation, there is no need to recompile or regenerate the kernel. The kernel of ALMOS detects the hardware resources at each boot. A user application can get the number of online cores using the standard ''sysconf()'' call (man sysconf). … … 73 73 The ''kernel-soclib.bin'' file is the ALMOS kernel while the ''bootloader.bin'' file is the ALMOS boot-loader for TSAR. The ''arch-info.bin'' file contains the description of the TSAR hardware resources. This file is regenerated (copied from ''DISTRIB/test/arch-bins'') at each ''make simN'' command. 74 74 75 You can take a look to ''DISTRIB/test/pf1/Makefile''. This file lets you customize some parameters like the used ALMOS kernel revision and the number of simulator threads. If you want to run simultaneously several configurations, lets say 4, you can create 3 additional ''DISTRIB/test/pf![2-4]'' directories each of which with its own customized Makefile. Than in each of these ''pf'' directories you can type your ''make simN'' command.76 77 '''Note''': by default, the location from where the corresponding kernel revision is looked for is ''DISTRIB/test/kern-bins''. The number of simulator's threads should not exceed the number of the physical CPUs (not the logical one) of your host machine. Finally, the hdd-imge.bin is a symbolic link to ''DISTRIB/test/misc/hdd-img.bin'' so be careful to provide an ''hdd-img.bin'' regular file per ''pf'' directory when you run simultaneously a multiple instances of the simulator.75 You can take a look to ''DISTRIB/test/pf1/Makefile''. This file lets you customize some parameters like the used ALMOS kernel revision and the number of simulator threads. If you want to run simultaneously several configurations, lets say 4, you can create 3 additional ''DISTRIB/test/pf![2-4]'' directories each with its own customized Makefile. Than in each of these ''pfX'' directories you can type your ''make simN'' command. 76 77 '''Note''': by default, the location from where the corresponding kernel revision is looked for is ''DISTRIB/test/kern-bins''. The number of simulator's threads should not exceed the number of the physical CPUs (not the logical one) of your host machine. Finally, the ''hdd-imge.bin'' is a symbolic link to ''DISTRIB/test/misc/hdd-img.bin'' so be careful to provide an ''hdd-img.bin'' regular file per ''pfX'' directory when you run simultaneously a multiple instances of the simulator. 78 78 79 79 == Your first application == … … 83 83 1. Write your application 84 84 2. Cross-compile it using ALMOS headers and libraries 85 3. Install it on the hdd-img.binfile system image85 3. Install it on the ''hdd-img.bin'' file system image 86 86 4. Go to your ''DISTRIB/test/pfX'' directory and run the TSAR simulator 87 87 88 Some example of applications source code can be found in ''DISTRIB/apps''. Lets try the ''hello_world'' one. The ''main()'' function of this application asks the system for the number of online cores (''count'') and then it fires ''count'' threads before it synchronizes on their end. Each fired thread executes the ''thread_func()'' function which prints a "Hello World" message.88 Some examples of applications source-code can be found in ''DISTRIB/apps''. Lets try the ''hello_world'' one. The ''main()'' function of this application asks the system for the number of online cores (''count'') and then it fires ''count'' threads before it synchronizes on their termination. Each fired thread executes the ''thread_func()'' function which prints a "Hello World" message. 89 89 90 90 To Cross-compile the application using ALMOS headers and static libraries: … … 110 110 }}} 111 111 112 Wait until you get a prompt on the ''tty1''console, then type:112 Wait until you get a prompt in the tty1 console, then type: 113 113 114 114 {{{ … … 116 116 }}} 117 117 118 The contents of ''/bin'' directory will be listed and the ''hello'' program must figure in the list. To run ''/bin/hello'' program, type the following command on the ''tty1''console:118 The contents of ''/bin'' directory will be listed and the ''hello'' program must figure in the list. To run ''/bin/hello'' program, type the following command in the tty1 console: 119 119 120 120 {{{