Changeset 2307


Ignore:
Timestamp:
Jul 10, 2011, 5:55:10 PM (13 years ago)
Author:
gah
Message:

update from trunk

Location:
branches/blt4
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/cf/rpLangJava.m4

    r2279 r2307  
    11AC_DEFUN([RP_LANG_JAVA],[
    2 rp_with_java="yes"
    32AC_ARG_WITH([java],
    43    [AS_HELP_STRING([--with-java[=DIR]],[location of java @<:@default=yes@:>@])],
    5     [rp_with_java=$withval],
    6     [rp_with_java=yes])
     4    [],
     5    [with_java=yes])
    76JAVA=""
    87JAVAH=""
    98JAVAC=""
    109JAVA_DEV_PKG="no"
    11 AC_ARG_WITH(
    12     [java],
    13     [AS_HELP_STRING([--with-java=DIR], [location of java @<:@default=yes@:>@])],
    14     [rp_with_java=$withval])
    1510
    16 if test "${rp_with_java}" != "no" ; then
    17   if test "${rp_with_java}" = "yes" ; then
     11if test "${with_java}" != "no" ; then
     12  if test "${with_java}" = "yes" ; then
    1813    AC_PATH_PROG(JAVA,  java)
    1914    AC_PATH_PROG(JAVAC, javac)
    2015    AC_PATH_PROG(JAVAH, javah)
    2116  else
    22     AC_PATH_PROG(JAVA,  java,  [], [${rp_with_java}/bin:${rp_with_java}])
    23     AC_PATH_PROG(JAVAC, javac, [], [${rp_with_java}/bin:${rp_with_java}])
    24     AC_PATH_PROG(JAVAH, javah, [], [${rp_with_java}/bin:${rp_with_java}])
     17    AC_PATH_PROG(JAVA,  java,  [], [${with_java}/bin:${with_java}])
     18    AC_PATH_PROG(JAVAC, javac, [], [${with_java}/bin:${with_java}])
     19    AC_PATH_PROG(JAVAH, javah, [], [${with_java}/bin:${with_java}])
    2520  fi
    2621fi
     
    3227if test "x${JAVA}" != "x" ; then
    3328  for d in \
    34    ${rp_with_java} \
     29   ${with_java} \
    3530   ${JAVA_HOME} \
    3631   /apps/java/jdk1.6* \
  • branches/blt4/cf/rpLangMatlab.m4

    r2279 r2307  
    11AC_DEFUN([RP_LANG_MATLAB],[
    2 rp_with_matlab="yes"
     2with_matlab="yes"
    33AC_ARG_WITH(
    44    [matlab],
    55    [AS_HELP_STRING([--with-matlab[=DIR]],
    66        [location of matlab and mex compiler @<:@default=yes@:>@])],
    7     [rp_with_matlab=$withval],
    8     [rp_with_matlab=yes])
     7    [],
     8    [with_matlab=yes])
    99
    1010MCC=""
     
    1313MEXEXT=""
    1414MATLAB=
    15 if test "$rp_with_matlab" != "no" ; then
    16   if test "$rp_with_matlab" = "yes" ; then
     15if test "$with_matlab" != "no" ; then
     16  if test "$with_matlab" = "yes" ; then
    1717    AC_PATH_PROG(MATLAB, matlab)
    1818  else
    19     AC_PATH_PROG(MATLAB, matlab, [], [${rp_with_matlab}/bin:${rp_with_matlab}])
     19    AC_PATH_PROG(MATLAB, matlab, [], [${with_matlab}/bin:${with_matlab}])
    2020  fi
    2121fi
  • branches/blt4/cf/rpLangOctave.m4

    r2279 r2307  
    2222# Standard octave search (use the installed version of octave)
    2323AC_DEFUN([RP_LANG_OCTAVE],[
    24 rp_with_octave="yes"
    2524AC_ARG_WITH(
    2625    [octave],
    2726    [AS_HELP_STRING([--with-octave[=DIR]],
    2827        [path of default octave compiler `mkoctfile' @<:@default=yes@:>@])],
    29     [rp_with_octave=$withval],
    30     [rp_with_octave=yes])
     28    [],
     29    [with_octave=yes])
    3130
    3231OCTAVE=
     
    3635MKOCTFILE3=
    3736
    38 if test "$rp_with_octave" != "no" ; then
    39   if test "$rp_with_octave" = "yes" ; then
     37if test "$with_octave" != "no" ; then
     38  if test "$with_octave" = "yes" ; then
    4039    AC_PATH_PROG(OCTAVE, octave)
    4140    AC_PATH_PROG(MKOCTFILE, mkoctfile)
    4241  else
    43     OCTAVE=$rp_with_octave
    44     MKOCTFILE=`dirname $rp_with_octave`/mkoctfile
     42    OCTAVE=$with_octave
     43    MKOCTFILE=`dirname $with_octave`/mkoctfile
    4544  fi
    4645fi
     
    8079    [AS_HELP_STRING([--with-mkoctfile3[=DIR]],
    8180        [path of octave compiler `mkoctfile' @<:@default=no@:>@])],
    82     [rp_with_mkoctfile3=$withval],
    83     [rp_with_mkoctfile3=no])
     81    [],
     82    [with_mkoctfile3=no])
    8483
    85 if test "$rp_with_mkoctfile3" != "no" ; then
    86   if test "$rp_with_mkoctfile3" = "yes" ; then
     84if test "$with_mkoctfile3" != "no" ; then
     85  if test "$with_mkoctfile3" = "yes" ; then
    8786    AC_PATH_PROG(mkoctfile3, mkoctfile)
    8887  else
    89     MKOCTFILE3=$rp_with_mkoctfile3
     88    MKOCTFILE3=$with_mkoctfile3
    9089  fi
    9190  OCTAVE_VERSION=`${MKOCTFILE3} --version 2>&1 | cut -d' ' -f3`
     
    9998    [AS_HELP_STRING([--with-mkoctfile2[=DIR]],
    10099        [path of octave compiler `mkoctfile' @<:@default=no@:>@])],
    101     [rp_with_mkoctfile2=$withval],
    102     [rp_with_mkoctfile2=no])
     100    [],
     101    [with_mkoctfile2=no])
    103102
    104 if test "$rp_with_mkoctfile2" != "no" ; then
    105   if test "$rp_with_mkoctfile2" = "yes" ; then
     103if test "$with_mkoctfile2" != "no" ; then
     104  if test "$with_mkoctfile2" = "yes" ; then
    106105    AC_PATH_PROG(mkoctfile2, mkoctfile)
    107106  else
    108     MKOCTFILE2=$rp_with_mkoctfile2
     107    MKOCTFILE2=$with_mkoctfile2
    109108  fi
    110109  # Have to use octave to get a version, instead of mkoctfile.
     
    113112  OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1`
    114113fi
    115 
    116 
    117 echo "MKOCTFILE2 = $MKOCTFILE2"
    118 echo "MKOCTFILE3 = $MKOCTFILE3"
    119 echo "OCTAVE_VERSION_MAJOR = $OCTAVE_VERSION_MAJOR"
    120 echo "OCTAVE_VERSION = $OCTAVE_VERSION"
    121114])
  • branches/blt4/cf/rpLangPerl.m4

    r2279 r2307  
    55    [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])],
    66    [],
    7     [rp_with_perl=yes])
     7    [with_perl=yes])
    88
    99PERL=
     
    1818PERL_VERSION_RV=
    1919PERL_LIBSPEC=
    20 if test "$rp_with_perl" != "no" ; then
    21   if test "$rp_with_perl" != "yes" ; then
    22     AC_PATH_PROG(PERL, perl, [], [$rp_with_perl/bin:$rp_with_perl])
     20if test "$with_perl" != "no" ; then
     21  if test "$with_perl" != "yes" ; then
     22    AC_PATH_PROG(PERL, perl, [], [$with_perl/bin:$with_perl])
    2323  else
    2424    AC_PATH_PROG(PERL, perl)
  • branches/blt4/cf/rpLangPython.m4

    r2279 r2307  
    1313PYTHON_VERSION=""
    1414pythondir=""
    15 rp_with_python="yes"
    1615AC_ARG_WITH([python],
    1716    [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=yes@:>@])],
    18     [rp_with_python=$withval],
    19     [rp_with_python=yes])
     17    [],
     18    [with_python=yes])
    2019
    21 if test "$rp_with_python" != "no" ; then
    22   if test "$rp_with_python" = "yes" ; then
     20if test "$with_python" != "no" ; then
     21  if test "$with_python" = "yes" ; then
    2322    AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
    2423  else
    25     AC_PATH_PROG(PYTHON, python, [], [${rp_with_python}/bin:${rp_with_python}])
     24    AC_PATH_PROG(PYTHON, python, [], [${with_python}/bin:${with_python}])
    2625  fi
    2726  AC_MSG_CHECKING([for Python version])
  • branches/blt4/lang/Makefile.in

    r2281 r2307  
    2020PYTHON          = @PYTHON_DISTUTILS@
    2121MEX             = @MEX@
    22 MKOCTFILE       = @MKOCTFILE2@ @MKOCTFILE3@
    23 JAVA_HOME       = @JAVA_HOME@
     22OCTAVE          = @OCTAVE_VERSION@
     23JAVAC           = @JAVAC@
    2424
    2525# Rappture requires it. We always build a Tcl language API.
     
    3838  LANGS += matlab
    3939endif
    40 ifneq ($(MKOCTFILE),)
     40ifneq ($(OCTAVE),)
    4141  LANGS += octave
    4242endif
    43 ifneq ($(JAVA_HOME),)
     43ifneq ($(JAVAC),)
    4444  LANGS += java
    4545endif
  • branches/blt4/lang/tcl/pkgIndex.tcl.in

    r1151 r2307  
    1212    set ext [info sharedlibextension]
    1313    load [file join $dir "Rappture${version}${ext}"]
    14     package require BLT
    1514    package provide Rappture $version
    1615} $dir]
  • branches/blt4/lang/tcl/src/Makefile.in

    r2208 r2307  
    3737  -I$(srcdir)/../../../src/objects \
    3838  -I$(includedir)
    39 
    4039version         = @PACKAGE_VERSION@
    4140DEFINES         = -DPACKAGE_VERSION=\"$(version)\"
  • branches/blt4/packages/vizservers/nanoscale/server.c

    r2120 r2307  
    7575            _x > _y ? _x : _y; })
    7676
    77 #ifdef notdef
    78 static int
    79 find_best_host(void)
    80 {
    81     int h;
    82     float best = load;
    83     int index = -1;
    84     //printf("My load is %f\n", best);
    85     for(h=0; h<sizeof(host_array)/sizeof(host_array[0]); h++) {
    86         if (host_array[h].in_addr.s_addr == 0)
    87             continue;
    88         //printf("%d I think load for %s is %f   ", h,
    89         //       inet_ntoa(host_array[h].in_addr), host_array[h].load);
    90         if (host_array[h].children <= children) {
    91             if (host_array[h].load < best) {
    92                 //if ((random() % 100) < 75) {
    93                 index = h;
    94                 best = host_array[h].load;
    95                 //}
    96                 //printf(" Better\n");
    97             } else {
    98                 //printf(" Worse\n");
    99             }
    100         }
    101     }
    102 
    103     //printf("I choose %d\n", index);
    104     return index;
    105 }
    106 #endif
    107 
    108 static void
    109 broadcast_load(void)
    110 {
    111     int msg[2];
    112     msg[0] = htonl(load);
    113     msg[1] = htonl(children);
    114     int status;
    115     status = sendto(send_fd, &msg, sizeof(msg), 0, (struct sockaddr *)&send_addr,
    116                     sizeof(send_addr));
    117     if (status < 0) {
    118         perror("sendto");
    119     }
    120 }
    12177
    12278static void
     
    14096           children, memory_in_use, load);
    14197
    142 #ifdef notdef
    143     broadcast_load();
    144 #endif
    14598}
    14699
     
    158111            return;
    159112        }
    160     }
    161 }
    162 
    163 static void
    164 update_load_average(void)
    165 {
    166     static unsigned int counter;
    167 
    168     load = load / LOAD_DROP_OFF;
    169     float newload = 0.0;
    170     int c;
    171     for(c=0; c < sizeof(child_array)/sizeof(child_array[0]); c++) {
    172         if (child_array[c].pipefd != 0) {
    173             newload += child_array[c].requests * child_array[c].memory;
    174             child_array[c].requests = 0;
    175         }
    176     }
    177     load = load + newload;
    178 
    179     if ((counter++ % BROADCAST_INTERVAL) == 0) {
    180         broadcast_load();
    181113    }
    182114}
     
    291223        server_command[0][0]=='\0') {
    292224        int i;
    293         fprintf(stderr, "nservices=%d, recv_port=%d, server_command[0]=%s\n", nservices, recv_port, server_command[0]);
    294225        for (i = 0; i < argc; i++) {
    295226            fprintf(stderr, "argv[%d]=(%s)\n", i, argv[i]);
     
    399330    // We're ready to go.  Before going into the main loop,
    400331    // broadcast a load announcement to other machines.
    401 #ifdef notdef
    402     broadcast_load();
    403 #endif
    404332    int maxfd = send_fd;
    405333    FD_ZERO(&saved_rfds);
     
    428356        if (status <= 0) {
    429357            if (sigalarm_set) {
    430                 update_load_average();
    431358                sigalarm_set = 0;
    432359            }
    433360            continue;
    434361        }
    435      
    436362     
    437363        int accepted = 0;
     
    537463                int newmemory = ntohl(msg);
    538464             
    539 #ifdef notdef
    540                 // Find the best host to create a new child on.
    541                 int index = find_best_host();
    542              
    543                 // Only redirect if another host's load is significantly less
    544                 // than our own...
    545                 if (index != -1 &&
    546                     (host_array[index].load < (LOAD_REDIRECT_FACTOR * load))) {
    547                  
    548                     // If we're redirecting to another machine, give that
    549                     // machine an extra boost in our copy of the load
    550                     // statistics.  This will keep us from sending the very
    551                     // next job to it.  Eventually, the other machine will
    552                     // broadcast its real load and we can make an informed
    553                     // decision as to who redirect to again.
    554                     host_array[index].load += newmemory * INITIAL_LOAD;
    555                  
    556                     // Redirect to another machine.
    557                     printf("Redirecting to %s\n",
    558                            inet_ntoa(host_array[index].in_addr));
    559                     write(i, &host_array[index].in_addr.s_addr, 4);
    560                     FD_CLR(i, &saved_rfds);
    561                     clear_service_fd(i);
    562                     close(i);
    563                     continue;
    564                 }
    565 #endif
    566465                memory_in_use += newmemory;
    567466                load += 2*INITIAL_LOAD;
    568 #ifdef notdef
    569                 broadcast_load();
    570 #endif
    571467                printf("Accepted new job with memory %d\n", newmemory);
    572468                //printf("My load is now %f\n", load);
     
    654550                 
    655551                    children++;
    656                     broadcast_load();
    657552                }
    658553             
  • branches/blt4/packages/vizservers/nanovis/Command.cpp

    r1982 r2307  
    785785
    786786static Rappture::CmdSpec cutplaneOps[] = {
    787     {"position", 1, CutplanePositionOp, 4, 0, "bool axis ?indices?",},
    788     {"state",    1, CutplaneStateOp,    4, 0, "relval axis ?indices?",},
     787    {"position", 1, CutplanePositionOp, 4, 0, "relval axis ?indices?",},
     788    {"state",    1, CutplaneStateOp,    4, 0, "bool axis ?indices?",},
    789789};
    790790static int nCutplaneOps = NumCmdSpecs(cutplaneOps);
  • branches/blt4/packages/vizservers/nanovis/ParticleSystem.cpp

    r2120 r2307  
    1313#include <GL/glaux.h>
    1414#else
     15#ifdef notdef
    1516#include <opencv/cv.h>
    1617#include <opencv/highgui.h>
     18#endif
    1719#endif
    1820
  • branches/blt4/packages/vizservers/nanovis/Volume.h

    r1510 r2307  
    117117           float size, int n_component, float* data, double vmin, double vmax,
    118118           double nonzero_min);
    119     ~Volume();
     119    virtual ~Volume();
    120120       
    121121public :
  • branches/blt4/packages/vizservers/start_viz.sh.in

    r2120 r2307  
    1212broadcast=`hostname -i | sed 's/\.[0-9]*$/.255/'`
    1313
    14 render_dir="@prefix@"
    15 vtk_lib_dir="@VTK_LIB_DIR@"
     14exec_prefix="@exec_prefix@"
     15bindir="@bindir@"
     16libdir="@libdir@"
     17. ${bindir}/rappture.env
     18
    1619nanoscale_port=2000
    1720nanovis_port=2000
     
    1922pymol_port=2020
    2023
    21 # Build the name of the run directory. This is where nanoscale and the
    22 # visualization programs will reside.  The directory name is the same as the
    23 # render directory.
    24 dir="/tmp/`basename $render_dir`"
    25 
    26 # Get the versioned VTK library directory (e.g. "vtk-5.6")
    27 vtkdir="`basename $vtk_lib_dir`"
    28 
    29 PATH=${dir}/bin:$PATH
    30 LD_LIBRARY_PATH=${dir}/lib:${dir}/lib/${vtkdir}:$LD_LIBRARY_PATH
    31 PYMOL_PATH=${dir}/lib/pymol
     24PYMOL_PATH=${libdir}/pymol
     25# lspci is either in /sbin or /usr/sbin
     26PATH=/sbin:/usr/sbin:${PATH}
    3227
    3328export PATH LD_LIBRARY_PATH PYMOL_PATH
     
    3934nvideo=`lspci | fgrep VGA | fgrep nVidia | wc -l`
    4035
    41 nanoscale="${dir}/bin/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast"
    42 nanovis="${dir}/bin/nanovis -p ${dir}/lib/shaders:${dir}/lib/resources"
    43 vtkvis="${dir}/bin/vtkvis"
    44 pymolproxy="${dir}/bin/pymolproxy ${dir}/bin/pymol -p -q -i -x -X 0 -Y 0"
     36nanoscale="${bindir}/nanoscale -x ${nvideo} -b $nanoscale_port -s $broadcast"
     37nanovis="${bindir}/nanovis -p ${libdir}/shaders:${libdir}/resources"
     38vtkvis="${bindir}/vtkvis"
     39pymolproxy="${bindir}/pymolproxy ${bindir}/pymol -p -q -i -x -X 0 -Y 0"
    4540
    46 # Copy from render directory if the run copy doesn't already exist.
    47 # Otherwise use what's there.  This means that successive invocations
    48 # of nanoscale won't create their own run directories (only the first
    49 # one will).
    50 
    51 if test -d "$dir" ; then
    52   echo "Reusing previously installed version from $render_dir"
    53 else
    54   echo "Copying rappture from $render_dir"
    55   mkdir -p $dir
    56   tar -C ${render_dir} -clf - . | tar -C $dir -xpf -
    57 fi
    58 
    59 cd ${dir}
     41cd /tmp
    6042
    6143# Don't let nanoscale and the visualization servers run away.
     
    6446ulimit -t $(expr ${minutes} \* 60 )
    6547
    66 echo "$nanoscale -l $nanovis_port -c \"$nanovis\" -l $pymol_port -c \"$pymolproxy\""
    67 $nanoscale -l $nanovis_port -c "$nanovis" -l $vtkvis_port -c "$vtkvis" -l $pymol_port -c "$pymolproxy"
     48set -xv
     49echo `ldd $vtkvis`
     50exec $nanoscale \
     51 -l $nanovis_port -c "$nanovis" \
     52 -l $vtkvis_port  -c "$vtkvis" \
     53 -l $pymol_port   -c "$pymolproxy"
    6854
     55
Note: See TracChangeset for help on using the changeset viewer.