Académique Documents
Professionnel Documents
Culture Documents
USER GUIDE
Prepared by:
Krishnat Patil
Issue 7.0.1
September 2015
Obsolete Features:
Removed version specific functions, like, create_dll_psse33(..). Instead added generic
functions, like, create_dll(psse_vrsn, .). Refer section 12 for details.
EM no longer writes to registry to update windows environment PATH and LIB values.
Instead EM creates BAT file which can be run from PSSE command prompt to set local
windows PATH and LIB environment before running files like compile.bat and/or
cload4.bat.
Removed use of psse_env_manager_ini.py file.
Bug Fixes:
Pythons encode(..) function call works differently in Python 2.5 and Python 2.7. Code
updated to correct this bug when running Python 2.5 version of Environment Manager.
Issue 5.4.0 Changed tab name "Environment Manager" to "Set Windows PATH/LIB vars".
January 2013 Added tab "Copy Compiler Runtime Libraries".
Added PSSE 33 and 32 University Edition to allowed PSSE versions.
Added PSSE installation registry checks in Windows 64 bit OS.
Issue 5.3.1 Bug fix when creating DLL or LIB for PSSE version 30.3.3 IVF.
January 2012 Added /Qprec option on Fortran compile command IFORT.
GUI Enhancements:
Added option to create DLL or LIB by using only previously compiled OBJ and LIB files.
Added option to delete/keep intermediate files created during compilation process.
Added buttons to Move Up or Move Down Fortran Source and Module files.
Added buttons to open Log File and User Guide.
Added many Help Buttons and Button tool tips.
GUI window can be re-sized as desired.
Source/Module/Object/Lib files can be selected in Windows Explorer and dropped onto
GUI.
2 To copy Fortran Compiler run time DLL files when you install updated version Fortran compiler.
Copies Fortran Compiler run time DLL file from compilers folders to PSSBIN folder.
3 To create BAT file that will set appropriate local windows environment to facilitate compile / link of
PSSE dynamics User Models
Just creates BAT file which can be run from PSSE command prompt to set required local
environment before running your bat file like, compile.bat and/or cload4.bat.
You will need to run this file every time you open/reopen PSSE command prompt window to
run compile and cload4 bat files.
Note: This does not update windows environment in registry.
EM is provided for different Python versions, like Python 2.5, Python 2.7. The same Python source is
compiled for these Python versions. So any EM version can be used with any PSSE version. EM is
completely independent of PSSE.
>>> import os
>>> os.path.expanduser('~')
When EM does not find User Profile folder, then working folder is treated as Profile folder.
PSSE 34 VS 2013 (C/C++ compiler and linker version 12.0) IVF 15.0.148
PSSE 33 VS 2010 (C/C++ compiler and linker version 10.0) IVF 12.0.104
PSSE 32 VS 2008 (C/C++ compiler and linker version 9.0) IVF 10.1.024
PSSE 31 VS 2005 (C/C++ compiler and linker version 8.0) IVF 9.1
PSSE 30IVF VS 2005 (C/C++ compiler and linker version 8.0) IVF 9.1
(30.3.3)
PSSE 30CVF VS 1998 (C/C++ compiler and linker version 6.0) CVF 6.6B
PSSE 29 VS 1998 (C/C++ compiler and linker version 6.0) CVF 6.6B
However, as per technical advice from Intel and our internal testing show that for PSSE versions
30IVF and above will work following Compiler and Visual Studio versions.
IVF 10.x and later
VS 2005 and later
Get up to date and additional information on PSSE versions and supported compilers, purchasing
Compilers, refer to PSSE User Support Web Page at:
When called from PSSE GUI, in addition to creating DLL, EM automatically drops and adds DLL
to PSSE working memory.
The DLL name can be any name. It does not have to just dsusr.dll.
Note: The status bar at the bottom provides compile and link success/fail message.
Order of the Fortran source files provided in User Model Fortran Compile Files list is not
important.
If you are providing previously compiled object files (.obj) or previously created static library
files (.lib), make sure that they are compiled for the same PSSE version. If object / library files
are created for different PSSE versions, they are not compatible and will not work.
Very Important: If you are creating DLL and one of the input files is static library (.lib) file, then
the names (without .dll and .lib extensions) of DLL and static library files must be different.
Final dll and lib file is saved. Other intermediate files created during compilation / linking are
deleted or kept based on Delete and Keep button selection.
Show Progress button: Use this button to open progress message window.
Save Setup button: Use this button to save setup (PSSE version, DLL / LIB name, compile
files, module files or object files) used in creating dll / lib.
Open Setup button: Use this button to open previously saved set up file.
Log File Info button: Use this button to find the name and location where the log file is saved.
(Note: The status bar at the bottom provides compile and link success/fail message.)
Look for Successfully created message towards bottom to know the status of the process.
Notes:
1. File names in these arguments can be provided with full path names, if they exist other than
working directory.
2. File names must be provided with their proper extension.
12.1 Compile
Compile, Link and Create User DLL for specified PSSE version.
Compile, Link and Create User DLL for specified PSSE version.
The default Fortran compiler options used in EM commands are same as the one used in PSSE. If for a
reason you have to change (add and/or remove) some Fortran compiler options used, you can do that
using these functions.
addopstr = ivf_compiler_options_add(majorv, *options)
rmvopstr = ivf_compiler_options_remove(majorv, *options)
ivf_compiler_options_show(default)
ivf_compiler_options_reset()
addopstr = cvf_compiler_options_add(*options)
rmvopstr = cvf_compiler_options_remove(*options)
cvf_compiler_options_show(default)
cvf_compiler_options_reset()
Inputs:
majorv : Integer value of IVF compiler major version number.
No default allowed.
Returns:
errmsg : Error message, if any.
It will be blank string if no error occurs.
addopstr: String representing options that are added.
rmvopstr: String representing options that are successfully removed.
Example:
From IVF 15.0.148 compiler, to remove options:
/define:EXTERNAL_PSSE, /Qprec options
Get PATH/LIB settings that are used to update environment variables PATH and LIB when
compiling and linking dynamic models for specified PSSE version.
Update current session Windows environment variables PATH and LIB by adding PSSE, Fortran
Compiler and Visual Studio folders for specified PSSE version.
Run compile and link commands to create test DLL to verify compiler and Visual Studio installation.
Inputs:
When psse_vrsn value is not specified, latest installed PSSE
version used.
Returns:
ierr = False, No error.
= True, error occurred, refer log file for details.
msg = Success or Fail message.
Following tables list the required files for compile and link process. Depending on the versions of
Fortran Compiler and Visuals Studio you have installed, look for these files and then set PATH, LIB
and INCLUDE environment using Python script file or bat file.
IVF Compiler and VS files for PSSE versions 31 and later, and 30.3.3 IVF
CVF Compiler and VS 1998 files for PSSE versions 30 and earlier
Note:
You may have both 32 bit and 64 bit installations of these components.
PSSE requires 32 bit installation, so select sub-directories under C:\ Program Files (x86)
Depending on your Windows localization (English/non-English) and 32/64 bit version, "Program
Files (x86)" folder name could be different.
VS 2008 (VS 9.0) C:\ Program Files (x86)\Microsoft Visual Studio 9.0
C:\ Program Files (x86)\Microsoft SDKs\Windows
VS 2010 (VS 10.0) C:\ Program Files (x86)\Microsoft Visual Studio 10.0
C:\ Program Files (x86)\Microsoft SDKs\Windows
These example files are installed in EM installation folder. By default, they will be in:
For Python 2.7 installation:
C:\Python27\Lib\site-packages\psse_env_manager
For Python 2.5 installation:
C:\Python25\Lib\site-packages\psse_env_manager
(A) Let Environment Manager find out required PATH, LIB and INCLUDE environment values
Create PSSE 34 User DLL using IVF 15 and VS 2013 (VS 12.0)
example_psse34_ivf15_vs2013.py
Create PSSE 33 User DLL using IVF 12 and VS 2010 (VS 10.0)
example_psse33_ivf12_vs2010.py
(1) If you have installed IVF 12.0.104 and you found that following path and
lib folders are required.
(2) If you have installed Microsoft Visual Studio 2008 (VS9) and you found
that following path and lib folders are required.
For these lib and path folders, your BAT should be as below.
@ECHO OFF
REM SETS PATH AND LIB IVF 12.0.104 and VS 2010
SET PATH=^
C:\ Program Files (x86)\Intel\ComposerXE-2011\bin\ia32;^
C:\ Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\compiler;^
C:\ Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;^
C:\ Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin;^
C:\ Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;^
%PATH%
REM
SET LIB=^
C:\ Program Files (x86)\Intel\ComposerXE-2011\compiler\lib\ia32;^
C:\ Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib;^
C:\ Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib
echo.
echo Your PATH/LIB are updated for IVF 12.0.104 and VS 2010!!
echo.
(1) If you have installed IVF 11.1.048 and you found that following path
and lib folders are required.
(2) If you have installed Microsoft Visual Studio 2008 (VS9) and you found
that following path and lib folders are required.
For these lib and path folders, your BAT should be as below.
@ECHO OFF
REM SETS PATH AND LIB IVF 11.1.048 and VS 2008
SET PATH=^
C:\ Program Files (x86)\Intel\Compiler\11.1\048\bin\IA32;^
C:\ Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN;^
C:\ Program Files (x86)\Microsoft SDKs\Windows\v6.0A\bin;^
C:\ Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;^
%PATH%
REM
SET LIB=^
C:\ Program Files (x86)\Intel\Compiler\11.1\048\lib\IA32;^
C:\ Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib;^
C:\ Program Files (x86)\Microsoft SDKs\Windows\v6.0A\lib
echo.
echo Your PATH/LIB are updated for IVF 11.1.048 and VS 2008!!
echo.