Libraries usage

From HP-SEE Wiki

(Difference between revisions)
Jump to: navigation, search
m (mpiBLAST)
Line 8: Line 8:
In order to explore the capabilities of the free quantum-chemical software Firefly PCGamess, appropriate purely organic molecules were chosen, with the aid, on a later stage the program to be applied to metal-containing systems, like cisplatin analogues. The work done has thus an important methodological significance. Molecular mechanics conformational search for the two species was performed, and the global minimum-energy conformations thus obtained, were further optimized at HF ab initio (3-21G** basis set, Firefly PCGamess) level of theory.  In both cases, specific, scorpion-like conformations are realized, with hydrogen bonds involving the guanidino-group and the phenolic hydroxyl. The application was porting to MPI using GAMESS application software on the HPCG cluster at IICT-BAS. A lot of MPI tests were done up to 32 cores to optimize the application. A good parallel efficiency is obtained up to 32 cores on HPCG cluster. Some problems were solved considered different versions of Gamess software application. All tasks using Gamess are compiled on HPCG cluster with licensed Intel MKL (Math Kernel Library) compiler.
In order to explore the capabilities of the free quantum-chemical software Firefly PCGamess, appropriate purely organic molecules were chosen, with the aid, on a later stage the program to be applied to metal-containing systems, like cisplatin analogues. The work done has thus an important methodological significance. Molecular mechanics conformational search for the two species was performed, and the global minimum-energy conformations thus obtained, were further optimized at HF ab initio (3-21G** basis set, Firefly PCGamess) level of theory.  In both cases, specific, scorpion-like conformations are realized, with hydrogen bonds involving the guanidino-group and the phenolic hydroxyl. The application was porting to MPI using GAMESS application software on the HPCG cluster at IICT-BAS. A lot of MPI tests were done up to 32 cores to optimize the application. A good parallel efficiency is obtained up to 32 cores on HPCG cluster. Some problems were solved considered different versions of Gamess software application. All tasks using Gamess are compiled on HPCG cluster with licensed Intel MKL (Math Kernel Library) compiler.
 +
 +
=== libtiff ===
 +
 +
''Section contributed by UVT''
 +
 +
FuzzyCmeans used a special library, libtiff, to deal with the digital images involved in the computational process. Libtiff (http://www.libtiff.org/) was compiled for BG/P@UVT and InfraGRID cluster without any specific optimizations.
 +
 +
The workflow dealing with satellite images (most of the time in TIFF format) using libtiff library is the following:
 +
 +
1.  open the TIFF image in memory
 +
 +
  TIFF* image;
 +
  if((image=TIFFOpen(name , "w")) == NULL)
 +
        {
 +
      printf("Error open the output file");
 +
      return -1;
 +
        }
 +
 +
2. read image header and set some global variables for later use (image coordinates, image size, image bands etc.)
 +
 +
    TIFFGetField(image, TIFFTAG_BITSPERSAMPLE, BPS);
 +
    TIFFGetField(image, TIFFTAG_SAMPLESPERPIXEL, SPP);
 +
    TIFFGetField(image, TIFFTAG_ROWSPERSTRIP, RPS);
 +
    TIFFGetField(image, TIFFTAG_XRESOLUTION, XR);
 +
    TIFFGetField(image, TIFFTAG_YRESOLUTION, YR);
 +
    TIFFGetField(image, TIFFTAG_RESOLUTIONUNIT, RuN);
 +
    TIFFGetField(image,TIFFTAG_IMAGEWIDTH, width);
 +
    TIFFGetField(image,TIFFTAG_IMAGELENGTH, height);
 +
 +
3. read image values (define a structure that can hold the entire image, read each pixel value and assign it to the tiff structure)
 +
 +
  uint32 *raster= (uint32*) _TIFFmalloc(width*height*sizeof(uint32));
 +
  // read the entire image
 +
  if(TIFFReadRGBAImageOriented(image, width, height, raster, ORIENTATION_TOPLEFT, 1))
 +
        {
 +
  // process the raster to compute the image 
 +
            }
 +
 +
4. when all computations are done then write the virtual image from memory on the disk and free up memory
 +
 +
  char *buffer;
 +
  TIFF* image;
 +
  buffer=malloc(width*height*sizeof(char));
 +
  // open a new file on disk for writting
 +
  if((image=TIFFOpen(name , "w")) == NULL)
 +
        {
 +
      printf("Error open the output file");
 +
      return -1;
 +
        }
 +
  // set initial TIFF headers
 +
  TIFFSetField(image,TIFFTAG_IMAGEWIDTH, width); 
 +
  TIFFSetField(image,TIFFTAG_IMAGELENGTH, height);
 +
  TIFFSetField(image, TIFFTAG_BITSPERSAMPLE, 8);
 +
  TIFFSetField(image, TIFFTAG_SAMPLESPERPIXEL, 1);
 +
  TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(image, 0));
 +
  TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
 +
  TIFFSetField(image, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
 +
  TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
 +
  TIFFSetField(image, TIFFTAG_XRESOLUTION, XR);
 +
  TIFFSetField(image, TIFFTAG_YRESOLUTION, YR);
 +
  TIFFSetField(image, TIFFTAG_RESOLUTIONUNIT, RuN);
 +
  // For each pixel find the closest center and set the corresponding gray level in the output image
 +
  for(i=0;i<height*width;i++) {
 +
  // fill the buffer with gray level values
 +
  …
 +
  Buffer[i] = value;
 +
  …
 +
  }
 +
  // write values to the file
 +
  for(i=0;i<height;i++)
 +
      {
 +
      TIFFWriteScanline(image,&buffer[i*width], i,0);
 +
      }         
 +
  TIFFClose(image);
 +
 
 +
The snippets presented are only parts of the entire program and must be used as an usage example. For more details please consult the library API.

Revision as of 18:13, 10 April 2012

mpiBLAST

Section contributed by SZTAKI

GAMESS

Section contributed by IICT-BAS

In order to explore the capabilities of the free quantum-chemical software Firefly PCGamess, appropriate purely organic molecules were chosen, with the aid, on a later stage the program to be applied to metal-containing systems, like cisplatin analogues. The work done has thus an important methodological significance. Molecular mechanics conformational search for the two species was performed, and the global minimum-energy conformations thus obtained, were further optimized at HF ab initio (3-21G** basis set, Firefly PCGamess) level of theory. In both cases, specific, scorpion-like conformations are realized, with hydrogen bonds involving the guanidino-group and the phenolic hydroxyl. The application was porting to MPI using GAMESS application software on the HPCG cluster at IICT-BAS. A lot of MPI tests were done up to 32 cores to optimize the application. A good parallel efficiency is obtained up to 32 cores on HPCG cluster. Some problems were solved considered different versions of Gamess software application. All tasks using Gamess are compiled on HPCG cluster with licensed Intel MKL (Math Kernel Library) compiler.

libtiff

Section contributed by UVT

FuzzyCmeans used a special library, libtiff, to deal with the digital images involved in the computational process. Libtiff (http://www.libtiff.org/) was compiled for BG/P@UVT and InfraGRID cluster without any specific optimizations.

The workflow dealing with satellite images (most of the time in TIFF format) using libtiff library is the following:

1. open the TIFF image in memory

 TIFF* image;
 if((image=TIFFOpen(name , "w")) == NULL)
        {
 	     printf("Error open the output file");
 	     return -1;
        }

2. read image header and set some global variables for later use (image coordinates, image size, image bands etc.)

   TIFFGetField(image, TIFFTAG_BITSPERSAMPLE, BPS);
   TIFFGetField(image, TIFFTAG_SAMPLESPERPIXEL, SPP);
   TIFFGetField(image, TIFFTAG_ROWSPERSTRIP, RPS);
   TIFFGetField(image, TIFFTAG_XRESOLUTION, XR);
   TIFFGetField(image, TIFFTAG_YRESOLUTION, YR);
   TIFFGetField(image, TIFFTAG_RESOLUTIONUNIT, RuN);
   TIFFGetField(image,TIFFTAG_IMAGEWIDTH, width);
   TIFFGetField(image,TIFFTAG_IMAGELENGTH, height);

3. read image values (define a structure that can hold the entire image, read each pixel value and assign it to the tiff structure)

 uint32 *raster= (uint32*) _TIFFmalloc(width*height*sizeof(uint32));
 // read the entire image
 if(TIFFReadRGBAImageOriented(image, width, height, raster, ORIENTATION_TOPLEFT, 1)) 
       	{
 		// process the raster to compute the image  
           }

4. when all computations are done then write the virtual image from memory on the disk and free up memory

 char *buffer;
 TIFF* image;
  buffer=malloc(width*height*sizeof(char));
 // open a new file on disk for writting
 if((image=TIFFOpen(name , "w")) == NULL)
        {
 	     printf("Error open the output file");
 	     return -1;
        }
 // set initial TIFF headers
 TIFFSetField(image,TIFFTAG_IMAGEWIDTH, width);   
 TIFFSetField(image,TIFFTAG_IMAGELENGTH, height);
 TIFFSetField(image, TIFFTAG_BITSPERSAMPLE, 8);
 TIFFSetField(image, TIFFTAG_SAMPLESPERPIXEL, 1);
 TIFFSetField(image, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(image, 0));
 TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
 TIFFSetField(image, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB);
 TIFFSetField(image, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
 TIFFSetField(image, TIFFTAG_XRESOLUTION, XR);
 TIFFSetField(image, TIFFTAG_YRESOLUTION, YR);
 TIFFSetField(image, TIFFTAG_RESOLUTIONUNIT, RuN);
 // For each pixel find the closest center and set the corresponding gray level in the output image
 for(i=0;i<height*width;i++) {
 	// fill the buffer with gray level values
 	…
 	Buffer[i] = value;
 	…
 } 
 // write values to the file
 for(i=0;i<height;i++)
      {
 	    TIFFWriteScanline(image,&buffer[i*width], i,0);
      }          
  TIFFClose(image);
 

The snippets presented are only parts of the entire program and must be used as an usage example. For more details please consult the library API.

Personal tools