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 

Linking Math Libray NSWC to a Fortran95 programme

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



Joined: 18 Nov 2013
Posts: 3

PostPosted: Mon Nov 18, 2013 10:21 pm    Post subject: Linking Math Libray NSWC to a Fortran95 programme Reply with quote

I intend to write several programs in Fortran 95 using the extensive
NSWC math library (for example, the subroutine DMTMS for
double-precision multiplication of matrices). Can someone advise me
on how to link this math library to a specific program? Many thanks.
Bob Frenkel[/b]
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Nov 19, 2013 10:43 am    Post subject: Reply with quote

There are many ways to do this. One way is to create a DLL using FTN95 or SCC (the corresponding C++ compiler) and link to the executable using SLINK.

You can do this via Plato or Visual Studio, creating a "Solution" with two "Projects", one for the DLL and one for the executable. Details can be found in FTN95.chm.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1618
Location: South Pole, Antarctica

PostPosted: Thu Nov 21, 2013 3:47 am    Post subject: Reply with quote

That is not a parallel library. Is it OK with you?
Back to top
View user's profile Send private message
BobFrenkel



Joined: 18 Nov 2013
Posts: 3

PostPosted: Sat Nov 23, 2013 10:54 am    Post subject: Reply to Paul Laidler and Dan Right Reply with quote

Paul, thanks for your suggestions. I'm very much a beginner in FTN95 using Plato. In my lab (I'm now semi-retired) I used Fortran 95 easily and
moreover the link to NSWC was simple: just type in f95....-lnswc.
I will get some more practice and get back to you.

Dan, what do you mean by "parallel library"?

Thanks

Bob Frenkel
Back to top
View user's profile Send private message
BobFrenkel



Joined: 18 Nov 2013
Posts: 3

PostPosted: Sat Nov 23, 2013 10:54 am    Post subject: Reply to Paul Laidler and Dan Right Reply with quote

Paul, thanks for your suggestions. I'm very much a beginner in FTN95 using Plato. In my lab (I'm now semi-retired) I used Fortran 95 easily and
moreover the link to NSWC was simple: just type in f95....-lnswc.
I will get some more practice and get back to you.

Dan, what do you mean by "parallel library"?

Thanks

Bob Frenkel
Back to top
View user's profile Send private message
johannes



Joined: 21 Jan 2011
Posts: 65
Location: Leimen, Germany

PostPosted: Fri Aug 14, 2015 8:00 pm    Post subject: Reply with quote

Does anyone have a download link for the NSWC math library?
I can only find the pdf description.

johannes
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 143
Location: Glasgow, Scotland.

PostPosted: Fri Aug 14, 2015 10:13 pm    Post subject: Reply with quote

The F77 source code can be found at:-

http://www.ualberta.ca/CNS/RESEARCH/Software/NumericalNSWC/site.html

It's about 115,000 lines of code but does not produce too many disheartening error messages when complied with Plato.

Some of the routines have been updated to F95 and can be found at:-

http://jblevins.org/mirror/amiller/

Ken
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1668
Location: Yateley, Hants, UK

PostPosted: Fri Aug 14, 2015 11:02 pm    Post subject: Reply with quote

Kenneth,

If you compile it with -ignore 179 you don't get the moans about comparing to zero, so most of the error messages disappear. There are a bunch of names that are the same as Fortran 95 intrinsics, and the inevitable unreferenced statement numbers.

Apart from that, most of the compilation errors are unused parameters or declared variables.

As you say, there isn't much worrying, and the whole huge source compiles incredibly fast. It could be cleaned up very simply.

Eddie
Back to top
View user's profile Send private message
Kenneth_Smith



Joined: 18 May 2012
Posts: 143
Location: Glasgow, Scotland.

PostPosted: Sat Aug 15, 2015 12:57 am    Post subject: Reply with quote

Eddie,

Yes it's a valuable library.

I've used a fair number of the individual routines in my programs over the years.

I convinced our management at work to buy me a licence for Silverfrost after I set myself the task one wet weekend of writing some code to partially replicate a data processing task some of our engineers were doing using Excel (involving gigabyes of text data produced by tens of thousands of runs of a conventional power system impedance calculation).

We can now use a FTN95 program based on a few routines from the library along with very simple Clearwin+ menu and gw plotting routines to execute a task that used to take TWO weeks in Excel. The FTN95 program runs in about 20 minutes and produces all the required output plot files, without any user intervention.

Which just proves there is merit in me not totally forgetting the Fortran I skills I learned 30 years ago (Honeywell 66/80 running GCOS08) ! Pity I still cannot get my head round Windows 8.

Ken
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 -> Suggestions 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