Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling User Fortran Subroutines 1

Status
Not open for further replies.

deanmc16

Chemical
Mar 23, 2011
4
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
 
Replies continue below

Recommended for you

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.
 
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
 
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.
 
 http://files.engineering.com/getfile.aspx?folder=a3ca00df-defb-47cd-9533-1c35ff284e1b&file=aspcomp.bat
Status
Not open for further replies.

Part and Inventory Search

Sponsor