forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Running Silverfrost's Thread Sample

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Clay



Joined: 20 Mar 2014
Posts: 23

PostPosted: Mon Jul 15, 2019 5:52 pm    Post subject: Running Silverfrost's Thread Sample Reply with quote

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
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 697
Location: Hamilton, Lanarkshire, Scotland.

PostPosted: Mon Jul 15, 2019 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Jul 15, 2019 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Clay



Joined: 20 Mar 2014
Posts: 23

PostPosted: Mon Jul 15, 2019 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
Clay



Joined: 20 Mar 2014
Posts: 23

PostPosted: Mon Jul 15, 2019 8:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Robert



Joined: 29 Nov 2006
Posts: 444
Location: Manchester

PostPosted: Wed Jul 17, 2019 4:55 pm    Post subject: Reply with quote

I just tried the .NET threads example and it ran okay for me. How did you run it Clay?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group