SILC Binary Package for Win32

Version: 1.3 (October 31, 2007)

Introduction

This file describes how to use a binary package of SILC precompiled for Win32 environments. A binary package is distributed in the form of a zipped archive having a file name like silc-1.3-mingw32.zip. The package contains a set of executable files, including both a SILC server and sample user programs for SILC. The package has been tested on Windows XP SP2. If you have a Windows machine and you want to try out SILC by playing with some sample user programs, the binary package will meet your needs.

Quick start

  1. Extract all files in the binary package into a directory. In this document, it is assumed that the extracted files exist in the C:\silc-1.3\ directory.

  2. Open a command prompt (e.g., by selecting the Start menu >> All Programs >> Accessories >> Command Prompt) and change the current directory to the C:\silc-1.3\src\server\ directory as follows:

    > C:
    > cd \silc-1.3\src\server
    

    Start a SILC server by running server.exe as follows:

    > server
    

    The server runs in the foreground, printing some debugging information as illustrated below:

    single thread
    load_modules("./modules/formats")
    silc_register_format("SILC:dense (column major)")
    silc_register_module("dense")
    silc_register_format("SILC:Band")
    silc_register_module("sparse_band")
    silc_register_format("SILC:CRS")
    silc_register_module("sparse_crs")
    silc_register_format("SILC:JDS")
    silc_register_module("sparse_jds")
    load_modules("./modules")
    silc_register_module("blasmodule")
    silc_register_module("coremodule")
    silc_register_module("leq_cg")
    silc_register_module("leq_gs")
    silc_register_module("leq_lis")
    silc_register_module("leq_lu")
    silc_register_module("linpackmodule")
    
  3. Open another command prompt and change the current directory to C:\silc-1.3\src\client\. This directory contains executable files of sample user programs for SILC:

    > C:
    > cd \silc-1.3\src\client
    

    Run a user program (demo3.exe for instance) in the new command prompt as follows:

    > demo3
    

    This program establishes a connection to the SILC server that is running in the other command prompt, and solves a system of linear equations Ax = b by means of an appropriate linear solver that the server makes available. The program prints some debugging information and terminates after displaying its execution time (in seconds) and the solution's residual norm ||b-Ax|| as illustrated below:

    0.063935s
    ||b-Ax|| = 3.839510e-015
    

    The actual numbers may vary; if you get similar results, the program works fine.

  4. You can also use the console program (console.exe) in the same directory to interactively carry out matrix computations by means of SILC's mathematical expressions:

    > console
    

    The following example shows how to compute matrix-vector products A * b and b' * A using the console program, where A is a 2-by-2 matrix, b is a 2-vector, and the single quote ' means transposition:

    > A = {1, 2; 3, 4}
    > b = {5, 6}
    > x = A * b
    > pprint x
    column vector, 2 elements of int
      [1] = 23
      [2] = 34
    > x = b' * A
    > pprint x
    row vector, 2 elements of int
      [1] = 17
      [2] = 39
    >
    

    Letters after > of each line are user's input. Type Ctrl-Z to exit. For more information, take a look at the README.console.en file.

Note: If you get some error message with regard to .dll files, try setting the PATH environment variable as follows:

> set PATH=C:\silc-1.3\src\server;%PATH%

Creating user programs for SILC

SILC User's Manual describes how to develop application programs (referred to as user programs) for SILC. The manual deals with user programs written in C and Fortran.

You can also write user programs for SILC in object-oriented scripting language Python (http://www.python.org/). At the moment, however, there is no document about the development of user programs in Python. It is worth noting that there is a good correspondence between user programs in Python and those in C. You can find sample programs in Python in the src\client\python\ directory.

What you need to do to create a user program in C and Fortran is summarized as follows:

  1. Include a header file for SILC in the beginning of the user program: src\client\client.h is the header file for C, and src\client\fortran\client.h is the one for Fortran.
  2. Link either src\client\client.c or src\client\libsilc.a to the user program, together with the WinSock2 library.

The rest of this section describes how to compile a sample program mmul.c, which computes a square of matrix A (i.e., a matrix-matrix product), by using Microsoft Visual Studio .NET 2003 as well as MinGW (GCC for Windows). The source code of mmul.c is as follows (please consult "SILC User's Manual" for the details of functions and constants in the code):

#include <stdio.h>

#include "client.h"

int main(int argc, char *argv[])
{
  silc_envelope_t object;
  double A[4] = {1.0, 2.0, 3.0, 4.0};
  double X[4];

  SILC_INIT();

  object.v = A;
  object.type = SILC_MATRIX_TYPE;
  object.format = SILC_FORMAT_DENSE;
  object.precision = SILC_DOUBLE;
  object.m = object.n = 2;
  SILC_PUT("A", &object);

  SILC_EXEC("X = A * A");

  object.v = X;
  SILC_GET(&object, "X");

  SILC_FINALIZE();

  printf("A =\n");
  printf(" %e %e\n", A[0], A[2]);
  printf(" %e %e\n", A[1], A[3]);
  printf("A * A =\n");
  printf(" %e %e\n", X[0], X[2]);
  printf(" %e %e\n", X[1], X[3]);
}

Copyright and license

The copyright holder of this software is the SSI Project. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the LICENSE file for the precise terms and conditions for the use of this software.

This software contains the following pieces of software by other people and projects. Please use them according to the license terms and conditions specified by their copyright holders.

Contact

We appreciate your comments, bug reports, feature requests, and so on. Please feel free to use the following address to write us:

The SSI Project <devel at ssisc.org>

$Id: README.win32.en,v 1.11 2007/10/31 05:18:48 kajiyama Exp $