Pragnesh,
Unless you make an effort to try to understand your _specific_ problem,
you're not going to get much help from this list. I'd suggest taking a look
at How To Ask Questions the Smart Way.
http://catb.org/~esr/faqs/smart-questions.html
As I'd stated in my previous email:
Also, keep in mind that when you create instances of the Matrix_thread
class, that their respective in1, in2, and outm arrays are _not the same_.
If you have 10 Matrix_thread classes, then you have 30 arrays (1 in1, 1 in2,
and 1 outm array for each of the 10 threads). Also, those arrays are not
the same as the one in the GApplication. Just because they are named the
same doen't mean that they refer to the same memory location.
This is not a problem with Alchemi -- it is clear by looking at your code
that you do not know the basics about C#, and this is where you are having
problems. By posting questions not related to Alchemi to the alchemi-users
list, you only waste people's time.
Nevertheless, here are some pointers.
There are a lot of things wrong with your code:
- Making inner classes is not usually the way to do things in C#. Looks
like you have a Java background, perhaps.
- You need to move your static void Main(string[] args) function into a
separate class (not inside Matrix_thread). Put it in a class called Program
or something
- When you create your matrix_thread class you need to pass in ALL of the
matrix data to the constructor that you read in from the keyboard.
- This is the whole Alchemi way of looking at things -- divide up your worn
into a number of tasks, and turn them into GThread-derived classes (in your
case Matrix_thread). Each of them has to contain ALL of the input data
necessary to complete its task -- there is no sharing of information between
threads, and _especially_ not globally accessible variables like what you
are trying to use. Each Matrix_thread is running on a completely different
computer....how is is supposed to access memory on a completely different
computer? Alchemi does not help you write distributed memory applications.
- Also, your main program (the main method) thread is exiting before the
Gthreads come back. Uncomment the last Console.Readline at the very least,
or look into using AutoResetEvents to accomplish this.
Keep in mind that just because it compiles, doesn't mean it is going to work
the way you expect. Pay very careful attention at what you are trying to
do. Also, learn the basics of C# -- classes, objects, inheritance,
constructors, properties, and events. Google is your friend -- try looking
up "C# tutorial", "C# examples", and "C# basics" and read as many articles
as you can.
-Matt
On 10/27/07, pragnesh pandya <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have got problem with matrix program. Can anybody help in this...
> Stuck in thread finish event...Please help me in this regard.....
>
>
>
>
>
>
>
> Thanks & Regards,
>
> Pragnesh Pandya
> +91 9925431154
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> alchemi-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/alchemi-users
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
alchemi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alchemi-users