Installing NinfG version 5

NinfG is an open source grid middleware which provides a programming framework for grid-based remote procedure calls (GridRPC). It is a reference implementation of the GridRPC API (application programming interface), allowing programmers to create applications that can call procedures/executables installed on remote computers. In particular, it provides client library APIs that can be used to control the execution of remote executables, running these executables remotely when necessary.

NinfG 5.0 is the latest version of NinfG. Unlike previous versions where the Globus Toolkit is required, NinfG 5.0 can now work with non-Globus grid environment. One of its new features is the ability to use SSH to do remote procedure calls via the invoke server mechanism. This is very handy since most Linux systems have already SSH in the default installation, so there is no need to install additional packages to use NinfG. The following paragraphs outline the installation of NinfG on a system running Linux.


1. Download NinfG

You can download NinfG from http://ninf.apgrid.org/. Be sure to get the current version (v. 5.0). You also need to download a patch, which can be found here, for this version. I don’t know if this patch is already incorporated in the package downloadable from the NinfG web site. In the following, I will assume that the download directory is located in /home/user/downloads.

[user@mycomp]$ cd /home/user/downloads/
[user@mycomp]$ ls
ng5-latest.tgz
ninfg.patch

The two files, ng5-latest.tgz and ninfg.patch, should be in the download directory.

2. Extract the files

After downloading the necessary files, you can now extract the files using tar.

[user@mycomp]$ cd /home/user/downloads/
[user@mycomp]$ tar -xzvf ng5-latest.tgz
[user@mycomp]$ ls
ng-5.0.0
ng5-latest.tgz
ninfg.patch

This will create a subdirectory called ng-5.0.0 in the download directory. All the needed files are in this subdirectory.

3. Apply the patch before compiling the package

First, change directory to ng-5.0.0, then run patch as follows:

[user@mycomp]$ cd ng-5.0.0
[user@mycomp]$ patch -p0 < ../ninfg.patch
patching file src/c/client/ngclRemoteClassGenerate.c
Hunk #1 succeeded at 1748 (offset 16 lines).

4. Configure, compile, and install

Now that the patch is applied, you are set to compile and install the package.

</span>[user@mycomp]$ ./configure --prefix=/opt/ng5.0.0 --with-zlib --with-ssh
:
:
[user@mycomp]$ make
:
:
[user@mycomp]$ su -
Password: xxxxxxx
[root@mycomp]# mkdir /opt/ng5.0.0
[root@mycomp]# cd /home/user/downloads/ng-5.0.0
[root@mycomp]# make install
:
:
[root@mycomp]#

In line 1, the configure command is run with several parameters: --prefix=/opt/ng5.0.0 instructs configure to install the package in /opt/ng5.0.0 directory instead of using the default install directory, --with-zlib includes zlib compression support, and --with-ssh includes support for Invoke Server SSH. Invoke Server SSH is a new feature of NinfG allowing the use of SSH to do remote procedure calls instead of completely relying on the Globus Toolkit. To see the complete list of available options, you can run ./configure --help.

Line 2 compiles the package. The output of this command is omitted in the listing above. After compilation, the package is now ready for installation.

Line 4 changes the user to the superuser using the su command. You will need the root password to proceed. If you don’t have root access, you can still install NinfG in a directory where you have read/write permission. However, only you can use NinfG.

As root, create the installation directory (line 9). Then change directory to the location of the NinfG installation package (line 10). In this directory, run make install to install the package. If there are no errors, congratulations! You now have a working NinfG installation.

5. Post installation setup

For convenience, you can include the NinfG executables in your PATH. You can also set several environment variables needed by NinfG. To do this, add two files, namely, ninfg.sh and ninfg.csh, in your /etc/profile.d/ directory.

/etc/profile.d/ninfg.sh:
<pre class="csharpcode">NG_DIR=/opt/ninfg; export NG_DIR
<span class="kwrd">if</span> [ -r ${NG_DIR}/etc/ninfg-user-env.sh ]
then
    . ${NG_DIR}/etc/ninfg-user-env.sh
fi

/etc/profile.d/ninfg.csh:

setenv NG_DIR /opt/ninfg
<span class="kwrd">if</span> ( -r <span class="str">"${NG_DIR}/etc/ninfg-user-env.csh"</span> ) then
    source ${NG_DIR}/etc/ninfg-user-env.csh
endif

Finally, as root, create a symbolic link /opt/ninfg pointing to /opt/ng5.0.0. This is useful when upgrading the version of NinfG. In this case, you only need to change the link to point to the new version to effect the changes.

[root@mycomp]# ln -s /opt/ng5.0.0 /opt/ninfg
[root@mycomp]# ls -al /opt
drwxr-xr-x   7 root root 4096 2008-08-26 12:23 ng5.0.0
lrwxrwxrwx   1 root root   12 2008-08-26 12:33 ninfg -> /opt/ng5.0.0
[root@mycomp]#

That’s it! Enjoy!

You may also like...

1 Response

  1. CS says:

    hey thanks for such an informative install guide.

    I found this and should be able to get things going now.

    cheers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.