Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ICEM CFD - Tcl->C compiler

71 views
Skip to first unread message

Victor Jaravine

unread,
Dec 19, 2002, 11:15:58 AM12/19/02
to

Does anybody knows, why since 1997, when CFD promised
that ICE will have in version 2.2 a Tcl to C compiler,
nothing really changed to ICE to my knowledge and it is
still producing only "wrapped" output ?

Probably, they just lost interest in this, but
do we have anything product-level of the sort ?
i.e.
I have read about SWIG and mktclapp, but do not really
know if they work well; and I am getting lost in those
discussions of possibilities and tests and variants,
I just want a product which works now and not in
experimental stage.

Maybe some comments on that, please.

Victor

Michael Schlenker

unread,
Dec 19, 2002, 10:34:31 AM12/19/02
to
Andreas Otto had his "compiler" sometime ago.

According to some statements from an attendant of the European TCL user
meeting it did work and speed up some things quite a bit.

But, as far as i know it has been discontinued as a commercial product.
I'm not quite sure, but think i remember a discussion that it would go
open source...

Michael Schlenker


Cameron Laird

unread,
Dec 19, 2002, 10:31:07 AM12/19/02
to
In article <3E01F0BE...@unibas.ch>,
.
.
.
The hazard is our comments about possibilities will
also overwhelm you.

Nobody has a Tcl-to-C compiler of the sort you think
you want. While we can quibble details, that will
be the conclusion.

On the other hand, there's a good possibility that
something else can meet your true requirements. What's
"upstream" of your interest in a Tcl-to-C compiler?
Are you motivated by security, performance, ...?

Why didn't CFD do this? 'Cause they're unwilling to
make the financial sacrifice involved. It's expen-
sive being in the business of selling software
products. While I know almost nothing of CFD, I
can speak authoritatively about the general princi-
ple.
--

Cameron Laird <Cam...@Lairds.com>
Business: http://www.Phaseit.net
Personal: http://phaseit.net/claird/home.html

Victor Jaravine

unread,
Dec 19, 2002, 1:16:24 PM12/19/02
to
Dear Cameron Laird,

Thank you, I suspected about the lack of compiler.

Well, I'd be interested in Performance, please,
plus Tcl/Tk command line.

Victor


Cameron Laird wrote:

--
Victor A. Jaravine, Dr
University of Basel,
Klingelbergstr. 70, Basel CH-4056, Switzerland
w tel: +41-61-2672106, fax: 061-2672109
mob: 076-5095586
email: Victor....@unibas.ch

Jeffrey Hobbs

unread,
Dec 20, 2002, 1:05:38 AM12/20/02
to
Victor Jaravine wrote:
> Does anybody knows, why since 1997, when CFD promised
> that ICE will have in version 2.2 a Tcl to C compiler,
> nothing really changed to ICE to my knowledge and it is
> still producing only "wrapped" output ?
>
> Probably, they just lost interest in this, but
> do we have anything product-level of the sort ?

What is it that you actually need? The ICEMCFD compiler did not
continue for various reasons. One was that it was originally
targeted at Tcl 7, but Tcl 8 made things a lot faster anyway.
You can still get much faster results with hand-coded C, but it
all depends on what you are trying to do.

--
Jeff Hobbs The Tcl Guy
Senior Developer http://www.ActiveState.com/
Tcl Support and Productivity Solutions

aotto

unread,
Dec 20, 2002, 2:22:34 AM12/20/02
to
Hi,

there was a tool called TCL-Compiler.
The tool ist stable and works well. It does exactly what you want,
but there is no public reference anymore.

It's still a great product and if Tcl goes to be visible again
it will be reborn. But right now, and for the next couple of years,
you have to live with the TCL default features.


mfg

aotto

Victor Jaravine

unread,
Dec 20, 2002, 5:52:40 AM12/20/02
to Jeffrey Hobbs
Dear Cameron Laird,

Here I'd like to expand a little bit on what I am
trying to do. Hopefully, you could give me some
feedback with what tool I can use for that.

I am writing a biomolecular related visualization
program on SGI in Tcl/Tk with main graphics/processing
subroutines in a C library, which are used as tcl
commands, the way John Ousterhout described it in
his 1994 book.

The problem is it is very slow on redrawing the screen,
and reading huge files from hard disk, even on my O2 SGI
IRIX6.5. As the main code is already in C, compiled with cc,
then it is probably as fast as it can be.

At the moment I am just trying to speed things up somehow
anyway. And in the process to switch to a new level of
Tcl/Tk programming or better development environment.
ActiveState's present version of Tcl Dev Kit 2.1 is not
compiled for SGI, so I can not use it and consider what
is available. Probably SWIG can do things but I did not
tryed it out yet. *.so files should be at least as fast
as my compiled version.


Victor

> In article <3E01F0BE...@unibas.ch>,


> Victor Jaravine <Victor....@unibas.ch> wrote:
> >
> >Does anybody knows, why since 1997, when CFD promised
> >that ICE will have in version 2.2 a Tcl to C compiler,
> >nothing really changed to ICE to my knowledge and it is
> >still producing only "wrapped" output ?
> >
> >Probably, they just lost interest in this, but
> >do we have anything product-level of the sort ?

> >i.e.
> >I have read about SWIG and mktclapp, but do not really
> >know if they work well; and I am getting lost in those
> >discussions of possibilities and tests and variants,
> >I just want a product which works now and not in
> >experimental stage.
> >
> >Maybe some comments on that, please.

p tel: 061-3216847, email: Victor....@unibas.ch

lvi...@yahoo.com

unread,
Dec 20, 2002, 7:29:25 AM12/20/02
to

According to Victor Jaravine <Victor....@unibas.ch>:
:Here I'd like to expand a little bit on what I am

:trying to do. Hopefully, you could give me some
:feedback with what tool I can use for that.

:The problem is it is very slow on redrawing the screen,


:and reading huge files from hard disk, even on my O2 SGI
:IRIX6.5. As the main code is already in C, compiled with cc,
:then it is probably as fast as it can be.
:
:At the moment I am just trying to speed things up somehow
:anyway.

: Probably SWIG can do things but I did not


:tryed it out yet. *.so files should be at least as fast
:as my compiled version.

SWIG's purpose is to generate interfaces between C libraries and Tcl.
So it isn't going to be any help for you in my opinion.

It is my opinion that you should consider the following issues:

o Are you using Tcl/Tk 8.4.1 ? There's tremendous performance benefits over
older Tcl/Tks.

o Is the disk reading being done in Tcl or in C? What kinds of files
are being read? Are they being read in a byte at a time, a line at
a time, or all at once?

o Do you have adequate memory allocated on your machine?

o How many visual objects does your application have allocated?

--
Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
<URL: mailto:lvi...@yahoo.com > <URL: http://www.purl.org/NET/lvirden/ >

Cameron Laird

unread,
Dec 20, 2002, 11:34:14 AM12/20/02
to
In article <3E02F675...@unibas.ch>,
Victor Jaravine <Victor....@unibas.ch> wrote:
.
.

.
>I am writing a biomolecular related visualization
>program on SGI in Tcl/Tk with main graphics/processing
>subroutines in a C library, which are used as tcl
>commands, the way John Ousterhout described it in
>his 1994 book.
.
.
.
Way cool.

'Bet we can help you get your performance up. Work
through the suggestions others have posted, and let
us know how you're progressing. It sounds like a
good project, one with which you should expect to
have satisfying results.

David N. Welton

unread,
Dec 20, 2002, 12:58:15 PM12/20/02
to
lvi...@yahoo.com writes:

> o Is the disk reading being done in Tcl or in C? What kinds of
> files are being read? Are they being read in a byte at a time, a
> line at a time, or all at once?

I wonder about this too. Maybe it's being done all at once, without
giving Tk a chance to update the screen?

--
David N. Welton
Consulting: http://www.dedasys.com/
Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
Apache Tcl: http://tcl.apache.org/

Jeffrey Hobbs

unread,
Dec 22, 2002, 1:12:16 AM12/22/02
to
Victor Jaravine wrote:
> The problem is it is very slow on redrawing the screen,
> and reading huge files from hard disk, even on my O2 SGI
> IRIX6.5. As the main code is already in C, compiled with cc,
> then it is probably as fast as it can be.

As others have noted, the move to 8.4 should be helpful. For
comparative benchmark numbers between versions, see:
http://wiki.tcl.tk/1611

> At the moment I am just trying to speed things up somehow
> anyway. And in the process to switch to a new level of

Have you identified what the slow areas are? You might also
consider contracting someone to review the Tcl code to fix hot
spots. I recently received some code that someone was using
(they were actually trying to identify a leak in TclX) and was
able to improve the speed of the code by 20x (yes, 20 times
faster) in a matter of minutes.

If you know you just have one or two problem areas, you can always
post them here - these guys love a challenge to find the fastest
possible solution. :)

Remember that Tcl, as a scripting language, will never be as fast
as hand-coded C. However, it is also not C, and sometimes people
choose coding styles that end up with algorithms in Tcl that came
straight out of a C book where Tcl would have a completely
different and more efficient way to perform the same tasks.

0 new messages