View previous topic :: View next topic |
Author |
Message |
Clay
Joined: 20 Mar 2014 Posts: 23
|
Posted: Mon Jul 15, 2019 5:52 pm Post subject: Running Silverfrost's Thread Sample |
|
|
The FTN95 Help system includes a "Threads Sample" code snippet. When I paste this sample code into Plato and try to compile, I get compiler errors such as "ASSEMBLY_EXTERNAL is only allowed in CLR mode (with /CLR switch specified)".
I can't find any instructions on CLR mode. Looking at the ASSEMBLY_EXTERNAL Help topic I see that since it is a .NET method, I have to add a LIBRARY directive, but don't know what library to point to.
What specifically do I need to do to get the Threads Sample code to compile and run?
Thanks!
Clay |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Jul 15, 2019 6:24 pm Post subject: |
|
|
First thing to check, you must compile with 64 bit not 32 bit to use threads.
see the file notes_on_parallel_processing
in C:\Program Files (x86)\Silverfrost\FTN95\doc
Ken |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Mon Jul 15, 2019 6:31 pm Post subject: |
|
|
The "Threads sample" is for .NET only.
There are three platforms Win32, .NET and x64. Which one do you want to use? |
|
Back to top |
|
|
Clay
Joined: 20 Mar 2014 Posts: 23
|
Posted: Mon Jul 15, 2019 8:28 pm Post subject: |
|
|
PaulLaidler: Thanks for the reply, building with .NET allowed the example code to compile, but it still won't run. When I run it I get a FTN95 exception:
Salford.Fortran.RuntimeException
Error 359: Control is too big for window
Any idea what's going wrong with the example code?
Thanks. |
|
Back to top |
|
|
Clay
Joined: 20 Mar 2014 Posts: 23
|
Posted: Mon Jul 15, 2019 8:35 pm Post subject: |
|
|
Kenneth_Smith: Thanks very much for the tip about the notes_on_parallel_processing file. Very helpful!
When I paste the example code into Plato and compile with 64-bit, the program freezes when run. When I run it in the debugger, it gets to the line:
ID=GetParallelTaskID@(1)
the debugger simply says "Status: Program Terminated"
You can surely tell that I'm new to parallel processing, but would be interested in investigating if I could get an example program to execute for me to play with.
Thanks in advance for any advice or assistance!
Clay |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 446 Location: Manchester
|
Posted: Wed Jul 17, 2019 4:55 pm Post subject: |
|
|
I just tried the .NET threads example and it ran okay for me. How did you run it Clay? |
|
Back to top |
|
|
|