Tricks to Update Toshiba/Sony notebook ATI display driver

Tricks to Update Toshiba/Sony  notebook ATI display driver

The PDF file with figures can be downloaded via this link:

Trickes to update ATI display driver on Toshiba Sony Laptops

———————-text without figures ————————-

If you run directly ‘catalyst_mobility_64-bit_util’, you will get such error:

“ATI Catalyst Mobility cannot be downloaded due to incompatible hardware/software on your computer.

The version of your graphics adapter is not supported”.

Manually updating drive by point to the folder containing the ATI driver(79.8MB version)  also fails. The OS thinks the driver for VGA has been updated!

Analysis:

In device manager, the graphics adapter is shown as standard VGA adapter,

not ATI HD Radeon, The Notebook manufacturer may play a trick to disguise the device as NOT ATI GPU.

The ATI website is blocked by the notebook OS.

(1)    Solution one: easy and quick

download and install the package:

11-4_mobility_vista_win7_64_dd_ccc_ocl.exe

“dd”mean with display driver, which can install the display driver when install CCC

www2.ati.com/drivers/mobile/11-4_mobility_vista_win7_64_dd_ccc_ocl.exe

(2)    Solution two:   may not work for you

Problems with manually updating driver:

via leading the driver update program  to the folder containing the ATI driver(79.8MB version)

Have disk, then point to  package/Driver/W7*/*.inf

it  fails in my place. The OS thinks the driver for VGA has been updated!

Solution three:  last resort, take longer time

(1)    First download the 2011 April display driver

Not the 1.1 MB webinstaller , but the Individual download  79.8 MB

Best with : www2.ati.com/drivers/mobile/11-4_mobility_vista_win7_64_dd_ccc_ocl.exe

(2)    Download the notebook display driver from the

Make sure you have uninstall the previous ATI driver first

Unpack the driver, the folder should contain following files and folders

All files above the ‘tinstall’ are from ATI display driver, 10.05 version. Copy all the files folders in the unpacked 11.04 driver to replaces all in this folder

(3)Then run the ‘tinstallwb’, instead of the ‘setup.exe’ from ATI which will not show you the option to install the ‘display driver’ option

ATI Display Driver    is shown as selectable

The display drive still shows  as older version 2010 May, but has been pointed to newer installer

(4)The installation takes 10 minutes to finish.

The screen resolution will NOT change when installing the driver.

There is a warning: see the install log

(5)Reboot.

The display and 3D games seems fine.

The driver vision still shows as 10.05    8.712.2.1000

Not the latest  Catalyst™ 11.4 Update Driver (8.841)  for AMD APP SDK v2.4

Recompile OpenFoam from double precison to single precision

Recompile OpenFoam from double precison to single precision

————Why?
For, I just want to play with GPGPU
Some of the ATI cards does not support double precision for openCL;
use speedIT openfoam plugin on cuda platform。

Follow the instructions for compile OF

http://www.openfoam.com/download/source.php

————–preparation
make sure you have install the Double precison OF sucessfully,
There are quite a lot dependencies, you must meet, or the compiling will stop with error.

you DO need to download src pack.

check gcc version, must be >=4.4,

export WM_COMPILER=<pathofgcc44>/gcc

or edit the wmake/rulels/<platform>/c  and c++

% cd $HOME/OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64Gcc
% vim c
cc = gcc44 -m64
% vim c++
CC = g++44 -m64

—————edit env. var.
gedit $WM_PROJECT_DIR /etc/bashrc
# change from default DP to SP
the file look like

# WM_ARCH_OPTION = 32 | 64
: ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION
# this is the OS , 32bit Linux or 64bit linux, leave it because you just recompile it

# WM_PRECISION_OPTION = DP | SP
: ${WM_PRECISION_OPTION:=DP}; export WM_PRECISION_OPTION

————check the env
$ source ~/.bashrc
$ env|grep WM_*

WM_OPTIONS=linux64GccSPOpt
WM_PRECISION_OPTION=SP    # just check this line,
WM_ARCH_OPTION=64      #if you OS is 64bit,

—————–test compilation
$foamSystemCheck

—————-compile
Go to the top-level source directory $WM_PROJECT_DIR
and execute the top-level build script ./Allwmake.

——————test
$icoFoam
Thirdparty

————done.

Tested on OF1.7.1  Linux64 or Linux32

May 2011

Technical note: Parallelization of sparse matrix solver for OpenFoam using openCL

Technical note:  Parallelization of sparse matrix solver for OpenFoam using openCL

Authored by:  Qingfeng XIA

Date: March 09, 2011

Code License: free of charge without any warranty

This is the a short report of my current coding progress, corresponding to my pronunciation on the new year day 2011.

Introduction:

Background:

Although there is GPU computation plugin for OF, such as Classic SpeedITTM toolbox 1.1 using CUDATM technology, it is not free for double precision version. Meanwhile, OpenCLTM is an open industrial standard supported my various HPC platforms; it is free to be integrated into the open source OF.

Object:

Combination of the MPI and OpenCLTM on OpenFaomTM (OF) makes the fast simulation affordable for personal cluster.  Although large scale problems can not be conducted directly on the limited memory capacity on GPU, partition decomposition techniques using MPI is ready to fix this drawback. Currently, I paralleled the solvers of PCG(Preconditioned Conjugate Gradient) and PBiCG via the individual openCL utility codes. And these solvers are compatible with MPI environment.

Coding

OS: Linux 32bit and 64bit

OpenCL: AMD STREAM SDK 2.2

OpenFoam 1.7.1 Single precision build

Currently, the double precision openCL library does not work properly on my GPU.

IDE: Codelite

(1) clPCG and clPBiCG solver class : parallel the serial solver classes clPCG and clPBiCG in OF1.7.1

(2) vclPCG and vclBiCG ; wrapper class based on the CG and BiCG function of the ViennaCL 1.1.  However, this part of work is not completed, due to the compilation errror to compile  viennaCL library using wmake of OpenFoam.

The correctness of the code is checked by the comparison result from the

Profiling

1 Description of profiling platform

Platform:  Sony Notebook ;  OS:  Ubuntu 10.04 32bit

Flatform CPU:  i5 M450 GPU Radeon HD4650
Frequency(GHz) 2.4 0.53
Cores(PE  GPU) 4 320
Mem(GBytes) 4G  DDR3 1.0 DDR3
Mem freq(GHz) 0.79
Gflops

local_work_size(0) is set to 64, which is the optimal for ATI cards in most cases

ViennaCL bench test the there is a 80% performace improvement on GPU over CPU on my laptop, i.e. the acceleration ratio is 1.8.

2 The profiling methods

(1) Source code insertion:

C++ profiling code( using clock() functions of the standard C library) has been inserted at the beginning and ending of the main() function of the icoFoam.C, in order to calculate the total duration of the icoFoam progam.   C++ profiling code inserted at the beginning and ending of the solve() function in the following solvers: (a) the original serial solver: PCG and PBiCG solver class; (b) : clPCG and clPBiCG solver class, : vclPCG and vclPBiCG solver class. The accumulation calculation time and the total call number are recorded.

(2)Other Third-party tools, such as Totalview. AMD stream SDK 2.2 contains a  profiler for Windows platforms, but it seems not available for Linux platform stream SDK.

(3)OpenFoam text output

OpenFoam text output is used as approximate profiling tools without any coding effort. Code insertion will be done only if necessary.The profiling is limited to computation time, Memory profiling is not necesseary to be conducted.

Test cases

Case:   Lip-driven cavity

The default geometry scale ratio from 0.1 to 1, but keeps the time steps as 0.005 seconds.  The simulation duration is from t=0.0->0.02s. Mesh: Structural mesh generated by the blockMesh tools. However, more iteration is need for finer mesh for every time steps.

Using the OpenFoam output as the profiling, but it seems not precise with the computer timing.

t=0.0->0.02s icoFoam clIcoFoam
100X100 mesh 1.0 6
200X200 mesh 9 51

Result

Unfortunately,  the openCL solver is 6 times slower than than CPU code.

To-do:

(1) Using float4 data format to improve the performance

(2) Function profiling should be condect to find out the bottleneck of the parallel code;

(3)Change to another hardware platfrom to test the code performace. Single precision has been tested on ATI ;   double scalar on NV GPU is not tested. Dynamic link the openCL lib, The solver should be compiled and released at shared lib: clFoam.so !

Future work

(1) Develop a  general openCL library in C, including a scheduler  for multiple GPUs and common data structure: clVector, etc.

(2)  Develop a whole set of solvers for OF after test and reconstruction for portable flexibility and improved performance. There are other field and matrix opporation has not been parallelized. e.g. declare a class clField {N, Alignment, MemOnGPU } .

Reference:

[1] profiling tools

[2] High Performance C++ Profiling clock() is good enough on Linux

move/change installed software’s installing path 移动已安装软件的安装路径 exampled by matlab

修改 已安装软件的安装路径

F:\Program Files\MATLAB\R2007a\
->C:\Program Files\MATLAB\R2007a\

First, if the file is on your local harddisk, you can just make a shortcut, e.g. I can solve: move proE on C: to D:

or, it is not on your external disk or netdisk, you need to search and edit registry(注册表) to make it go.

分享 online KTV website http://www.dfktv2.com

I have tested it, it worked。
It should be safe, it is based on Flash Player with micro phone support you may need to change “settings” of flash player to let micro phone work.

You can mute human voice by switch the sound track in play control (通过在播放控制中的切换声道按钮,可以消去原唱)

效果还可以,当然不能和KTV 包房比,不过这里太贵。 聊胜于无

Happy New Year 2011

fluent VOF initialization patch instead of UDF define_INIT

Recently, I am doing VOF simulation on Fluent 6.3, But I can not init the mass-fraction in define_INIT()

————————–reply from fluent tech support———————

the Patching option in the GUI panel of Fluent which is more easier and straight forward compared to UDF Hook.(init hook)

—————-this is how this been done:—————–

25.14.2 Patching Values in Selected Cells

In the patching option, you can locate the region through

ADAPT > REGION > select Quad (Inside)

> define x & y values > Click on "Mark" on the panel,

Caution"!!!: do NOT click "Adapt", it will change mesh.

clip_image002

Now in the solution intialization, you can patch the region with the defined VOF value to the region.

Select “Register to patch” , NOT fluid in “Zone to patch”(global zone)

clip_image004

Please refer to the link below for more details on Patching,

If the value is not uniform, you can use the Custom Field function to calculate the initial value, usually, only the coordination info is needed

clip_image006

http://www.fluentusers.com/fluent/doc/ori/v121/commonfiles/help/en-us/FLUENT/pdf/tg/tut18.pdf

 

C_VOF(cell,cell_thread) may never be able to be set a value!

 

 

—————————–my example UDF , it does NOT work ————————–

/* domain pointer that is passed by INIT function is mixture domain */

DEFINE_INIT(my_init_func,d)

{

/*

//Domain *d= Get_Domain(3);

//Thread *t=Lookup_Thread(d,6);

//Thread *mix_th=THREAD_SUPER_THREAD(t)

*/

int phase_domain_index;

cell_t cell;

Thread *cell_thread;

Domain *subdomain;

real xc[ND_ND];

real vof = 1.0;

//real x,y; /* the coord */

/* loop over all subdomains (phases) in the superdomain (mixture) */

sub_domain_loop(subdomain, d, phase_domain_index)

{

/* loop if secondary phase */

if (DOMAIN_ID(subdomain) == 3)

/* loop over all cell threads in the secondary phase domain */

thread_loop_c (cell_thread,subdomain)

{

/* loop over all cells in secondary phase cell threads */

begin_c_loop_all (cell,cell_thread)

{

C_CENTROID(xc,cell,cell_thread);

if( (xc[0] >0.0 && xc[0]<0.0178 ) && (xc[1]>0.0 && xc[1]<0.0275) )

{

C_VOF(cell,cell_thread)=vof; // VOF mass fraction, if species is used,C_YI()

}

}

}

}

}

ubuntu scite Set up Java Python C/C++ FORTRAN Development Environment on SciTE

————————————–
Set up Java Python C/C++ FORTRAN Development Environment  on SciTE
———————————————————————–
for Java and python, is already setup and work perfect on ubuntu, but
C and Fortran compilation does not work without setup
here is how I setup the scite

——————————–

setup the python indentation
—————————–

# Indentation for python
tabsize=4
indent.size=4
use.tabs=0
#indent.auto=1
indent.automatic=1
indent.opening=1
indent.closing=1
#tab.indents=4
#backspace.unindents=4

——————————-

single file C/C++ Compile and run
————————————
ccopts=-pedantic -Os
cc=g++ $(ccopts) -c $(FileNameExt) -o $(FileName).o
ccc=gcc $(ccopts) -c $(FileNameExt) -o $(FileName).o

make.command=make
command.compile.*.c=$(ccc) -std=c99
command.build.*.c=$(make.command)
command.build.*.h=$(make.command)
command.go.*.c=./$(FileName)

# most important,  uncomment this line
# To make the Go command both compile (if needed) and execute, use this setting:
command.go.needs.*.c=gcc $(ccopts) -std=c99 $(FileNameExt) -o $(FileName)

—————————userProperties
file——————————————-
ccopts=
————————–CFLAGS———————————
# # set the ccopts for wxWidgets
# OpenGL  -lglut -lGL -lGLU -lX11  -lm
# `wx-config –cxxflags`  `wx-config –libs`
# OpenCL
## write a make for multiple fiels
ccopts=-pedantic -Os -lglut -lGL -lGLU -lX11  -lm `wx-config
–cxxflags`  `wx-config –libs`
———————————————————————
we need a make file for multiple files CC
a template of makefile is attached

————————-

fortran
—————————–

# how to setup the compile options?
gfortran is just like gcc,
gfortran [-c|-S|-E] [-g] [-pg] [-Olevel] [-Wwarn...] [-pedantic]
[-Idir...] [-Ldir...] [-Dmacro[=defn]…] [-Umacro] [-foption...]

#add a var: fcopts=   in userProperties file, so It can be change
options quickly for

# how to add fortran cc options, add more lib module? such as Lapack blas lib
fcopts=-L/usr/local/lib -llapack -lblas

# change the compile command to compile and link the single file mode:
# fc90=gfortran -c -o $(FileName).o $(FileNameExt)
# change to directly compile and link fotran
#   fc90=gfortran  -o $(FileName) $(fcopts) $(FileNameExt)

# a ./ is need to add to run the program:
# command.go.*.f=./$(FileName)

for multiple file . use a makefile

———————————————————————
open *.py by scite
———————————————————————–

——————————chinese input support——————
(1):在Internationalisation一段中,增加code.page=936和character.set=134两行,
其他的都注释掉。不然选择中文时出现乱码。这两项是中文的字符编码。

———————————-

set as default python editor
———————————————-
grep gedit /usr/share/applications/defaults.list | sed s/gedit/scribes/g
It is possible to set any mime type and any program that has a *.desktop entry.
Find out your favorite program’s desktop entry by looking in this folder:
/usr/share/applications/

set as default python editor
text/x-python=gedit.desktop
text/x-csrc=gedit.desktop # C/C++ files

change to scite.desktop

————————————————————————————————————
following words are copied from internet: with some of my commend

Anon 21:41, after some struggle, this is what ended up working for me:

$ sudo update-alternatives –install Scite gnome-text-editor /usr/bin/scite 1
————-I got error?———–
update-alternatives: error: alternative link is not absolute as it
should be: Scite
——————————————

$ sudo update-alternatives –config gnome-text-editor

# here, I noticed a symlink was gone – but most likely because I was
messing with the system previously
$ ls -la /usr/bin/gnome-text-editor
ls: cannot access /usr/bin/gnome-text-editor: No such file or directory

sudo ln -s /etc/alternatives/gnome-text-editor /usr/bin/gnome-text-editor

# test from command line (with existing test.txt file in the calling folder)

/usr/bin/gnome-text-editor test.txt

# all fine here, yet right-click and “open with Text Editor” in
Nautilus still fails

# edit:
$ nano ~/.local/share/applications/mimeapps.list

# and you can notice that for text/plain, gedit.desktop is first in
the list, and scite.desktop is last; simply make scite.desktop first:

# text/plain=scite.desktop;openoffice.org-writer.desktop;userapp-gedit-S5E6VU.desktop;wine-extension-txt.desktop;geany.desktop;gedit.desktop;

————————————-example Makefile————————-
for OpenGL test, you need to install the OpenGL (glut)
it is quite easy on Ubuntu just install openglut deb
———-
# Makefile
#Usage: copy and paste it as Makefile without any suffix in your project folder
########################################
#  this make file does not follow the dir and var standard of
#  The GNU Coding Standards
#  only for tiny project
########################################
#  By default, when make looks for the makefile, it tries the following names,
# in order: `GNUmakefile’, `makefile’ and `Makefile’.
#  ./configure can set the correct env var,
#
# example of schared lib compilation
#gcc -shared -Wl,-soname libname.so.verNo   -o library_name file_list library_list
#
# conditional set var:  a space need between ifeq and ()
# Please change source file suffix, .c .C or cpp or .f90 to fit your project
SUFFIX=.c
ifeq ($(SUFFIX), .c)
CC=gcc
endif
ifeq ($(SUFFIX), .C)
CC=g++
endif
ifeq ($(SUFFIX), .cpp)
CC=g++
endif
#$(findstring $(SUFFIX), .f90 .f .F .f95 .F90)
ifeq ($(findstring $(SUFFIX), .f90 .f .F .f95 .F90), find)
CC=gfortran
endif
#########################################
EXE=scube
#work dir is pwd
prefix=.
OBJDIR=.
#${prefix}/obj
#####################################
#
# # set the ccopts for wxWidgets
# OpenGL  -lglut -lGL -lGLU -lX11  -lm
# `wx-config –cxxflags`  `wx-config –libs`
# OpenCL
#
INCDIR=.
CFLAGS= -Wall -O1 -I$(INCDIR)
LIBDIR =/usr/lib
LIBS=-lglut -lGL -lGLU -lX11  -lm

##########################################
#Global substitution in a string is done by patsubst:  m4
#patsubst(string, regexp, opt replacement)
#
# header obj files list:  multiple separated by space
_DEPS =
DEPS = $(patsubst %,$(INCDIR)/%,$(_DEPS))

#  special macros $@ and $^,
# which are the left and right sides of the :
# $(patsubst  ) is built-in macro of m4
_OBJ=scube.o
OBJ = $(patsubst %,$(OBJDIR)/%,$(_OBJ))
#compiling    $<
$(OBJDIR)/%.o: %$(SUFFIX) $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

#link
$(EXE): $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

.PHONY: clean

clean:
rm -f $(OBJDIR)/*.o