Silverfrost Forums

Welcome to our forums

USE MSIMSLMD

14 May 2008 5:57 #3192

I have old program written in f77, in which they are using 'USE MSIMSLMD'. Im just starting to program with f95, so its might seem stupid question, but it isnt for me:) what should I do? I know its a standard module for f77, but f95 doesn`t recognize it.

thanks 😉

15 May 2008 9:18 #3201

You need to have either the source for the module, or the .MOD file created by FTN95. .MOD files are not portable between compilers so if this is your first time out with FTN95 you will need the source. There are no standard modules for Fortran, different vendors may ship modules with their compilers (we put out modules for some of our stuff), but they are not compatible with other compilers.

15 May 2008 11:06 (Edited: 15 May 2008 11:18) #3204

in my program i have real*8 x and fderf=derfc(x) that`s it. this is the only function that i need from thet module, so... maybe i can replace it with something else? interface double precision function derfc (x) double precision x end function end interface what does this do? do i understand corerct, that this actually does nothing:))

15 May 2008 11:13 #3205

This is an interface defintion, not the implementation. It enables the compiler to know how to call a function at compile time. It will be worth you looking into the Fortran standard for this sort of thing, the help file provides a brief description of INTERFACE, but if you are new to Fortran then you may need to find some other resources.

15 May 2008 11:22 #3206

http://student.fsid.cvut.cz/~kubicekm/skola/x2/Fortran/INCLUDE/

this is where i found that source code for my module,if i knew what tfis funcion does, i could rewrite it or something... i tryed to compile f90 files with f95 comiler, but it doesnt recognize it:/ now i`m actually do not know that to do:(

15 May 2008 4:32 #3208

It looks to me as though the function you are using computes the complementary error function (erfc) for a parameter x, where both x and the returned value for the function are in double precision (equivalent to real*8 as far as FTN95 is concerned).

Neither the complementary error function nor the ordinary error function are standard routines in any version of fortran. Indeed, if you need erf or erfc, you are almost certainly operating in the higher realms of mathematics, and outside the realms of mere mortals.

You have two choices if you want to use these functions: program it yourself (this includes typing in code from a textbook), or buy a library that provides the numerical function and which is compatible with your compiler.

I had a look at the source you gave, and it appears to be a set of files relating to Microsoft PowerStation Fortran v4, which is an obsolete and no longer supported product. There may well be a copy of a numerical library included under license by Microsoft in that system.

I followed the hints in your post, and Visual Numerics (www.vni.com) the firm that produced the library with 'derfc' in it) is still in business.

Eddie

Please login to reply.