Silverfrost Forums

Welcome to our forums

Linking Math Libray NSWC to a Fortran95 programme

18 Nov 2013 9:21 #13335

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]

19 Nov 2013 9:43 #13336

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.

21 Nov 2013 2:47 #13345

That is not a parallel library. Is it OK with you?

23 Nov 2013 9:54 #13349

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

23 Nov 2013 9:54 #13350

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

14 Aug 2015 7:00 #16731

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

johannes

14 Aug 2015 9:13 #16732

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

14 Aug 2015 10:02 #16733

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

14 Aug 2015 11:57 #16734

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

Please login to reply.