Vous êtes sur la page 1sur 28

PSSE Environment Manager

USER GUIDE

Prepared by:
Krishnat Patil

Issue 7.0.1
September 2015

Siemens Industry, Inc.


Siemens Power Technologies International
400 State Street P.O. Box 1058
Schenectady, NY 12301-1058 USA
+1 518-395-5000
www.siemens.com/power-technologies
Issue History

Issue 7.0.1 Bug Fixes:


September 2015 Copy (additional) required run time IVF DLLs for PSSE34
Able to compile for PSSE 30.3.3IVF
Allow EM GUI to open when no PSSE version is installed.

Issue 7.0.0 Added Features:


January 2015 All Microsoft Visual Studio installations searched from registry (no predefined
installation locations or INI file locations). So Environment Manager (EM) should find all
installed Visual Studio versions in any drive.
All Intel Visual Fortran (IVF) and Compaq Visual Fortran (CVF) compiler installations
searched from registry (no predefined installation locations or INI file locations).
PSSE versions 34 through 29 installations searched from registry.
Ability to add and remove compiler options so as to form desired compiler command if
required.
Ability to run compile and link commands from Python script.
Ability to set local PATH, LIB and INCLUDE windows environment and use EM to just
compile and link. (Need this only when EM fails to find installed Visual Studio and/or
Fortran Compilers.
EM keeps .LIB file created.

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.

Issue 6.0.1 Added Features:


February 2014 Some Users do not have permission to write on C drive. Environment Manager now
creates its log and ini files in Users profile PATH if found [Note: os.path.expanduser('~')
gives Users profile PATH] or in current working directory [Note: os.getcwd()].
Tested with Python versions (2.5.4 and 2.7.6), wxPython version 3.0.0..0 for Python 2.7
and wxPython 2.8.11.0 for Python 2.5.

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.

PSSE Environment Manager 7.0.1 Page 2 of 28


Issue 6.0 Added Features:
October 2013 When IVF compiler is not installed but Visual Studio is installed, Environment Manager
can be used to create DLL from object and/or static library files.
Allow extended ASCII characters (8 bit) in file path and name.
Additional IVF compiler options can be specified.

Use of Env. Manager from PSSE GUI:


It can be launched from inside PSSE 33 GUI using file
psse_env_manager_w_fromPSSE33.pyw. Run this file as automation file from PSSE
or from PSSE33 GUI menu Tools >Create Model Library

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.

Issue 5.3.0 Added Features and Bug fixes:


December 2011 Bug fix when creating DLL or LIB and when additional LIB files are specified.
Bug fix when creating DLL or LIB at folder locations like C:\, D:\, i.e., at root of a drive
without any subfolder.
Bug fix when updating environment and when Users do not have WRITE permission to
registry
Bug fix which occurred for some Users with non-English operating system.
Bug fix when opening GUI when no Visual Studio version is installed.
Updated PATH/LIB searches to include Visual Studio 2010 shell provided by Intel.
Added option to specify PATH and LIB values manually and use Python functions to
create User Model DLL/LIB files.
Added Python Example files to create User Model DLL/LIB files from script.

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.

PSSE Environment Manager 7.0.1 Page 3 of 28


Issue 5.2.0 Added option to select IVF compiler from installed compilers, not just latest IVF compiler
August 2011 available.
For PSSE version 33, Fortran files can be compiled with IVF compilers earlier than
IVF 12.0 (a.k.a. Composer XE 2011).
Added feature to embed DLL version information. This is applicable to DLLs created for
PSSE versions 31 and later. This embedded DLL version information can be viewed
from Windows Explorer, PSSE Help>Loaded Libraries menu.
DLL/LIB name file can be dragged and dropped onto DLL/LIB name widget.
Files can be dragged and dropped onto list box widgets provided for Fortran compile
files, Fortran module files and object/library files.
Files with either file name or file path containing non-ASCII characters are not allowed.
Such files will be ignored.
Progress message window can now be cleared (instead of select/delete).

PSSE Environment Manager 7.0.1 Page 4 of 28


Table of Contents
Issue History 2
1 Introduction 6

2 When do you need to use Environment Manager? 6

3 Dos and Donts 7


3.1 How to start EM? 7
3.2 EM Log File 7
3.3 Limitations on Non-ASCII characters 7
3.4 Where are EM files installed? 7
3.5 What to do when EM GUI does not open? 8

4 Required Fortran Compiler and Microsoft Visual Studio 9


5 User Model Compile / Link 10
6 Open EM from PSSE GUI 12
7 Create DLL - Example 13
8 Create LIB Example 15
9 Copy Fortran Compiler Runtime Libraries 16
10 PATH / LIB vars BAT File 17
11 Compile / Link Progress Message 18

12 Use EM from Python Script 19


12.1 Compile 20
12.2 Compile, Link and Create User DLL 21
12.3 Compile, Link and Create User LIB 21
12.4 Add / Remove Compiler Options 22
12.5 Local Environment Settings 23
12.6 Test Installation by Creating Test User DLL 23

13 I am lost. Nothing works. What to do? 24


13.1 Python Script Examples 26
13.2 BAT File Examples: 27

PSSE Environment Manager 7.0.1 Page 5 of 28


1 Introduction
PSSE requires appropriate Windows environment settings under following situations:
1 Multiple versions of PSSE are installed on the same computer. PSSE versions later than version
28 co-exist on the same computer with almost no concerns other than setting appropriate
environment.
PSSE installation takes care of this and is rarely an issue.
2 PSSE dynamics User Models are used and you need to create User model DLL, LIB or OBJ files.
Use this PSSE Environment Manager program to facilitate this.

2 When do you need to use Environment Manager?


PSSE Environment Manager (EM) is used in PSSE versions >=29, to perform any of the following.

1 To compile / link PSSE dynamics User Models


Sets required local environment.
Compiles provided Fortran or FLX source files.
Creates either DLL or LIB files.
Note: This does not update windows environment in registry.

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.

PSSE Environment Manager 7.0.1 Page 6 of 28


3 Dos and Donts
3.1 How to start EM?
To start EM, create a desktop Icon, if you already do not have. Then change the Icon property
(Right Click >Properties) to set Start in: folder to your working folder.
Very Important: Make sure that this Start in: folder is not Windows System32 folder.
Note: It is preferable that this Start in: folder does not have non ASCII characters in its name (see
item 3.3 below).

3.2 EM Log File


EM saves log file (psse_env_manager.log) in .pssenvmgr sub-folder of User Profile
folder. Run following two commands from Python Interpreter (viz., IDLE) to find profile directory, if
you already do not know. (Note: This directory location could be different when computer is
connected to your company network and when it is not connected to company network.)

>>> import os
>>> os.path.expanduser('~')

When EM does not find User Profile folder, then working folder is treated as Profile folder.

3.3 Limitations on Non-ASCII characters


The DLL/LIB name should not have non ASCII characters.
It is okay to have file paths and/or names to have non ASCII characters. However, Intel Fortran
Compiler commands do not accept non ASCII characters. EM makes copies of such files to
.pssenvmgr folder and uses them in compile/link process. So it is recommended to avoid
non ASCII characters in file paths and names.

3.4 Where are EM files installed?


The EM files are installed in Pythons site-packages directory.
For example, if Python 2.7.x is installed in directory C:\Python27, then the EM files are installed in
folder: C:\Python27\Lib\site-packages\psse_env_manager
Same is true for other Python versions.

PSSE Environment Manager 7.0.1 Page 7 of 28


3.5 What to do when EM GUI does not open?
EM uses Python and wxPython. For some users, because of incompatible version or non-
availability of these programs, and/or bug in code, the EM screen flashes for few seconds and
disappears. There is no indication of the kind of error. If this occurs, run EM from Python
Interpreter, IDLE as below to find the error.

Open IDLE (Start >Programs >Python X.X >IDLE)


Open file
..\PythonXX\Lib\site-packages\psse_env_manager\psse_env_manager_w.pyw
where:
XX is Python version number, For example XX=27 for Python 2.7.
..\PythonXX is the location of Python installation.
Run file psse_env_manager_w.pyw by pressing function key F5 or from IDLEs File Window
menu, Run >Run Module.
Look for the error message in IDLE shell.
If EM has failed because of incompatible version / not installed of these Python programs,
install those and re-run EM.
If EM has failed because of bug in the program, report to PSSE Support.

PSSE Environment Manager 7.0.1 Page 8 of 28


4 Required Fortran Compiler and Microsoft Visual Studio
Following are the compiler and linker versions used in different PSSE versions.

PSSE Version Visual Studio (VS) Version Compiler Version

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:

http://www.pti-us.com/pti/software/psse/user_support.cfm and Follow link: PC Platform Compilers.

PSSE Environment Manager 7.0.1 Page 9 of 28


5 User Model Compile / Link
EM GUI tab User Model Compile / Link does following:
Sets required local environment for PSSE versions>= 29
Compiles provided Fortran or FLX source files
Creates either DLL or LIB files
Following figure shows Environment Manager GUI as it opens.

PSSE Environment Manager 7.0.1 Page 10 of 28


If there are any issues with Visual Studio and/or compiler installations, and if you cannot perform
compile and/or link/lib functions, it is indicated as below. Press Why? button to get detailed
information.

PSSE Environment Manager 7.0.1 Page 11 of 28


6 Open EM from PSSE GUI
Following figure shows Environment Manager GUI when it is opened from PSSE 33 GUI.
(Run file psse_env_manager_w_fromPSSE33.pyw as PSSE automation file.)

When called from PSSE GUI, in addition to creating DLL, EM automatically drops and adds DLL
to PSSE working memory.

PSSE Environment Manager 7.0.1 Page 12 of 28


7 Create DLL - Example
Figure shows example of creating User Model Dynamic Link Library (DLL).

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.

PSSE Environment Manager 7.0.1 Page 13 of 28


Notes:
If you have Fortran source module files, they need to be compiled first, so provide them in User
Model Fortran Module Files list.

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.

PSSE Environment Manager 7.0.1 Page 14 of 28


8 Create LIB Example
Figure shows example of creating User Model static library. For PSSE 33 and later, create only
dynamic link libraries (DLLs).

(Note: The status bar at the bottom provides compile and link success/fail message.)

PSSE Environment Manager 7.0.1 Page 15 of 28


9 Copy Fortran Compiler Runtime Libraries
You will need to update Fortran Compiler run time DLL files in PSSEs PSSBIN folder under
following circumstances.
If you have installed later version of Fortran compiler than PSSE version Fortran Compiler
(Refer Section 4),
When you install later version of Fortran compiler

PSSE Environment Manager 7.0.1 Page 16 of 28


10 PATH / LIB vars BAT File
You may need such bat file when you want to run compile and link commands from PSSE
command prompt using BAT files like compile.bat and cload4.bat.
For PSSE versions 33 and later, BAT files like compile.bat and cload4.bat use EM to compile
and link. So for these PSSE versions you do not need to create this BAT file.
For PSSE versions 32 and earlier, you need to set Windows Environment (PATH and LIB).
From EM, create a BAT file with desired Fortran compiler as shown below.
Note that here name of the BAT file is auto generated based on PSSE, VS and Compiler
version selection. You can change the folder where this file is saved.
From PSSE command prompt, you will need to run this file before running files compile.bat and
cload4.bat.

PSSE Environment Manager 7.0.1 Page 17 of 28


11 Compile / Link Progress Message
Commands run and its progress are displayed in a separate window as below.

Look for Successfully created message towards bottom to know the status of the process.

PSSE Environment Manager 7.0.1 Page 18 of 28


12 Use EM from Python Script
If you want to compile / link User Model files or set environment from Python script,
psse_env_manager module provides following functions.

From any Python interpreter, get details on these functions with:


>>> import psse_env_manager
>>> help(psse_env_manager)

Following variables are returned by various functions in this module.


forerr = True, Error getting FORTRAN compiler installation settings.
= False, Successfully found FORTRAN compiler installation settings.
vserr = True, Error getting Microsoft Visual Studio installation settings.
= False, Successfully found Microsoft Visual Studio installation settings.
errmsg = Error message
logmsg = Progress message
pathstr = String formed with folder names required to update environment variable PATH
libstr = String formed with folder names required to update environment variable LIB

Following variables are arguments of various functions in this module.


psse_vrsn = Integer value of Major PSSE version number. No default allowed.
Special case: Provide this as '30CVF' or '30IVF' for PSSE 30 CVF or IVF versions.
Examples: 33 for PSSE version 33.5.2
'30CVF' for PSSE version 30.x CVF
*files = one or more FLX/Fortran source file names (.flx, .f, .for, .f90 files).
No default allowed.

**kwds Following are allowed keywords.


dllname = Name of User DLL, default = dsusr.dll. This is created in working directory.
libname = Name of static library (.lib), default = usertemp.lib.
This is created in working directory.
modsources = List of FLX/Fortran Module source file names (.flx, .f, .for, .f90 files),
default = []

PSSE Environment Manager 7.0.1 Page 19 of 28


mypathlib Flag for environment selection.
= False, use EM found PATH and LIB values. This is default.
= True, use specified PATH and LIB values.
EM tries to find installed Fortran Compiler and Microsoft Visual Studio components.
Using those it sets windows environment variables PATH and LIB. If this process
has failed to find correct values for PATH and LIB, you could set them.
objlibfiles = List of Object/Library file names (.obj, .lib files), default = []
showprg = Progress message is always written to log file.
If showprg=True, progress message is also written to standard output device.
useivfvrsn When multiple IVF versions are installed, specify which IVF version to use.
Allowed values:
= 'latest', to use latest IVF version found. This is default.
= 'sameaspsse', to use IVF version that was used to build PSSE.
= an integer value corresponding major version of IVF installed
= a string value corresponding to IVF version, for example '12.0.104'
where 12 is major, 0 is minor and 104 is build version number of IVF installed.
Note:
When creating DLL for your own use, any IVF version can be used.
However, if created DLL is to be distributed to other users, select
IVF version in following order:
i) IVF version PSSE is built with OR
ii) IVF version the other user has OR
iii) the later IVF version between you have and the other user has.
workdir = Working directory, default = current working directory (os.getcwd())

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 source files for specified PSSE version.


ierr, objlist = compile(psse_vrsn, *files, modsources=[], workdir=os.getcwd(),
showprg=True, useivfvrsn='latest', mypathlib=False)
Returns:
ierr = False, No error.
= True, error occurred, refer log file for details.
objlist = List of object files (.obj) created after compilation.

PSSE Environment Manager 7.0.1 Page 20 of 28


12.2 Compile, Link and Create User DLL

Compile, Link and Create User DLL for specified PSSE version.

ierr = create_dll(psse_vrsn, *files, modsources=[], objlibfiles=[],


dllname='dsusr.dll', workdir=os.getcwd(), showprg=True,
useivfvrsn='latest', shortname='DSUSR', description='User Model',
majorversion=1, minorversion=0, buildversion=0,
companyname='', mypathlib=False)
Inputs:
Following are other arguments of this function. Thease are used for writing version
information into DLL. Applicable to PSSE 31 and later.
This DLL version information can be viewed from Windows Explorer and
PSSE 'Help >Loaded Libraries' menu.
shortname = Short name (identifier) assigned to DLL, default = DSUSR
description = DLL decription, default = User Model
majorversion= DLL major version number, default = 1
minorversion= DLL minor version number, default = 0
buildversion= DLL build version number, default = 0
companyname = Company name that created DLL, default = ''

12.3 Compile, Link and Create User LIB

Compile, Link and Create User DLL for specified PSSE version.

ierr = create_lib(psse_vrsn, *files, modsources=[], objlibfiles=[],


libname='user.lib', workdir=os.getcwd(), showprg=True,
useivfvrsn='latest', mypathlib=False)

PSSE Environment Manager 7.0.1 Page 21 of 28


12.4 Add / Remove Compiler Options

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.

options : String values of allowed and valid one or more compiler


options separated by comma.
No default allowed.
Note that compiler options are case sensitive.

default = True, show default options


= False, show currently set options

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

rmvopstr = ivf_compiler_options_remove(15, "/define:EXTERNAL_PSSE",


"/Qprec")

PSSE Environment Manager 7.0.1 Page 22 of 28


12.5 Local Environment Settings

Get PATH/LIB settings that are used to update environment variables PATH and LIB when
compiling and linking dynamic models for specified PSSE version.

forerr, vserr, errmsg, logmsg, pathstr, libstr = get_env(psse_vrsn,


useivfvrsn)

Update current session Windows environment variables PATH and LIB by adding PSSE, Fortran
Compiler and Visual Studio folders for specified PSSE version.

forerr, vserr = set_local_env_psse(psse_vrsn, useivfvrsn, showprg)

12.6 Test Installation by Creating Test User DLL

Run compile and link commands to create test DLL to verify compiler and Visual Studio installation.

ierr, msg = test_create_dll(psse_vrsn=None,


useivfvrsn= 'latest', showprg=True)

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.

PSSE Environment Manager 7.0.1 Page 23 of 28


13 I am lost. Nothing works. What to do?
If program fails you, the tried-and-true way is to take control and do it yourself. This section
explains how you can do that.

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

PATH IVF Compiler ifort.exe,libmmd.dll


VS 2005 and later link.exe, mt.exe, rc.exe, rcdll.dll
VS 2005 (VS 8.0) mspdb80.dll, msdis150.dll
VS 2008 (VS 9.0) mspdb80.dll
VS 2010 (VS 10.0) mspdb100.dll, pgodb100.dll
VS 2012 (VS 11.0) mspdb110.dll, pgodb110.dll
VS 2013 (VS 12.0) mspdb120.dll, pgodb120.dll
LIB IVF libmmd.lib
VS 2005 and later kernel32.lib and folder: vc\lib
INCLUDE VS 2005, VS 2008, VS 2010 afxres.h, winresrc.h, sal.h
VS 2012, VS 2013 afxres.h, winresrc.h, sal.h, winapifamily.h

CVF Compiler and VS 1998 files for PSSE versions 30 and earlier

PATH CVF Compiler df.exe


VS1998 link.exe, rc.exe, rcdll.dll, mspdb60.dll, msdis110.dll
LIB CVF Compiler dformdd.lib
VS1998 kernel32.lib and folder: vc98\lib
INCLUDE VS1998 afxres.h, winresrc.h, sal.h

PSSE Environment Manager 7.0.1 Page 24 of 28


Search following directories for these files. If your default installation locations are different change
these folders accordingly.

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.

IVF Compilers C:\Program Files\Intel

Intel places compiler files in different folder depending on IVF version.


For example:

IVF 10.x C:\ Program Files (x86)\Intel\Compiler\Fortran\10.1.024

IVF 12.x C:\ Program Files (x86)\Intel\ComposerXE-2011

IVF 15.x C:\ Program Files (x86)\Intel\Composer XE 2015

VS 2005 (VS 8.0) C:\ Program Files (x86)\Microsoft Visual Studio 8


C:\ Program Files (x86)\Microsoft SDKs\Windows

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

VS 2012 (VS 11.0) C:\Program Files (x86)\Microsoft Visual Studio 11.0


C:\Program Files (x86)\Windows Kits
C:\Program Files (x86)\Microsoft SDKs\Windows

VS 2013 (VS 12.0) C:\Program Files (x86)\Microsoft Visual Studio 12.0


C:\Program Files (x86)\Windows Kits
C:\Program Files (x86)\Microsoft SDKs\Windows

PSSE Environment Manager 7.0.1 Page 25 of 28


CVF Compiler C:\ Program Files (x86)\Microsoft Visual Studio\DF98

VS 1998 (VS 6.0) C:\ Program Files (x86)\Microsoft Visual Studio\VC98


C:\ Program Files (x86)\Microsoft Visual Studio\COMMON\MSDev98

13.1 Python Script Examples

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

(B) Manually specify PATH, LIB, INCLUDE environment values


When Environment Manager fails to find proper PATH, LIB, INCLUDE environment values
based on installed components, you could specify them, and use other functions from EM in
order to compile Fortran files, create User model DLL/LIB.
Create PSSE 34 User DLL using IVF 15 and VS 2013 (VS 12.0)
example_psse34_ivf15_vs2013_manually_set_env.py
Create PSSE 33 User DLL using IVF 12 and VS 2010 (VS 10.0)
example_psse33_ivf12_vs2010_manually_set_env.py

PSSE Environment Manager 7.0.1 Page 26 of 28


13.2 BAT File Examples:
This information describes what folders are required to be added to windows environment
variables PATH and LIB. Create a .BAT file with these folders. Place this BAT file in one of the
folders which are on windows PATH folders or in working directory. Then from PSSE command
prompt, before your run COMPILE and CLOAD4 commands, run this BAT file. (See example of
BAT file at the end.)

(A) IVF 12.0.104 and Microsoft Visual Studio 2010 (VS10)

(1) If you have installed IVF 12.0.104 and you found that following path and
lib folders are required.

Required path folders are:


C:\ Program Files (x86)\Intel\ComposerXE-2011\bin\ia32
C:\ Program Files (x86)\Intel\ComposerXE-2011\redist\ia32\compiler
Required path folders are:
C:\ Program Files (x86)\Intel\ComposerXE-2011\compiler\lib\ia32

(2) If you have installed Microsoft Visual Studio 2008 (VS9) and you found
that following path and lib folders are required.

Required Microsoft Visual Studio 2010 (VS10) PATH folders:


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
Required Microsoft Visual Studio 2008 (VS9) LIB folders:
C:\ Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
C:\ Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib

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.

PSSE Environment Manager 7.0.1 Page 27 of 28


(B) IVF 11.1.048 and Microsoft Visual Studio 2008 (VS9)

(1) If you have installed IVF 11.1.048 and you found that following path
and lib folders are required.

Required path folders are:


C:\ Program Files (x86)\Intel\Compiler\11.1\048\bin\IA32
Required path folders are:
C:\ Program Files (x86)\Intel\Compiler\11.1\048\lib\IA32

(2) If you have installed Microsoft Visual Studio 2008 (VS9) and you found
that following path and lib folders are required.

Required Microsoft Visual Studio 2008 (VS9) PATH folders:


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
Required Microsoft Visual Studio 2008 (VS9) LIB folders:
C:\ Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib
C:\ Program Files (x86)\Microsoft SDKs\Windows\v6.0A\lib

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.

PSSE Environment Manager 7.0.1 Page 28 of 28

Vous aimerez peut-être aussi