×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Compiling User Fortran Subroutines

Compiling User Fortran Subroutines

Compiling User Fortran Subroutines

(OP)
I am attempting to compile a user defined kinetics subroutine for use in an Aspen Plus simulation. I have a subroutine called ESKIN.for, based on the supplied template usrkin.f.

I understand that I am supposed to open the Simulation Engine and type the command 'aspcomp ESKIN.for' in order to compile the Fortran before I may use it in the simulation. However, when I do this, I receive the following error messages:

ASPCOMP: Warning! DEC Fortran compiler f77.exe not found in %PATH%
ASPCOMP: Warning! Microsoft C runtime library msvcrt.lib not found in %LIB%
ASPCOMP: Warning! Microsoft C runtime library is needed for Dynamic Linking.
ASPCOMP: Warning! DEC Fortran runtime library dformd.lib not found in %LIB%
ASPCOMP: Warning! DEC Fortran runtime library is needed for Dynamic Linking.
Spawn failed: No such file or directory

Error in compiling preprocessed file: Check compile.log.

A check of the compile.log reveals the same list of error messages. It seems that a specific fortran compiler program, f77.exe, is being searched for and not found. I have downloaded a free fortran compiler (Plato IDE, Silverfrost) and am wondering if and how I can use this to perform the aspcomp procedure.

Has anyone been successful in compiling and implementing a user fortran subroutine in Aspen Plus before? If so, your input would be greatly appreciated.

Thanks for your time,
Dean

RE: Compiling User Fortran Subroutines

I did manage to use a free compiler in the past, but I reverted to the f77 paying compiler.
There is an aspcomp.bat file somewhere on your disk. For some reason the search facility of Windows fails to find it.  Mine was in Program Files/Aspen Tech/AprSystem 2004.1/Engine/Xeq
Find it.    Edit it.

you just need to modify the default compiler name.
Check your compiler supports the default options passed.

Should work. Howebver I must stress that the ASPEN Version we use is NOT the latest one. I cannot guarantee it will work.

RE: Compiling User Fortran Subroutines

(OP)
I appreciate your reply siretb. I am also using an old version of Aspen Plus, version 12.1. I did find aspcomp.bat, and have tried modifying it to my fortran compiler.

Trying aspcomp again, I get the following error messages.

C:\PROGRA~1\ASPENT~1\APRSYS~1.1\Engine\xeq\gcpp.exe  -DWIN32 -DAWINNTN @gcpp.opt "ESKIN.for" "ESKIN.i"
ASPCOMP: Using compiler C:\PROGRA~1\ASPENT~1\APRSYS~1.1\Engine\xeq\scc.exe  
ASPCOMP: Warning! Microsoft C runtime library msvcrt.lib not found in %LIB%   
ASPCOMP: Warning! Microsoft C runtime library is needed for Dynamic Linking.   
ASPCOMP: Warning! DEC Fortran runtime library dformd.lib not found in %LIB%   
ASPCOMP: Warning! DEC Fortran runtime library is needed for Dynamic Linking.   
scc.exe /nologo /c /nowatch         "-object:ESKIN.obj" "ESKIN.i"
[Silverfrost SCC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2010]
*** /NOLOGO is not a valid option - if in doubt type SCC /HELP
    1 ERRORS  [<> SCC/WIN32 Ver 3.65]
*** Compilation failed

Do you know what the Microsoft C runtime library and the DEC Fortran libraries are? And when you setup your compiler, did you need to find these library files somewhere and move/copy them to a particular location? I can't find either library file within Program Files\AspenTech or subfolders.

Can you tell me what compiler you bought and where you got it from? And when you installed the compiler, did you need to locate it in a particular location? I think if I just use a compiler that is known to work, the process of compilation may be more likely to succeed.

Dean

RE: Compiling User Fortran Subroutines

Obviously, some libraries are missing, not found or improperly defined. I am not a computer specialist, and, I am sorry, have no time to check in depth, in my computer how each variable is defined.   I attach a copy of my own aspcomp.bat.

I use  COMPAQ   VISUAL FORTRAN 6.6 a (2000)
bought from a local reseller
Works fine.

the program has installed itself in the following:
"C:\Program Files\Microsoft Visual Studio\COMMON\MSDEV98\BIN\DFDEV.EXE". I have not edited anything with the libraries, as far as I recall.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources