Hi all,

I have limited knowledge about the use of FORTRAN with application of this on VISUAL STUDIO.I am actually getting to know about these software because of the requirement for them in re-writing some codes I needed to re-write before running on ASPEN Plus.

 My problem is,I wish to run an Aspen Plus simulation using the aforementioned soft wares,but I do not honestly know how to go about them,as the whole thing seems confusing. I have already installed the FORTRAN compiler as well as the Visual Studio,but I do not know what platform to extract the input codes that I needed to compile.

The codes that I needed to re-compile in Intel FORTRAN,which is compatible with ASPEN was previously compiled using Silver frost FORTRAN 95.But,after compiling using this Silver frost software,the codes wouldn't run on ASPEN Plus.It was just few days ago I learnt this can never work on ASPEN Plus,hence the need to install the compatible software.

1)What does it mean to re-write a code previously written in Silver frost FORTRAN 95 or other FORTRAN codes in Intel FORTRAN Compiler Codes and what is the procedure for this?
2)After re-writing these codes in Intel FORTRAN codes using Intel FORTRAN Compiler,how do I carry out the following steps before finally running the simulations,using ASPEN:
(a) Compile the user model?
(b) Link the user models into a Fortran shared library procedure?
(c) Supply the object files or shared library to the Aspen Plus system?

Any positive contribution will be highly appreciated.
 Gee Law.

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I think you need to work with the developers of Aspen Plus to determine what is needed. For the most part, Fortran is Fortran and if your code really is Fortran 95, then Intel Fortran (note, not FORTRAN), should be able to handle it. However, if you make use of Silverfrost extensions that are unique to that implementation, then you do need to make changes.

Does your code build with Intel Fortran?

The basic steps would be:

1. Create a Fortran > Library > Dynamic Link Library project in Visual Studio
2. Add your source code to the project
3. Determine which routines need to be "exported" from the DLL, and in each one, add the line:

!DIR$ ATTRIBUTES DLLEXPORT :: name-of-routine

where name-of-routine is the name of the routine.
4. Change the project configuration from Debug to Release
5. Select Build > Build Solution

This will build the DLL. What you do with it after that, I don't know.

Retired 12/31/2016

Wao!This is owesome professor Steve.I appreciate your great knowledge.The fact is,I am not conversant with Fortran,Visual Studios and the likes.I just happened to have a simulation to run using ASPEN,and since I needed re-write these codes from the old Fortran version 95 or 77,I thought all I neede do was to re-write everything on Intel Visual Fortran Compilers,NOT knowing I needed add in some commands,which you stated.But sir,I truly do not know where to input in this commands you stated.All becoming out of my understanding.I am a Biologist and a novice in all this.I would really appreciate if you could tell me where and where to include all this,or if possible,try send you a copy of what I am to conver,prefarably through your email.

Lastly prof,what is the difference using Silverfrost Fortran extensions to using the FORTRAN 95 or Fortran 77 directly/Which is easier and better to work wih?


Gee Law.

Hello one more time Prof Steve,

 The very strange thing is that,this codes do not have have any ending on .f90.</p>.This is why I keep wandering if they were truly Fortran codes.Maybe it is because it has to do with chemical symbols,and perhaps because this is all about natural gas simulation plants

Here is snapshot:

;  Oxygenates (Approximate as pethanol and 2-hexanol and change some
;  properties, as required.
           OYAPP C3H8O-2 / OYHC C7H16O-1 / OYH2O C3H8O-2 / &
;  Paraphenes
           C7N C7H14-1 / C7N C7H14-1 / C8N C8H16-7 / C9N C9H18-8 / &
           C8N C8H16-1 / C11N C11H22-1 / &

In such codes therefore,where could I include the commands please?


(As a former Aspen user, I often wished it was Fortran and not FORTRAN, but unless things have changed in the last five years or so, the capitalisation is sadly appropriate.)

If you are writing a DLL that extends Aspen Plus (perhaps with user properties or a user unit operation model) my recollection is that Aspen provides a command line driver that invokes ifort.  They also provide an icon or batch file that sets up a command prompt appropriately for compilation (in a similar way to the command prompt provided with the Intel compiler itself).  I remember bright yellow text (though perhaps that's the SDK environment - anyway - the Aspen command prompt was customised in some way...).  Consult the Aspen documentation for more information (I think there was a PDF volume explicitly dealing with this use case) - your questions really don't have much to do with Fortran or use of Intel Fortran per se.

The second way that Aspen Plus uses Fortran is via user code embedded in the parameters for a particular unit operation.  In some cases the Aspen Plus program is able to interpret simple Fortran syntax itself, in other cases it compiles and links on-the-fly the user code at the start of a run.  This process is managed by the Aspen Plus program itself.  Again, consult the documentation provided with that product for more information. 

The use of the compiler is mostly incidental to the use of that Aspen Plus program in both cases - you would be far better seeking support in a forum directly related to Aspen Plus for these sorts of questions.

Gee, the source lines you show are Fortran 90. I was not referring to the lines in the source file, but the name of the file itself. You will probably find that already has a .f90 file type. If however the file name ends in something else, such as .f95, change it to be .f90.

Retired 12/31/2016

Prof.Steve,thank you so much for your replies.I am delighted indeed.

Kindly find one more time,snapshot of the codes.Like I said previously in one of my emails,there are no .f90 nor .f95 file names written at the end of the files.This snapshot is typical of how all the codes are.So,in this situation,where do I place the .f90 file name at the name if I have to?Or,what exactl im I supposed to do if I have to make it work,as I have not succeded in re-writing or transferring these codes into Intel Fortran Codes.

Your input this one more time will be highly appreciated prof.


C     2 3X, 'FCM        = ', F23 . 3 /
C     3 4X, 'RCO        = ', F23 . 3 /

DEFINE HC29            MASS-FLOW       STREAM=314C35       COMPONENT=C99OP
DEFINE HC28            MASS-FLOW       STREAM=214C35       COMPONENT=C39OP

Extractor number/Output file switch
            2.0                                                                        &
            0.0 248.4452    0.0 0.0                0.0    0.0                &
;            700/760 F steam    700 satd steam        260 satd steam

   PARAM TEMP=596   <F> PRES=99.9

   PARAM TEMP=459.0 <F> PRES=516.5

This text you show is not program source. It looks like a data input file for a program. You would not rewrite it - it is read by your program, or maybe by Aspen (I don't know much about Aspen.)

Retired 12/31/2016

You are absoulte right prof.Steve.It is an ASPEN Input file.I thought it was an old Fortran code that needed be re-written in Intel Fortran Visual Composer 13.0.This will be really nice if it is what you said.But sir,do you mean I do not even have anything to do with Intel Fortran Visual Compiler if it is an imput file,which really it is?

The challenge I am facing is,even if it is an Input file,since it is an old code(written in the 1990s),do you think it really does not need be re-compiled in recent compilers?I have tried to run it on ASPEN,but it just would not run,hence my impression that it is an old Fortran code.I have little to nothing about Fortran codes really.

You splendid advise,as always will be highly appreciated.

Once it is clear that it has nothing to do with compiler,fortran and the likes,then I shall work on the ASPEN aspect.

Kindly give me your final word:What you think.

God bless you sir.

It is very likely that no change in the Fortran source code is needed.  This is one of the advantages of Fortran - most commercial Fortran compilers are compatible with source code written in the 1970s and even 1960s. 1990s should be no problem at all. At most you may have to add special statements called "directives" to tell the compiler to make routines visible to a user of a DLL, but the Fortran code itself should not need any changes.

The file you showed needs to be provided as input to the program. As I don't know the program, I can't advise you on how to do that.

Retired 12/31/2016

Ok Prof,I will do as you said.I shall keep you posted sir.God bless you.

Prof.Steve,I have another important information I missed out.

The fact is,the Input source File for this program was re-typed by me,since I could not lay hands on the original soft copy.I re-wrote the entire codes using Silverfrost Fortran 95 from the original manual hard copy,like I stated previously in one of my posts.So then,in this case,what happens?Was I supposed to re-write the codes in Silverfrost Fortran 95?If no,do I then link it to the Intel Fortran Visual Composer?Or,do I have to re-write one more time using the Intel FVC 13.0?

Thank you sir.

Please do not get caught up in the idea that "Silverfrost Fortran 95" and "Intel Visual Fortran" languages being different. Fortran 95 is Fortran 95. You should assume that the code you retyped, if it works for Silverfrost, should also work for the Intel compiler. If you find problems, let us know and show us the error messages and source code.

Retired 12/31/2016

 Hello Prof,I have done as you have directed.The following errors keep popping up:  

ERROR: Executable is out of date.

ERROR: The executable does not exist.

What do I do next sir?



I don't recognize those messages, but they're pretty clear, saying that there's a program it's looking for that was not built. These messages are not coming from Intel Fortran, as best as I can tell.

I really think that you need to work with the support staff of Aspen Plus to help you get started.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today