Posts tagged ‘Tools’

Compile LAPACK and BLAS as DLL on Windows

BLAS (Basic Linear Algebra Subprograms) is a library that provides standard routines for basic vector and matrix operations.

LAPACK is a library that provides functions for solving systems of linear equations, matrix factorizations, solving eigenvalue and singular value problems. LAPACK library have dependency to BLAS library because of the LAPACK functions using BLAS functions to work.

Both of those libraries are written in Fortran77 and no binaries provided for windows. The sources are downloadable from netlib site. So you can compile and use their libraries. However makefile and make solutions for compiling under windows are cumbersome.

So I recommend compiling directly from the sources using a FORTRAN compiler. There is a free and open source FORTRAN compiler for Windows which is the port of gnu FORTRAN compiler for Windows. You could also use Cygwin and tools in cygwin but your dynamic library loader will have dependency to cygwin dlls. MinGW is a collection of tools that allows you to produce native Windows programs. G77, make, gcc are the common tools provided by Mingw.

Here are the steps to go to compilation

  • Download most current version of LAPACK from Netlib and extract the sources
  • Download almost all of the Mingw tools and extract the tools
  • Copy dlamch.f and slamch.f from INSTALL directory SRC directory
  • Set path to have mingw binaries
    • set PATH=c:\mingw\bin\;%PATH%
  • Go to root directory of the extracted folder and compile using g77
  • First compile BLAS. –shared option is needed in order to functions to be exposed from the dll. -O generates optimised code. -o filename is the output file
    • g77 –shared -o blas.dll BLAS\SRC\*.f –O
  • Compile LAPACK with BLAS dependency
    • g77 –shared -o lapack.dll src\*.f blas.dll -O

Here is the output:

c:\\lapack-3.1.1\\copy INSTALL\\dlamch.f SRC\\dlamch.f
       1 file(s) copied.
c:\\lapack-3.1.1\\copy INSTALL\\slamch.f SRC\\slamch.f
       1 file(s) copied.
c:\\lapack-3.1.1\\set PATH=c:\\tools\\mingw\\bin\\;%PATH%

c:\\lapack-3.1.1\\g77 --shared -o blas.dll BLAS\\SRC\\*.f -O

c:\\lapack-3.1.1\\g77 --shared -o lapack.dll src\\*.f blas.dll -O

Hope this helps.

MsBee, Write Compile Run .Net 1.1 Applications with Visual Studio 2005

I was just willing to write .Net 1.1 applications from Visual Studio 2005. Maybe you may already know but I found that great utility MsBee. You need also .Net Framework 1.1 SDK to make it install and work if you don’t have and surprisingly 1.1 SDK has a size of more than 100Mb.

Anyway, it is good to write .Net Framework 1.1 targeted applications from Visual Studio 2005.

XML Notepad 2.0

Friday surprise from Microsoft, XML Notepad has rewritten in .net framework 2.0 from C++. It seems that the team did a great job. And best part is it will be available on Codeplex as a  community project.

Here are the features that I liked at first view

  • Open source
  • Comes with source code, samples (look at the directory you’ve installed)
  • Very simple user interface
  • Intellisense support based on XSD.
  • Great navigation and adding of XML objects (like element, attribute, comment) simply by providing before and after points.
  • Copy cut paste XML objects
  • Find feature is also nice, it is possible to use regular expressions or Xpath language.
  • XSL Output after the XSLT transformation.
  • Error list similar façon of Visual Studio

You can try and download XML Notepad 2.0

XMLNotepad

Another hidden .Net Tool usage basics: ilMerge

Ilmerge is a great utility for any .net developer. What it does is basically merge the assemblies. Let’s say you have three dll and one exe file, you can just merge those 4 files to 1 file using ilmerge. 
As a matter of fact, it is easy to use, you don’t need any recompilation or any other modification. You don’t need to provide installers since there is only one file.

Ilmerge exists in two versions one for .Net 1.1 and the other is .Net 2.0

Basic Usage

Usage: ilmerge [/lib:directory]* [/log[:filename]] [/keyfile:filename [/delaysig
n]] [/internalize[:filename]] [/t[arget]:(library|exe|winexe)] [/closed] [/ndebu
g] [/ver:version] [/copyattrs [/allowMultiple]] [/xmldocs] [/attr:filename] [/pu
blickeytokens] [/wildcards] [/zeroPeKind] [/allowDup:type]* /out:filename <prima
ry assembly> [<other assemblies>...]

Although the help explains very well, here is the usage.

C:\Program Files\Default Company Name\ILMergeBinaryDistribution7>Ilmerge /t:exe
/out:outputfile.exe file1.exe file2.dll

/t us used for the output of the file, exe is for a console application, winexe is for windows forms application and library is for the dlls.

/out is for the name of the output file.

the last parameters are the assemblies to be compined. Attention here is that the first one should be the exe one instead of the class library, becuase it merges the following files to the first file.

Advanced Usage

ILmerge is also usable as a class library for your project. What you need to do is to add the ilmerge executable as a reference and use the namespace of it to do some tasks. The class library is very similar to the console commands.

Oracle SQL Developer

I use for TOAD the development as the oracle IDE like most people. When I’ve heard about oracle sql I was wondered, first of all it is developed by the oracle itself, second it’s free :)The first version of the product was bad, I was unable yo use it properly, but with the patch 2 it is much better. I suffer TOAD a lot while writing pl-sql. I am not feeling very comfortable without intellisense, and Oracle Sql Developer does that great.

Screenshots

Connection Settings Window, very simple to configure.

Connection Settings

Editing a stored procedure

SQL Developer Procedure Edit

Intellisense on table names, table columns, procedure names, packet names

Intellisense

Query with Grid

Microsummary Generator plugin for Wordpress

Firefox 2.0 Beta 1 supports a new feature called microsummaries . It is a kind of smart bookmark feature added to firefox.
However because firefox 2 is beta,  I think they don’t support dynamic files. What it looks for an xml file is the extension xml. As a result it can’t use for the dynamic results as php for our case. I hope that this will be solved on the final product, I just mailed mozilla support team for this issue. Maybe this is by design, but it should support dynamic xml files.

Issues

It’s funny I know, but this plugin is not working :) This is because  firefox want static xml file. I made this plugin without knowing that, as a result waiting for them to support it.

Installation

To install it. Extract the generator file (microsummary-generator.php) to your plugin folder. And the xml file (microsummary.php) to your blog’s root folder. Then add MicroSummaryBookmark() function to your theme file. Actually this provides the link to be put on your page. So you can put this file wherever you want to see in your page.

Screenshots

Link to Microsummary Add to Microsummaries  Generated Error

Download

.