Ignore:
Timestamp:
Nov 5, 2008, 12:38:42 PM (16 years ago)
Author:
dkearney
Message:

switching to compiled matlab examples

Location:
trunk/examples/app-fermi/matlab
Files:
3 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/examples/app-fermi/matlab/Makefile.example

    r1139 r1209  
    99        sed s/YOURAPPNAME/$^/ < run_app.patch | patch run_$^.sh
    1010        chmod +x run_$^.sh
    11 #       mv $^ $^.ctf run_$^.sh ../bin
    12 #       mv readme.txt ../bin/$^.readme
    13 #       LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/apps/rappture/lib `pwd`/../bin/run_$^.sh /apps/matlab/mcr `pwd`/driver.xml `pwd`/../data
    14         simsim --tool tool.xml --driver-only driver.${APPNAME}
    15         LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/apps/rappture/lib `pwd`/run_$^.sh /apps/matlab/mcr `pwd`/driver.${APPNAME}
    16         rm -f run*.xml driver.${APPNAME}
     11        mv $^ $^.ctf run_$^.sh ../bin
     12        mv readme.txt ../bin/$^.readme
     13        simsim --tool tool.xml --values default --nosim --driver driver.$^
     14        LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/apps/rappture/lib `pwd`/../bin/run_$^.sh /apps/matlab/mcr `pwd`/driver.$^
     15        rm -f run*.xml driver.$^
    1716        @echo "Install Successful"
    1817
     
    2524                run_${APPNAME}.sh \
    2625                mccExcludedFiles.log \
     26                ${APPNAME}.readme \
    2727                readme.txt \
    2828                ${APPNAME}_mcr
    2929
    3030distclean: clean
    31 #       rm -rf ../bin/*
     31        rm -rf ../bin/*
  • trunk/examples/app-fermi/matlab/Makefile.in

    r1082 r1209  
    11
    22bindir          = @bindir@
    3 datadir         = @datadir@
    4 datarootdir     = @datarootdir@
     3datadir         = @datadir@
     4datarootdir     = @datarootdir@
    55exec_prefix     = @exec_prefix@
    66includedir      = @includedir@
     
    88mandir          = @mandir@
    99prefix          = @prefix@
    10 srcdir          = @srcdir@
     10srcdir          = @srcdir@
    1111
    12 destdir         = $(prefix)/examples/app-fermi/matlab
     12destdir         = $(prefix)/examples/app-fermi/matlab
    1313
    14 INSTALL         = @INSTALL@
    15 MKDIR_P         = @MKDIR_P@
     14INSTALL         = @INSTALL@
     15MKDIR_P         = @MKDIR_P@
     16MCC             = @MCC@
    1617
    17 FILES           = \
     18MCC_FLAGS       = -m -R -nojvm
     19INCLUDES        = -I ../../../lang/matlab
     20MCC_SWITCHES    = $(MCC_FLAGS) $(INCLUDES)
     21VPATH           = $(srcdir)
     22
     23APPNAME = fermi
     24
     25FILES   = \
    1826                $(srcdir)/tool.xml \
    19                 $(srcdir)/fermi.m
     27                $(srcdir)/Makefile.example \
     28                ${APPNAME}.ctf
    2029
    21 all:   
     30${APPNAME}: fermi_main.m fermi.m
     31        $(MCC) $(MCC_SWITCHES) -o $@ $^
    2232
    23 install:
     33all: ${APPNAME}
     34
     35install: ${APPNAME}
     36        sed s/YOURAPPNAME/$^/ < $(srcdir)/run_app.patch | patch run_$^.sh
    2437        $(MKDIR_P) $(destdir)
    2538        for i in $(FILES) ; do \
    2639          $(INSTALL) -m 444 $$i $(destdir) ; \
    2740        done
     41        $(INSTALL) -m 444 readme.txt $(destdir)/$^.readme
     42        $(INSTALL) -m 555 run_$^.sh $^ $(destdir)
     43        $(bindir)/simsim --tool $(srcdir)/tool.xml --values default --nosim --driver driver.$^
     44        LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(libdir) $(destdir)/run_$^.sh /apps/matlab/mcr driver.$^
     45        rm -f run*.xml driver.$^
     46        @echo "Install Successful"
    2847
    2948clean:
     49        rm -rf ${APPNAME} \
     50                ${APPNAME}_main.c \
     51                ${APPNAME}.ctf \
     52                ${APPNAME}.prj \
     53                ${APPNAME}_mcc_component_data.c \
     54                run_${APPNAME}.sh \
     55                mccExcludedFiles.log \
     56                readme.txt \
     57                ${APPNAME}_mcr
    3058
    3159distclean: clean
    3260        $(RM) Makefile
    33 
  • trunk/examples/app-fermi/matlab/fermi.m

    r665 r1209  
    11% ----------------------------------------------------------------------
    2 %  EXAMPLE: Fermi-Dirac function in Octave.
     2%  EXAMPLE: Fermi-Dirac function in Matlab.
    33%
    44%  This script represents a newly written application with rappture
     
    88%  AUTHOR:  Michael McLennan, Purdue University
    99%  AUTHOR:  Derrick Kearney, Purdue University
    10 %  Copyright (c) 2004-2007  Purdue Research Foundation
     10%  Copyright (c) 2004-2008  Purdue Research Foundation
    1111%
    1212%  See the file "license.terms" for information on usage and
     
    1414% ======================================================================
    1515
    16 % get out input file from the command line
    17 % invoke this script with the following command:
    18 % matlab -nodisplay -r infile=\'driver1234.xml\',fermi
    19 % the above command sets variable infile to the name 'driver1234.xml'
     16function retVal=fermi;
    2017
    21 % infile = 'driver31619.xml'
    22 
    23 % open our xml input file.
    24 lib = rpLib(infile);
     18% We open the xml file in the main function and make lib global
     19global lib;
    2520
    2621% retrieve user specified data out of the input file
     
    5651rpLibResult(lib);
    5752
    58 quit;
     53retVal = 0;
  • trunk/examples/app-fermi/matlab/tool.xml

    r572 r1209  
    33    <tool>
    44        <about>Press Simulate to view results.</about>
    5         <command>matlab -nodisplay -r infile='@driver',path('@tool',path),fermi</command>
     5        <command>@tool/run_fermi.sh /apps/matlab/mcr @driver</command>
    66    </tool>
    77    <input>
Note: See TracChangeset for help on using the changeset viewer.