rem runprof.bat
rem DELETE ANY FILE CALLED DINP BEFORE RUNNING
rem 17 Mar 2009 - f90 version
rem 17 Mar 2009 - General version for any directory
rem  3 Aug 2006 - Added CEA
@ECHO OFF
rem 25 Mar 2006 - Deleted pcprof5 and pcprof6 from loader list
rem 25 Mar 2006 - Moved S5, S6, S7, S8 to G subdirectory
rem 27 Feb 2006 - added ..\pcharpo\s5 and ..\pcharpo\atmoshd to link list
rem 16 Feb 2006 - Version for directory c:\raytracing\samples\
rem  2 Feb 2006 - Using general version of FNDMODLH
rem 17 Sep 2004 
rem If the first command parameter was "L" or "l", then need to run FINDMODL
rem and then LINK the PROFILE program.  Otherwise, run PROFILE.EXE that
rem currently exists.
rem
if %1. == .  GOTO NLNK
if %1. == l. GOTO FIND
if %1. == L. GOTO FIND
GOTO NLNK
:FIND
rem   Run FINDMODL to determine which models will be linked.
rem
rem ..\profile\FNDMODLH %2
..\fndmodlh\FNDMODLH %2
rem
if NOT errorlevel 1 GOTO LNK
     rem   There are errors while running FINDMODL.
     @ECHO ON
     PAUSE 'Press Ctrl-Break to Quit'
     @ECHO OFF
rem
:LNK
rem
copy linkmodl.dat ..\profile/y
copy return.bat ..\profile/y
cd ..\profile
rem For the f90 version, uncomment the following line
DF /LINK /stack:4096 profile pcprof1 pcprof2 pcprof3 pcprof4 ..\G\S5 ..\G\S6 ..\G\S7 ..\G\S8 ..\EIGEN\CEA ..\pcharpo\atmoshd conblk @linkmodl.dat /out:profile.exe
rem The following line is for the Intel 9.0 version
rem DF /stand:f90 /Qsave /quiet /LINK /stack:4096 /DEBUG:all profile pcprof1 pcprof2 pcprof3 pcprof4 ..\G\S5 ..\G\S6 ..\G\S7 ..\G\S8 ..\EIGEN\CEA ..\pcharpo\atmoshd conblk @linkmodl.dat /exe:profile.exe
rem
rem   If there are errors, go to EXIT.
if errorlevel 1 GOTO EXIT
rem
return %1 %2 runprof
rem   Go here if no LINK is desired, i.e. no models were changed.
:NLNK
rem   Run PROFILE to produce TXTOUT file.
rem
cls
..\profile\profile < FNAME.OUT
rem
rem   If there are errors, go to EXIT.
if errorlevel 1 GOTO EXIT
rem
copy txtout P%2
:EXIT
