#!/bin/csh # script to generate generic neural network subroutine # written by Alain Bellerive May 2002 # # syntax netgen # = name of file written by JETNET3 JNDUMP subroutine # = name of outputfile for fortran/patchy program # = name of generated subroutine # setenv INPUTFILE $1 setenv OUTPUTFILE $2 setenv SUBNAME $3 # echo netgen will generate subroutine $SUBNAME from data on $INPUTFILE echo The source will be written on $OUTPUTFILE # # set up links for input ln -s $INPUTFILE netgen.dat # # compile and link the program g77 -O -mcpu=i486 -mieee-fp -ffloat-store -fno-second-underscore -fno-f2c \ -O2 -malign-double -Wall \ netgen.f \ jetnet34.o \ /local/cern/pro/lib/libgraflib.a \ /local/cern/pro/lib/libgrafX11.a \ /local/cern/pro/lib/libpacklib.a \ /local/cern/pro/lib/libmathlib.a \ /local/cern/pro/lib/libkernlib.a \ -o netgen.exe # # run the generation program netgen.exe # rm -f netgen.dat netgen.intdat netgen.exe # echo Data processed...writing output # # write subroutine header cat >$OUTPUTFILE <>$OUTPUTFILE # # dimension the arrays cat >>$OUTPUTFILE <>$OUTPUTFILE # # subroutine body # cat >>$OUTPUTFILE <>$OUTPUTFILE # # end of the subrotuine cat >>$OUTPUTFILE <