Re: Newbie Mac PPC shared lib [message #19224] |
Thu, 02 March 2000 00:00  |
Irene Barg
Messages: 4 Registered: December 1998
|
Junior Member |
|
|
To All,
Please ignore my previous post, there wasn't a problem after
all. I interpreted the 'watch icon' as meaning wait, so I
really didn't try much else. I re-ran the tests, and there
is a little hestitation when it forks out to the C external
code, but it only lasts a fraction of a second.
My apologies!
--irene
"J.D. Smith" wrote:
>
> Irene Barg wrote:
>>
>> Hello to all,
>>
>> My development environment:
>> Mac G4 450MHz 512MB RAM OS 9
>> IDL 5.2 for Mac
>> CodeWarrior V5 for Mac
>>
>> I'm new to the Macintosh, however, after reading several
>> posts regarding "shared libraries" on this newsgroup, I was
>> able to get my code up and running. Now, I have a question.
>>
>> Our UNIX users use IDL, Interactive Data Language, package
>> from RSI, for interactive analysis and visualization. We have
>> a set of C routines that we have been able to call from IDL
>> using the IDL CALL_EXTERNAL function which loads and calls
>> routines contained in shareable object libraries. My task was
>> to port this C code to the Macintosh environment so that our
>> Mac/IDL users could use it as well.
>>
>> Inside my IDL procedure, I call a C routine with the following:
>>
>> s = CALL_EXTERNAL('calnica.shlb','do_cridcalc',nic,input,crimage )
>>
>> Where:
>> "calnica.shlb" is my PowerPC shared library created with CW.
>> "do_cridcalc" is my entry point name to my shared code.
>> "nic, input, crimage" are pointers to data.
>>
>> I created "shlb" using CW PPC Std C Console stationary. The
>> code works, but, while it's running, I can't do anything else
>> with the Mac. Normally, one processes more than one image at
>> a time, so I have to free up the Mac, but how? This is not
>> a problem on the UNIX platform. I'm not certain if it's an
>> IDL or Mac problem. Any insight you may have will be most
>> appreciated.
>
> How do you do the multiple processing? With multiple instances of IDL running?
> Or is there some other way you "background" the calculation. Is there user
> input required to get the calculations started? Without a multi-CPU machine,
> running the processes concurrently is not any faster, and most likely slightly
> slower, than running them in series, say from a batch file (unless, of course,
> the time required for human interaction can be interleaved -- the strength of
> multi-processing). This technique could be adopted on the Mac (start the batch
> file running and then go to lunch).
>
> If you use multiple IDL sessions, it's definitely a Mac problem -- no preemptive
> multi-tasking support. MacOS X, based on the Mach microkernel and BSD, will
> have robust PMT and protected memory, so, assuming RSI supports it in a timely
> fashion, that will satisfy your Mac user's needs. It's due out at the end of
> the year.
>
> Good Luck,
>
> JD
>
> --
> J.D. Smith |*| WORK: (607) 255-5842
> Cornell University Dept. of Astronomy |*| (607) 255-6263
> 304 Space Sciences Bldg. |*| FAX: (607) 255-5875
> Ithaca, NY 14853 |*|
--
------------------------------------------------------------ ------
Irene Barg Email: ibarg@as.arizona.edu
Steward Observatory Phone: 520-621-2602
University of Arizona FAX: 520-621-1891
Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg
------------------------------------------------------------ ------
|
|
|