### Example Linux Installation Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Installing_VisIt.md Installs a specific version of VisIt to a designated directory on Linux. ```bash ./visit-install 3.2.2 linux-x86_64 /usr/local/visit ``` -------------------------------- ### Running a Java Client Example Source: https://github.com/visit-dav/visit/blob/develop/src/doc/java_client/index.md This command shows how to execute a Java client example. Arguments before the example name are for the Java runtime, and arguments after are for the example program or VisIt itself. Ensure the -datapath argument has a trailing slash. ```shell java -cp .:visit.jar Example -stay -path /path/to/visit/bin -datapath /path/to/silo/data/dir/ ``` -------------------------------- ### Install VisIt V2 Libraries and Headers Source: https://github.com/visit-dav/visit/blob/develop/src/sim/V2/lib/CMakeLists.txt Installs the built static libraries (simV2, simV2f) and the dynamic library (if built) to the specified installation path. It also installs the associated header files. ```cmake install(TARGETS simV2 simV2f ${LIBSYM_DYN} ARCHIVE DESTINATION ${VISIT_INSTALLED_VERSION}/libsim/V2/lib LIBRARY DESTINATION ${VISIT_INSTALLED_VERSION}/libsim/V2/lib PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(FILES ${LIBSIM_HEADERS} ${FORTRAN_LIBSIM_HEADERS} visitfortransimV2interface.inc DESTINATION ${VISIT_INSTALLED_VERSION}/libsim/V2/include PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ) ``` -------------------------------- ### Install and Test VisIt Source: https://github.com/visit-dav/visit/blob/develop/src/doc/dev_manual/Docker.md Copies a VisIt installation script into the home directory, runs the script to install VisIt, and then launches VisIt in client-only mode to perform basic tests by opening a database, creating a plot, and saving the window. ```bash visit@bea87fee3276:~/visit3.0.2/build$ cd ../.. visit@bea87fee3276:~$ cp visit3.0.2/scripts/visit-install . visit@bea87fee3276:~$ ./visit-install 3.0.2 linux-x86_64 visit visit@bea87fee3276:~$ visit/bin/visit -cli -nowin >>> OpenDatabase("visit/data/curv2d.silo") >>> AddPlot("Pseudocolor", "d") >>> DrawPlots() >>> SaveWindow() >>> quit() ``` -------------------------------- ### Installing Third-Party Libraries with VisIt Source: https://github.com/visit-dav/visit/blob/develop/src/doc/dev_manual/AddingFindModule.md Custom INSTALL commands provided by VisIt for managing third-party components. Use `THIRD_PARTY_INSTALL_LIBRARY` to install library files and `THIRD_PARTY_INSTALL_INCLUDE` to install package headers. ```cmake THIRD_PARTY_INSTALL_LIBRARY(LIBFILE) ``` ```cmake THIRD_PARTY_INSTALL_INCLUDE(pkg incdir) ``` -------------------------------- ### Windows Installer Options Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Installing_VisIt.md Lists command-line parameters for the Windows VisIt installer, including silent installation and directory specification. ```default -ALLUSERS Install for all users. Must be in admin-mode. Default : install for current user -SITE Specifies host profiles to be installed (eg llnl). Default: None -PB Specifies parallel bank (FOR LLNL host-profiles). Default: wbronze -DB Specifies a default database reader for VisIt. (eg Silo, FLASH, etc). Default: None -DEV Install plugin development tools. Default: no plugin dev tools -LIBSIM Install libsim tools. Default: no libsim tools -AssociatePython Associate python files with VisIt. Default: don't set up association -AssociateCurves Associate curve files with VisIt. Default: don't set up association /S Make install silent. /D Change install directory to . Default is %PROGRAM FILES% for ALL USERS and %HOMEPATH% for single user. MUST BE THE LAST PARAMETER! ``` -------------------------------- ### Install XKBCOMMON Libraries Source: https://github.com/visit-dav/visit/blob/develop/src/CMakeLists.txt Installs xkbcommon libraries if VISIT_XKBCOMMON_DIR is defined. Copies and installs shared object files. ```cmake if(VISIT_XKBCOMMON_DIR) message(STATUS "Installing xkbcommon") file(GLOB xkbcommon_libs "${VISIT_XKBCOMMON_DIR}/lib/libxkb*.so*") execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${xkbcommon_libs} ${VISIT_BINARY_DIR}/lib) install(FILES ${xkbcommon_libs} DESTINATION ${VISIT_INSTALLED_VERSION_LIB} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() ``` -------------------------------- ### Install Host Profiles and Configuration Files Source: https://github.com/visit-dav/visit/blob/develop/src/resources/hosts/CMakeLists.txt Conditionally installs XML host profile files, a custom launcher (excluding Windows), and configuration files (config, guiconfig, visitrc) to their respective destinations. These files are installed optionally, meaning they will only be installed if they exist in the source directory. ```cmake IF (VISIT_INSTALL_PROFILES_TO_HOSTS) FILE(GLOB LPROF_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${VISIT_INSTALL_PROFILES_TO_HOSTS}/*.xml") INSTALL(FILES ${LPROF_FILES} DESTINATION ${LPROF_DEST} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ ) if(NOT WIN32) INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${VISIT_INSTALL_PROFILES_TO_HOSTS}/customlauncher" DESTINATION ${BIN_DEST} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ OPTIONAL) endif() INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${VISIT_INSTALL_PROFILES_TO_HOSTS}/config" DESTINATION ${CONFIG_DEST} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ OPTIONAL ) INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${VISIT_INSTALL_PROFILES_TO_HOSTS}/guiconfig" DESTINATION ${CONFIG_DEST} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ OPTIONAL ) INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${VISIT_INSTALL_PROFILES_TO_HOSTS}/visitrc" DESTINATION ${CONFIG_DEST} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ OPTIONAL ) ENDIF (VISIT_INSTALL_PROFILES_TO_HOSTS) ``` -------------------------------- ### Setting VisIt Installation Variables Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Building_Directly_With_CMake.md Defines the installation home directory and architecture for VisIt builds. ```cmake ## ## Setup VISITHOME & VISITARCH variables. ## SET(VISITHOME /Users/foobar/visit/release/build/thirdparty_shared/third_party) SET(VISITARCH darwin-arm64) ``` -------------------------------- ### Get help for modules with help() Source: https://github.com/visit-dav/visit/blob/develop/src/doc/python_scripting/python.md The `help()` function can also be used to get documentation for modules, including their description and usage examples. ```python >>> help("copy") Help on module copy: NAME copy - Generic (shallow and deep) copying operations. MODULE REFERENCE https://docs.python.org/3.7/library/copy The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above. DESCRIPTION Interface summary: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y For module specific errors, copy.Error is raised. . . . NOTE: The following VisIt functions and objects also mention 'copy'... ['CopyAnnotationsToWindow', 'CopyLightingToWindow', 'CopyPlotsToWindow', 'CopyViewToWindow', 'GetPlotList', 'InitializeNamedSelectionVariables'] ``` -------------------------------- ### Get Help with VisIt Startup Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Startup_Options.md Use these commands to access help information for VisIt's startup options. ```bash visit -help visit -fullhelp ``` -------------------------------- ### Install VisIt on Q Source: https://github.com/visit-dav/visit/blob/develop/docs/q_machine_install.txt Install VisIt to the specified directory on Q. Choose 'No system configuration' if only running an engine or mdserver on Q. ```bash q21:~/visit050110 [8] > ./clearcase_bin/visit-install -g llnl 1.4.1 osf1 /usr/projects/llnl_b/visit ``` -------------------------------- ### Add Pip Setup for Python Module Source: https://github.com/visit-dav/visit/blob/develop/src/visitpy/visit_module/CMakeLists.txt Configures the build system to create a Python package that can be installed using pip. This command specifies the target name, installation directory, Python module directory, setup file, and source files for the Python package. ```cmake PYTHON_ADD_PIP_SETUP(NAME visit_module_py_setup DEST_DIR site-packages PY_MODULE_DIR visit PY_SETUP_FILE setup.py PY_SOURCES py_src/__init__.py) ``` -------------------------------- ### Installed Package Directory Structure Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Spack.md Example paths demonstrating the directory structure where Spack installs compiled packages, including architecture, compiler, and package details. ```bash opt/spack/cray-sles15-zen2/gcc-11.2.0/hdf5-1.8.22-c3djozhlmrvy7wpu46f36qeakemiactw opt/spack/cray-sles15-zen2/gcc-11.2.0/cmake-3.14.7-nnahgnkkl2d2ty2us46we75pnjepci35 ``` -------------------------------- ### BRICK_ORIGIN Example Source: https://github.com/visit-dav/visit/blob/develop/src/doc/data_into_visit/BOVFormat.md Specifies the origin of the grid. This keyword defines the starting coordinates of the grid. ```default BRICK_ORIGIN: 0. 0. 0. ``` -------------------------------- ### Build STRIPACK Library with build_visit Source: https://github.com/visit-dav/visit/blob/develop/src/doc/using_visit/WorkingWithFiles/Read_Write_Options.md Example bash command to download, build, and install the STRIPACK library using the build_visit tool. It specifies Fortran compiler flags and installation directory. ```shell env FCFLAGS="-fdefault-real-8 -fdefault-double-8 -shared -fPIC" \ STRIPACK_INSTALL_DIR=/usr/local/visit/lib ./build_visit --fortran \ --no-visit --no-thirdparty --thirdparty-path /dev/null --no-zlib --stripack ``` -------------------------------- ### Run Beta Version Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Startup_Options.md Starts VisIt using the current beta release. ```bash visit -beta ``` -------------------------------- ### sbatch/aprun Launch with TotalView Source: https://github.com/visit-dav/visit/blob/develop/test/baseline/unit/launcher/sbatch_aprun.txt This example demonstrates launching a VisIt engine with aprun and integrating TotalView for debugging. The LAUNCHSCRIPT includes TotalView commands before the aprun execution. ```bash sbatch --export=HOME=$HOME,LIBPATH=$VISITDIR/lib,LD_LIBRARY_PATH=$VISITDIR/lib/osmesa:$VISITDIR/lib:$VISITDIR/lib/mesagl:$VISITDIR/lib,VISITHOME=$VISITDIR,VISITARCHHOME=$VISITDIR/,VISITPLUGINDIR=$HOME/.visit/$VERSION/$PLATFORM/plugins:$VISITDIR/plugins,PYTHONHOME=$VISITDIR/lib/python --partition=pbatch --account=bdivp --ntasks=8 --nodes=1 --tasks-per-node=8 $LAUNCHSCRIPT ``` ```bash #!/bin/sh cd $VISIT_TEST_DIR ulimit -c 0 totalview aprun -a -dograb -arg1 -arg2 -n 8 -N 8 $VISIT_EXE_DIR/engine_par -dv -host $HOST -port 5600 ``` -------------------------------- ### Example PlainText File for Curves (Row Index for X) Source: https://github.com/visit-dav/visit/blob/develop/src/doc/data_into_visit/PlainTextFormat.md This example shows a plain text file for curves where the X coordinate is implicitly defined by the row number, starting from 0. Values are comma-separated. ```default inverse,sqrt,quadratic 100,0,0 50,10,0.01 33.3333,14.1421,0.04 25,17.3205,0.09 20,20,0.16 16.6667,22.3607,0.25 14.2857,24.4949,0.36 12.5,26.4575,0.49 11.1111,28.2843,0.64 ``` -------------------------------- ### Spack Environment File Example Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Spack.md Example of a Spack environment file defining external packages like rocm-device-libs and rocprim with specific versions and installation prefixes. Use this to manage external dependencies in your Spack build. ```yaml prefix: /opt/rocm-5.2.0/ rocm-device-libs: version: [5.2.0] buildable: false externals: - spec: rocm-device-libs@5.2.0 prefix: /opt/rocm-5.2.0/ rocprim: version: [5.2.0] buildable: false externals: - spec: rocprim@5.2.0 prefix: /opt/rocm-5.2.0/ ``` -------------------------------- ### Main Method for Lighting Example Source: https://github.com/visit-dav/visit/blob/develop/src/doc/java_client/index.md The entry point for the lighting example application. It creates an instance of the TryLighting class and calls its run method. ```java public static void main(String args[]) { TryLighting r = new TryLighting(); r.run(args); } ``` -------------------------------- ### Add Proxy Example Executable Source: https://github.com/visit-dav/visit/blob/develop/src/viewer/proxy/CMakeLists.txt Conditionally adds the proxyexample executable if VISIT_ENABLE_EXAMPLES is ON. It specifies sources, dependencies, and installation settings. ```cmake if(VISIT_ENABLE_EXAMPLES) visit_add_executable( NAME proxyexample SOURCES proxyexample.C DEPENDS_ON viewerrpc viewerproxy visitcommon avtdbatts FOLDER examples SKIP_INSTALL) set_target_properties(proxyexample PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) endif() ``` -------------------------------- ### Create VisIt Package (Git Clone Build) Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Basic_Usage.md Generate a distribution file for installation using `visit-install` after building VisIt from a git clone. Navigate to the build directory first. ```bash cd visit/build make package ``` -------------------------------- ### Initialize Viewer with Config File Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Startup_Options.md Uses a specified configuration file to initialize the viewer. If no absolute path is given, it looks in the .visit directory. ```bash visit -config ``` -------------------------------- ### BYTE_OFFSET Example Source: https://github.com/visit-dav/visit/blob/develop/src/doc/data_into_visit/BOVFormat.md Specifies a byte offset into the data file to start reading. Useful for skipping headers, such as those written by Fortran. ```default BYTE_OFFSET: 4 ``` -------------------------------- ### Install Visit Binary Files Source: https://github.com/visit-dav/visit/blob/develop/src/bin/CMakeLists.txt Installs the main Visit binary files to the 'bin' directory. This command specifies read, write, and execute permissions for owner and group, and read/execute for others. ```cmake install(FILES ${VISIT_BIN_FILES} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) ``` -------------------------------- ### Define ADD_SILO_EXAMPLE CMake Function Source: https://github.com/visit-dav/visit/blob/develop/src/tools/data/DataManualExamples/CreatingCompatibleAdvanced/CMakeLists.txt Defines a CMake function to add an executable for Silo examples. This function sets up build targets, source files, include directories, dependencies, output names, and installation folders for C and Fortran examples. ```cmake function(ADD_SILO_EXAMPLE target) visit_add_executable( NAME adv_example_${target} SOURCES ${ARGN} INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS_ON silo stdc++ m OUTPUT_NAME ${target} FOLDER tools/DataManualExamples/CreatingCompatibleAdvanced SKIP_INSTALL) set_target_properties(adv_example_${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${VISIT_BINARY_DIR}/tools/DataManualExamples/CreatingCompatibleAdvanced) endfunction() ``` -------------------------------- ### sbatch/aprun Launch with strace Source: https://github.com/visit-dav/visit/blob/develop/test/baseline/unit/launcher/sbatch_aprun.txt This example demonstrates launching a VisIt engine with aprun and strace for system call tracing. The LAUNCHSCRIPT includes strace with specific options for detailed tracing. ```bash sbatch --export=HOME=$HOME,LIBPATH=$VISITDIR/lib,LD_LIBRARY_PATH=$VISITDIR/lib/osmesa:$VISITDIR/lib:$VISITDIR/lib/mesagl:$VISITDIR/lib,VISITHOME=$VISITDIR,VISITARCHHOME=$VISITDIR/,VISITPLUGINDIR=$HOME/.visit/$VERSION/$PLATFORM/plugins:$VISITDIR/plugins,PYTHONHOME=$VISITDIR/lib/python --partition=pbatch --account=bdivp --ntasks=8 --nodes=1 --tasks-per-node=8 $LAUNCHSCRIPT ``` ```bash #!/bin/sh cd $VISIT_TEST_DIR ulimit -c 0 aprun -arg1 -arg2 -n 8 -N 8 strace -ttt -T $VISIT_EXE_DIR/engine_par -dv -host $HOST -port 5600 ``` -------------------------------- ### Write 2D Curvilinear Mesh Xdmf Source: https://github.com/visit-dav/visit/blob/develop/src/doc/data_into_visit/XdmfFormat.md Generates an Xdmf file for a 2D curvilinear mesh. This example shows the setup for topology and geometry definitions. ```default void create_curv2d() { FILE *xmf = 0; /* * Open the file and write the header. */ xmf = fopen("curv2d.xmf", "w"); fprintf(xmf, "\n"); fprintf(xmf, "\n"); fprintf(xmf, "\n"); /* * Write the mesh description and the variables defined on the mesh. */ fprintf(xmf, " \n"); fprintf(xmf, " \n"); fprintf(xmf, " \n", NY+1, NX+1); fprintf(xmf, " \n"); ``` -------------------------------- ### Qwt Build Options Source: https://github.com/visit-dav/visit/blob/develop/src/resources/help/en_US/relnotes3.4.2.html Options for building VisIt with or without Qwt, or using a system-installed Qwt. ```bash # Disable Qwt support ./build_visit --no-qwt ``` ```bash # Use a system-installed Qwt ./build_visit --system-qwt ``` ```bash # Use a pre-built Qwt from a specific directory ./build_visit --alt-qwt-dir /path/to/qwt/install ``` -------------------------------- ### Basic psub Job Launch Source: https://github.com/visit-dav/visit/blob/develop/test/baseline/unit/launcher/psub.txt Launches a parallel job using psub with pre and post commands. This is a fundamental example for starting parallel processes. ```bash psub -x -ln 8 -r JOB_NAME -c pbatch -b bdivp -tM 30:00 -expedite -i "cd $VISIT_TEST_DIR ; limit coredumpsize 0 ; setenv LIBPATH $VISITDIR/lib ; setenv LD_LIBRARY_PATH $VISITDIR/lib ;echo 'pre command' ;$VISIT_EXE_DIR/engine_par -dv -host $HOST -port 5600 ; echo 'post command' ;" ``` -------------------------------- ### Basic msub/mpirun Launch Script Source: https://github.com/visit-dav/visit/blob/develop/test/baseline/unit/launcher/msub_mpirun.txt This snippet shows the generated msub launch script for a basic parallel VisIt engine execution. It includes environment variable setup and the command to start the engine via mpirun. ```bash #!/bin/sh cd $VISIT_TEST_DIR ulimit -c 0 startx mpirun -arg1 -arg2 -np 8 -machinefile machine.txt $VISIT_EXE_DIR/engine_par -plugindir $HOME/.visit/$VERSION/$PLATFORM/plugins:$VISITDIR/plugins -dv -host $HOST -port 5600 stopx ``` -------------------------------- ### Install VisIt Targets Source: https://github.com/visit-dav/visit/blob/develop/src/tools/data/writer/CMakeLists.txt Installs the 'visit_writer' target as part of the VisIt installation. ```cmake VISIT_INSTALL_TARGETS(visit_writer) ``` -------------------------------- ### Launch VisIt on Linux Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Installing_VisIt.md Executes the VisIt application after installation. ```bash /usr/local/visit/bin/visit ``` -------------------------------- ### Create VisIt Package (Tarball Build) Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Basic_Usage.md Generate a distribution file for installation using `visit-install` after building VisIt from a tar file. Navigate to the build directory first. ```bash cd visit3.0.1/build make package ``` -------------------------------- ### Visit-install Script Usage Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Installing_VisIt.md Shows the general syntax for the visit-install script. ```bash ./visit-install version platform directory ``` -------------------------------- ### Setting up VisIt Build Environment with CMake Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Building_Directly_With_CMake.md Clone the VisIt repository and create a build directory. This is the initial step before configuring the CMake build. ```bash git clone --recursive git@github.com:visit-dav/visit.git mkdir visit/build cd visit/build ``` -------------------------------- ### Install Python Module and Script Source: https://github.com/visit-dav/visit/blob/develop/src/sim/V2/swig/python/CMakeLists.txt Installs the 'pysimV2' target and the 'simV2.py' script to the appropriate VisIt installation directories. ```cmake VISIT_INSTALL_TARGETS(pysimV2) install(FILES simV2.py DESTINATION ${VISIT_INSTALLED_VERSION_LIB}) ``` -------------------------------- ### Create and Configure Host Profile in Java Source: https://github.com/visit-dav/visit/blob/develop/src/doc/java_client/index.md This Java snippet shows how to create a `MachineProfile` and a `LaunchProfile`, configure them with remote host details and paths, and add them to the viewer's `HostProfileList`. It then demonstrates opening a remote database and creating plots. ```Java // Copyright (c) Lawrence Livermore National Security, LLC and other VisIt // Project developers. See the top-level LICENSE file for dates and other // details. No copyright assignment is required to contribute to VisIt. import llnl.visit.ViewerProxy; import llnl.visit.MachineProfile; import llnl.visit.LaunchProfile; import llnl.visit.HostProfileList; import java.util.Vector; // **************************************************************************** // Class: MakeHostProfile // // Purpose: // This class implements an example program that shows how to use the // ViewerProxy class and control VisIt's viewer from Java. // // Notes: // // Programmer: Brad Whitlock // Creation: Mon Aug 10 13:40:40 PDT 2009 // // Modifications: // Jeremy Meredith, Thu Feb 18 17:14:38 EST 2010 // Split host profile into machine profile and launch profile. // Also, added directory argument. // // Kathleen Biagas, Wed Nov 9 14:30:32 PST 2016 // Update host name to a machine that still exists. // // Kathleen Biagas, Tuesday Oct 22, 2024 // Replace pascal with poodle. // // Cyrus Harrison, Mon Dec 1 14:40:14 PST 2025 // Replace poodle with dane. // // **************************************************************************** public class MakeHostProfile extends RunViewer { public MakeHostProfile() { super(); } protected void work(String[] args) { // Change these for your remote system. String host = new String("dane.llnl.gov"); String user = new String("kbonnell"); String remotevisitPath = new String("/usr/gapps/visit"); // Basic, serial profile. LaunchProfile example = new LaunchProfile(); example.SetProfileName("example"); example.SetActive(true); // Create a new machine profile object and the serial launch profile. MachineProfile profile = new MachineProfile(); profile.SetHost(host); profile.SetUserName(user); profile.SetClientHostDetermination(MachineProfile.CLIENTHOSTDETERMINATION_PARSEDFROMSSHCLIENT); profile.SetTunnelSSH(true); profile.SetDirectory(remotevisitPath); profile.AddLaunchProfiles(example); // Replace the list of host profiles and tell the viewer about the changes. We could // have added to the list instead of clearing the list. viewer.GetViewerState().GetHostProfileList().ClearMachines(); viewer.GetViewerState().GetHostProfileList().AddMachines(profile); viewer.GetViewerState().GetHostProfileList().Notify(); System.out.println("HostProfileList = \n" + viewer.GetViewerState().GetHostProfileList().toString("")); // Do a plot of the remote data. String remoteData = new String(host + ":" + remotevisitPath + "/data/globe.silo"); if(viewer.GetViewerMethods().OpenDatabase(remoteData)) { viewer.GetViewerMethods().AddPlot("Pseudocolor", "u"); viewer.GetViewerMethods().AddPlot("Mesh", "mesh1"); viewer.GetViewerMethods().DrawPlots(); } else { System.out.println("Could not open the database!"); } } public static void main(String args[]) { MakeHostProfile r = new MakeHostProfile(); r.run(args); } } ``` -------------------------------- ### Run VisIt from Specified Directory Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Startup_Options.md Launches a version of VisIt located in the specified directory. The provided path should point to a VisIt installation directory, and '/bin' will be automatically appended. ```bash -dir ``` -------------------------------- ### Install XCB Libraries Source: https://github.com/visit-dav/visit/blob/develop/src/CMakeLists.txt Installs XCB libraries if VISIT_XCB_DIR is defined. Copies and installs shared object files. ```cmake if(VISIT_XCB_DIR) message(STATUS "Installing xcb") file(GLOB xcb_libs "${VISIT_XCB_DIR}/lib/libxcb*.so*") execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${xcb_libs} ${VISIT_BINARY_DIR}/lib) install(FILES ${xcb_libs} DESTINATION ${VISIT_INSTALLED_VERSION_LIB} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() ``` -------------------------------- ### Example of SET_UP_THIRD_PARTY function signature Source: https://github.com/visit-dav/visit/blob/develop/src/resources/help/en_US/relnotes3.3.0.html Demonstrates the modified signature for the `SET_UP_THIRD_PARTY` function in Find modules, which now utilizes keyword arguments for LIBS, LIBDIR, and INCDIR. ```cmake SET_UP_THIRD_PARTY(PackageName LIBS lib1 lib2 LIBDIR /path/to/libs INCDIR /path/to/include ) ``` -------------------------------- ### Run VisIt Script at Startup Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Startup_Options.md Executes a specified VisIt script upon startup. ```bash visit -s ``` -------------------------------- ### Install Python Site-Packages Directory Source: https://github.com/visit-dav/visit/blob/develop/src/lib/CMakeLists.txt Installs a Python site-packages directory into the Visit installation. This is used when Python filters or scripting are enabled. ```cmake if(VISIT_PYTHON_FILTERS OR VISIT_PYTHON_SCRIPTING) # there were unresolvable issues with the INSTALL(CODE ... # in FindVisItPython for pip-installed modules # this direct copy of the lib/site-packages dir from the # build works. install(DIRECTORY ${VISIT_LIBRARY_DIR}/site-packages DESTINATION ${VISIT_INSTALLED_VERSION_LIB}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_WRITE GROUP_READ WORLD_READ DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() ``` -------------------------------- ### sbatch/aprun Launch with Valgrind Source: https://github.com/visit-dav/visit/blob/develop/test/baseline/unit/launcher/sbatch_aprun.txt This snippet shows how to launch a VisIt engine with aprun and Valgrind for memory profiling. The LAUNCHSCRIPT configures Valgrind with specific options and directs output to a log file. ```bash sbatch --export=HOME=$HOME,LIBPATH=$VISITDIR/lib,LD_LIBRARY_PATH=$VISITDIR/lib/osmesa:$VISITDIR/lib:$VISITDIR/lib/mesagl:$VISITDIR/lib,VISITHOME=$VISITDIR,VISITARCHHOME=$VISITDIR/,VISITPLUGINDIR=$HOME/.visit/$VERSION/$PLATFORM/plugins:$VISITDIR/plugins,PYTHONHOME=$VISITDIR/lib/python --partition=pbatch --account=bdivp --ntasks=8 --nodes=1 --tasks-per-node=8 $LAUNCHSCRIPT ``` ```bash #!/bin/sh cd $VISIT_TEST_DIR ulimit -c 0 aprun -arg1 -arg2 -n 8 -N 8 valgrind --tool=memcheck --error-limit=no --num-callers=50 --leak-check=full --track-origins=yes --show-reachable=yes --log-file=vg_engine_par_%p.log $VISIT_EXE_DIR/engine_par -dv -host $HOST -port 5600 ``` -------------------------------- ### Add C Silo Data Extents Example Source: https://github.com/visit-dav/visit/blob/develop/src/tools/data/DataManualExamples/CreatingCompatibleAdvanced/CMakeLists.txt Adds a C executable for the 'dataextents' Silo example. This is part of the advanced data manual examples. ```cmake ADD_SILO_EXAMPLE(dataextents dataextents.c) ``` -------------------------------- ### msub/ibrun with TotalView Source: https://github.com/visit-dav/visit/blob/develop/test/baseline/unit/launcher/msub_ibrun.txt This example demonstrates launching the engine_par with msub and ibrun, integrated with TotalView for debugging. It includes specific TotalView arguments. ```bash #!/bin/sh cd $VISIT_TEST_DIR ulimit -c 0 startx totalview ibrun -a -dograb $VISIT_EXE_DIR/engine_par -dv -host $HOST -port 5600 stopx ``` -------------------------------- ### Add Serial Example Executable Source: https://github.com/visit-dav/visit/blob/develop/src/tools/data/xdmf_writer/CMakeLists.txt Defines a function to add serial example executables. Each example uses the XDMF writer library and depends on the math library (m). ```cmake function(add_serial_example tname) visit_add_executable( NAME ${tname} SOURCES ${tname}.c HEADERS xdmf_writer.h INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS_ON xdmf_writer_ser m SKIP_INSTALL) endfunction() ``` -------------------------------- ### Launch Engine at Startup Source: https://github.com/visit-dav/visit/blob/develop/src/doc/getting_started/Startup_Options.md Launches a VisIt engine. The engine runs on the local host by default, or on a specified remote host. ```bash visit -launchengine ``` -------------------------------- ### CMake Variable Example: VISIT_BUILD_ALL_PLUGINS Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Building_Directly_With_CMake.md Example of how to specify a CMake variable on the command line to control build options. This example shows enabling the build of all plugins. ```bash VISIT_BUILD_ALL_PLUGINS:BOOL=ON ``` -------------------------------- ### Build VisIt from Tarball Source: https://github.com/visit-dav/visit/blob/develop/src/doc/building_visit/Basic_Usage.md Use a prepackaged source code tar file instead of a git clone. This example uses the VisIt source code for the 3.5.0 release. ```bash ./build_visit3_5_0 –optional –tarball visit3.5.0.tar.gz ``` -------------------------------- ### Install Visit on A-Division (Open Side) Source: https://github.com/visit-dav/visit/blob/develop/docs/childs_machine_installs.txt Install Visit on A-Division machines for the 'vis_dev' group. Supports both Linux and Darwin. Installation is performed from an open-side Linux box. ```bash visit-install -c open -g vis_dev -gw -l 1.4 linux /usr/gapps/visit ``` ```bash visit-install -c open -g vis_dev -gw -l 1.4 darwin /usr/gapps/visit ``` -------------------------------- ### Launch Compute Engine with Job Launcher Options Source: https://github.com/visit-dav/visit/blob/develop/src/doc/python_scripting/quickrecipes.md Illustrates launching a compute engine using specific job launcher options like srun, partition, bank, processor count, and time limit. ```Python # Use the "srun" job launcher, the "batch" partition, the "mybank" bank, # 72 processors on 2 nodes and a time limit of 1 hour OpenComputeEngine("localhost", ("-l", "srun", "-p", "batch", "-b", "mybank", "-np", "72", "-nn", "2", "-t", "1:00:00")) ```