The executable is built by linking
a driver routine with the code and utility libraries. The driver routine
must contain a call to initLaGriT
and a call to control_command_lg
and must contain a subroutine called user_sub.
The input arguments to initLaGriT
are:
mode
- set to 'noisy' for output to be echoed to the screen - set to 'silent'
for no echo
log_file
- name of log file (if ' ' or '-def-' use default name which is logx3dgen)
This file will contain a list of commands.
batch_file -
name of batch file (if ' ' or '-def-' use default name which is outx3dgen)
This file will contain a list of commands and the error, warning and informational
messages generated by the command. User_sub
is used to implement user commands (see Section
IV.C)
A sample driver routine is listed below:
program
adrivgen
C
C ################################################################
C
C PURPOSE -LaGriT driver
C ################################################################
C
implicit
none
integer
ierror_return
C
call
initLaGriT('noisy',' ',' ')
C
call
control_command_lg(ierror_return)
C
stop
end
C
subroutine
user_sub(imsgin,xmsgin,cmsgin,msgtyp,nwds,
ierr1)
C ################################################################
C
C PURPOSE -
C
C Process user supplied commands
C
C INPUT ARGUMENTS -
C
C imsgin - integer array of tokens
returned by parser
C xmsgin - real array of tokens returned
by parser
C cmsgin - character array of tokens
returned by parser
C msgtyp - int array of token types
returned by parser
C nwds - number of tokens returned
by parser
C
C OUTPUT ARGUMENTS -
C
C ierr1 - 0 for successful completion
- -1 otherwise
C ################################################################
character*32
cmsgin(nwds)
integer
imsgin(nwds),msgtyp(nwds)
integer
nwds,ierr1,lenc
real*8
xmsgin(nwds)
C set default error return to fail
ierr1=-1
C Insert code here to handle user
coded subroutines
C For example
C if(cmsgin(1).eq.'my_cmnd') then
C call my_rtn(imsgin,xmsgin
C * cmsgin,msgtyp,nwds,ierr1)
C else
C ierr1=-1
C endif
C
return
end
Sample build scripts for the supported
platform are:
Sun OS and Sun Solaris
forte version 7 compiler:
f90 -O2 -lf77compat -o LaGriTgen
adrivgen.f libLaGriT.a libutil.a
if the user wishes to link in user
subroutines that contain CRAY type pointer statements, these routines
must be compiled using the f77 compiler and then the .o files linked in
with f90:
f77 -c -O2 user_routines.f
f90 -O2 -lf77compat -o LaGriTgen
adrivgen.f user_routines.o libLaGriT.a libutil.a
older sun compilers:
f90 -O2 -o LaGriTgen adrivgen.f
libLaGriT.a libutil.a
IBM RISC
xlf -g -o LaGriTgen -qintlog -qcharlen=500
-brename:.fdate,.fdate_ adrivgen.f
libLaGriT.a libutil.a
SGI
f90 -O2 -n32 -r10000 -o LaGriTgen
adrivgen.f libLaGriT.a libutil.a
Compile for 64 bit I8 SGI:
f90 -O2 -64 -i8 -o LaGriTgen adrivgen.f
libLaGriT.a libutil.
HP
f90 +U77 -R8 -lm -o LaGriTgen
adrivgen.f libLaGriT.a libutil.a
DEC
COMPAQ compiler
fort -i8 -O -fast -pipeline -transform_loops -o LaGriTgen adrivgen.f
libLaGriT.a libutil.a
LINUX
ABSOFT compiler
f90 -YTEXT_NAMES=LCS -o LaGriTgen
adrivgen.f fdate.f libLaGriT.a libutila. -lm -lu77
where fdate.f is
subroutine fdate(string)
character*(*) string
call fdate_(string)
return
end
To execute, use standard unix file redirection
for standard input and output. LaGriT will produce two additional files,
outx3dgen
and logx3dgen.
The names of these files can be changed by supplying the names as arguments
in the call to initLaGriT. These files contain detailed output information
and the list of commands respectively. LaGriT may also be run interactively
in which case the user will be prompted to enter commands from the workstation.