Instructions for using ACE & TAO for CS 282

Instructions for using ACE & TAO for CS 282

A frozen version of ACE and TAO have been setup under the directory /project/doc/tmp/frozen/ACE_wrappers This directory should be accessable from CEC, ARL and CS hosts.

What is ACE:

"The ADAPTIVE Communication Environment (ACE) is a freely available open source object-oriented (OO) framework that implements many core design patterns for concurrent communication software. ACE provides a rich set of reusable C++ wrappers and framework components that perform common communication software tasks across a range of OS platforms. The communication software tasks provided by ACE include event demultiplexing and event handler dispatching, signal handling, service initialization, interprocess communication, shared memory management, message routing, dynamic (re)configuration of distributed services, concurrent execution and synchronization. "

For more information see ACE and TAO .

By semesters end we will all be experts in the use of ACE and TAO - or maybe after the 2nd assignment ;)

The details:

I have built ACE and TAO on Solaris 2.5.1 using both Sun C++ and GNU g++ (Note, egs does not appear to be installed on SunOS 2.5.X hosts) - CC: WorkShop Compilers 4.2 21 Apr 1997 C++ 4.2 patch 104631-02 and gcc version 2.7.2.3

When building applications using ACE and TAO you will need to link in several libraries plus reference the appropriate directories for the header files. I have created a short script(s) to deal with setting up the ACE programming environment. It can be supplied with one argument to indicate whether g++ or sunCC should be used.

Execute the script like this to setup your environment:

bash and friends:

. /project/doc/tmp/frozen/ACE_wrappers/frozen_bin/ace_setup [sunc++ | g++]

csh, tcsh and friends:

source /project/doc/tmp/frozen/ACE_wrappers/frozen_bin/ace_setup.csh

Note the csh script does not take any arguments. If no arguments are specified then g++ is selected. For both scripts you can define an environment variable to select the compiler used, for example:

bash and friends, edit .profile or .bash_profile:

choice=sunc++

. /project/doc/tmp/frozen/ACE_wrappers/frozen_bin/ace_setup

csh, tcsh and friends:

set choice = sunc++

source /project/doc/tmp/frozen/ACE_wrappers/frozen_bin/ace_setup.csh

I copied the code from the first and 3rd tutorials into /project/doc/tmp/frozen/ACE_wrappers/Frozen_Examples to demonstrate how you can build an application.

So, to build these two tutorials using g++ you would

Packages needed:

Use the pkgshow command to see what packages you currently have defined. To use the gnu c++ compiler (g++) you will need the gnu package.

pkgadd gnu

In order to use the Sun c++ (CC) compiler you will need the sc package.

pkgadd sc

Setting your login environment

So you don't have to source the setup file each time you open a window, edit your login script (.cshrc, .profile or .bashrc) so that the script is automatically sources, plus you can make sure you are using gnu's make. path.

csh users:

Edit your .cshrc

vi ~/.cshrc

Than add the commands to source the script,

set choice=sunc++

source /project/doc/tmp/frozen/ACE_wrappers/frozen_bin/ace_setup.csh

Also make sure you get GNUs make, I like to use an alias as gmake, that way I *know* which make I am using:

alias gmake /pkg/gnu/bin/make

Save the file and quit vi (is there any other editor ;)

:wq