View previous topic :: View next topic |
Author |
Message |
BobFrenkel
Joined: 18 Nov 2013 Posts: 5
|
Posted: Mon Nov 18, 2013 10:21 pm Post subject: Linking Math Libray NSWC to a Fortran95 programme |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8012 Location: Salford, UK
|
Posted: Tue Nov 19, 2013 10:43 am Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2864 Location: South Pole, Antarctica
|
Posted: Thu Nov 21, 2013 3:47 am Post subject: |
|
|
That is not a parallel library. Is it OK with you? |
|
Back to top |
|
|
BobFrenkel
Joined: 18 Nov 2013 Posts: 5
|
Posted: Sat Nov 23, 2013 10:54 am Post subject: Reply to Paul Laidler and Dan Right |
|
|
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 |
|
|
BobFrenkel
Joined: 18 Nov 2013 Posts: 5
|
Posted: Sat Nov 23, 2013 10:54 am Post subject: Reply to Paul Laidler and Dan Right |
|
|
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 |
|
|
johannes
Joined: 21 Jan 2011 Posts: 65 Location: Leimen, Germany
|
Posted: Fri Aug 14, 2015 8:00 pm Post subject: |
|
|
Does anyone have a download link for the NSWC math library?
I can only find the pdf description.
johannes |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2393 Location: Yateley, Hants, UK
|
Posted: Fri Aug 14, 2015 11:02 pm Post subject: |
|
|
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 |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 709 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Sat Aug 15, 2015 12:57 am Post subject: |
|
|
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 |
|
|
|