CGT 3.0 has been tested under the following OS and compilers:
Recommended compiler: GNU versions 10, 11, 12, 13, 14, 15
Recommended configure option: "configure --enable-omp"
The environment variable OMP_NUM_THREADS should be set to an integer <= number of processors available
For Windows users utilizing WSL, review https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps and then install CGT following the normal Linux procedures. Existing users of CGT have reported successful builds with earlier versions of CGT using this method, but the authors have not attempted this themselves.
[Steps 4, 5, 6, and 7 below are optional]Last modified: Wed Apr 29 16:14 PST 2026(1) Untaring the CGT archive Extract files from chimera*.tar.gz by typing: tar xzf chimera*.tar.gz where * is the version number of Chimera Grid Tools (e.g., 3.0) (2) Overgrid The graphical user interface OVERGRID requires the developer's installation of Tcl/Tk 8.4, 8.5, or 8.6 on the system. Do not use version 9.0.* of Tcl/Tk. The following environment variables should be set prior to running configure and compiling overgrid. The first six variables are required for compilation, while the last three are needed at run time. It is most convenient to set these in the .cshrc file. TCLDIR_INC = full path to directory containing tcl.h TKDIR_INC = full path to directory containing tk.h X11DIR_INC = full path to directory containing X11/X.h, GL/gl.h, etc. TCLDIR_SO = full path to directory containing libtcl8.*.so TKDIR_SO = full path to directory containing libtk8.*.so X11DIR_SO = full path to directory containing libX11.so TCL_LIBRARY = full path to directory containing init.tcl TK_LIBRARY = full path to directory containing tk.tcl On Unix and Linux systems: LD_LIBRARY_PATH = full path to the libtcl8.*.so, libtk8.*.so libraries On Mac OS systems: DYLD_LIBRARY_PATH = full path to the libtcl8.*.dylib, libtk8.*.dylib libraries For example, a convenient way to do this is to set the following: setenv TCLDIR /u/wk/wchan/gl/tcl8.6.17 setenv TKDIR /u/wk/wchan/gl/tk8.6.17 setenv TCLDIR_INC $TCLDIR/generic setenv TKDIR_INC $TKDIR/generic setenv X11DIR_INC /usr/include setenv TCLDIR_SO $TCLDIR/unix setenv TKDIR_SO $TKDIR/unix setenv X11DIR_SO /usr/lib64 setenv TCL_LIBRARY $TCLDIR/library setenv TK_LIBRARY $TKDIR/library setenv LD_LIBRARY_PATH $TCLDIR/unix:$TKDIR/unix We recommend using the X-windows interface on all OS platforms so that a similar installation procedure can be used. It is recommended that the user download tcl/tk from tcl.tk and install it in their home using: For installation in the $HOME/gl directory: unpack tcl and tk: cd $HOME/gl tar xzvf ~/Downloads/tcl8.6.17-src.tar.gz (archive file name may vary) tar xzvf ~/Downloads/tk8.6.17-src.tar.gz (archive file name may vary) compile tcl: cd $HOME/gl/tcl8.6.17/unix ./configure make compile tk: cd $HOME/gl/tk8.6.17/unix ./configure --with-tcl=$HOME/gl/tcl8.6.17/unix make On Mac OS systems, you must have an installation of X-windows. Xquartz is the Apple certified X-windows installation and a dmg file can be downloaded for installation from http://xquartz.org Once this is done, we recommend setting the following environment variables: setenv X11DIR_INC /opt/local/include setenv X11DIR_SO /opt/local/lib These options can also be specified on the command line with the following configure construct: ./configure --with-x11dir_inc=/opt/local/include --with-x11dir_so=/opt/local/lib Please avoid using the files installed in the Frameworks directories starting with /Applications/Xcode.app/... (3) Oversmart Installation of the OVERSMART solution monitoring and reporting tool requires Python version 3.0 or higher. Python could be downloaded from http://www.python.org The following environment variable must also be set for proper execution of oversmart. PYTHONPATH = full path to chimera*/smart/bin (4) Using CGT with Engineering Sketch Pad (ESP) For users who wish to interface with the Engineering Sketch Pad (ESP/EGADS) open source libraries from MIT for geometry processing within CGT, follow the steps below. If the following procedure fails, users on MacOS may need to try the instructions in ESP_download.txt - Go to http://acdl.mit.edu/ESP - Go to the "Prebuilts" directory. - Download ESP{version}-linux-aarch64.tgz or ESP{version}-linux-x86_64.tgz for Linux, or ESP{version}-macos-arm64.tgz or ESP{version}-macos-x86_64.tgz for Mac where {version} = a 3-digit version number (e.g., 128) If you are not sure which file to download, type "uname -a" in a shell to report processor architecture. - Go to the directory where you want to install ESP. Let the full path to this directory be $ESPDIR. - Unpack the downloaded .tgz file by typing "tar xzf file.tgz". - Under $ESPDIR, there should be an OpenCASCADE-x.y.z and an EngSketchPad directory where x.y.z could be 7.8.1 or some other version. - Set the following environment variables in .cshrc for csh or tcsh, or the equivalent in other shells. - Match the OpenCASCADE version that is packaged with ESP in the environment variables. For Linux: setenv ESP_ARCH LINUX64 setenv CASARCH Linux For Mac: setenv ESP_ARCH DARWIN64 setenv CASARCH Darwin For both Linux and Mac: setenv ESP_ROOT $ESPDIR/EngSketchPad setenv CASROOT $ESPDIR/OpenCASCADE-x.y.z setenv CASREV x.y setenv EFCOMP gfortran setenv LD_LIBRARY_PATH ${CASROOT}/${CASARCH}/lib:${ESP_ROOT}/lib:${LD_LIBRARY_PATH} - Perform one of the following to setup the shared libraries (1) In $ESPDIR, execute setup.command, or (2) compile the shared libraries yourself by % cd $ESP_ROOT/config % ./makeEnv $CASROOT % cd $ESP_ROOT % source ESPenv.csh (for csh or tcsh) or source ESPenv.sh (for bash) % cd $ESP_ROOT/src % make (5) Using CGT with CAPRI (unsupported/untested under CGT 3.0) Users who intend on compiling CGT with CAPRI (from CADNexus) should also set an environment variable called CAPRI to point to the directory where $CAPRI/include contains the CAPRI include files (capri.h, etc.) and $CAPRI/lib contains the CAPRI library files (*.so and *.a). (6) Using CGT with .trix files from CART3D Users interested in reading .trix files also need to specify a location of the xml2 libraries. The configure script is able to find these libraries in most cases using the xml2-config command. On Mac OS systems, if the xml2 libraries are not installed, you can install them with MacPorts from www.macports.org (7) Grid generation in parallel For users who wish to use the GenHypVolThread scriptlib macro for parallel hyperbolic volume grid generation, the Tcl Threads library needs to be compiled. It is recommended that Tcl version 8.6.* be used. Let TCLDIR be the full path to the directory containing the Tcl installation, e.g., TCLDIR = /u/wk/wchan/gl/tcl8.6.8. Then follow the steps below. - cd $TCLDIR/pkgs/thread*.*.* (where *.*.* is the thread library version) - configure - make This should result in a file called libthread*.*.*.so. In the user's .cshrc file, set the following environment variable: setenv THREADLIB $TCLDIR/pkgs/thread*.*.*/libthread*.*.*.so (8) Configuring Compilers for Fortran, C, and C++ are needed to compile CGT. In the chimera* directory, type ./configure at the command line to establish the proper compiler flags. This will create Makefiles that will be used by "make". If it is necessary to change the default compilers, specify the environement variables: setenv FORT ifort setenv CC icc setenv CXX icpc Compilers for Fortran, C, and C++ can also be specified on the command line: configure --with-fort=Fortran_compiler --with-cc=C_compiler --with-cxx=C++_compiler When using the Intel ifx compilers, icpx does not currently work with the usurp tool, but g++ works. Use the following configure command: configure --with-fort=ifx --with-cc=icx --with-cxx=g++ If different compiler flags are needed, many of these can be specified on the command line: configure --with-fflags=Fortran_flags_for_.f_files --with-f90flags=Fortran_flags_for_.f90_files --with-cflags=C_flags --with-ompflags=OpenMP_flags Various options can be enabled by typing configure --enable-omp (to activate OpenMP threads) [Recommended option] configure --enable-debug (to switch on debug flags) configure --enable-byteswap (to switch on byteswapio flag for pgf90 and gfortran compilers only. Default is no byteswapping, i.e., native endian, or little endian for most machines today. See item 12 for details) Type ./configure --help for a full list of the available options. Further modifications can be made by editing the configure.ac script and re-running "autoconf -f". Examples of using configure: To compile programs and install executables in DIR: % ./configure --with-installdir=DIR Executables will be placed in DIR/bin_sp (single precis.), DIR/bin_dp (double precis.) Default for DIR is the chimera* directory. To compile programs, and install all executables and documentation in DIR: % ./configure --with-installalldir=DIR This is the same as the installdir option but with documentation placed in DIR/doc To compile programs with debug: % ./configure --enable-debug To compile programs with byteswapio on Linux Portland Group and gfortran compilers: % ./configure --enable-byteswap Special notes on specific machines: Linux: Three processor types are automatically detected by configure: x86_64, ia_64, and i*86. When x86_64, or ia_64 is detected the default object type is set to 64 bit; otherwise the default object type is set to 32 bit. A Fortran 90 compiler is automatically selected by configure if it is detected from the following list: gfortran, ifx, ifort, pgf90, pgf95, g95. The user can override the default by specifying --with-fort=compiler on the configure command line. If the compiler belongs to the above list, appropriate compiler flags are automatically selected. Similarly, a C compiler is automatically selected by configure if it is detected from the following list: gcc, icx, icc, pgcc. User override can be done by specifying --with-cc=compiler on the configure command line. Again appropriate compiler flags are automatically selected. For the C++ compiler, the automatic selection list is: g++, icpx, icpc. Again, override can be done by specifying --with-cxx=compiler on the configure command line. If gfortran/gcc/g++ are used, please make sure it is version 8.0 or newer. Mac OS : For Mac's with Intel processors, both gfortran/gcc/g++ and ifort/icc have been successfully tested under Mac 10.12 and earlier. For Mac's with the M{1/2/3/4/5} processors, only gfortran/gcc/g++ (version 9, 10, 11, 12, 13, 14, 15) should be used. GNU compilers can be installed using MacPorts from http://www.macports.org These compilers will have names like gfortran-mp-x.x, gcc-mp-x.x, g++-mp-x.x, where x.x is the version number (versions 12.x, 13.x, 14.x, 15.x have been tested). Once the compilers are installed, use the following steps to prepare for compilation: cd to a directory in the user's path, e.g., $HOME/bin where $HOME is the user's home directory ln -s /opt/local/bin/gfortran-mp-x.x gfortran ln -s /opt/local/bin/gcc-mp-x.x gcc ln -s /opt/local/bin/g++-mp-x.x g++ Then set the following environment variables. setenv FORT gfortran setenv CC gcc setenv CXX g++ NAS Front Ends (pfe/athfe): Do not load the pkgsrc modules when building Tcl/Tk or the GUI. The modules contain conflicting/outdated versions of zlib. Otherwise, follow standard Linux instructions. (9) Making the executables The following targets can be made by the "make" command. sp: single precision executables dp: double precision executables oggui: overgrid gui smarto: oversmart objects Common "make" commands include: "make" make all four sets of executables and objects (the env variables associated with oggui and smarto must be set correctly for this to work all the way through) "make -j #" same as "make" but use # threads for a faster make on machines with multiple processors "make sp" make single precision executables only "make dp" make double precision executables only "make oggui" make overgrid gui executable only "make smarto" make oversmart objects only The above "make" commands will leave the executables in src_sp, src_dp, gui and smart, respectively. For installation of executables into specific directories, type "make CMD=install" to install single precis. executables into installdir/bin_sp, and to install double precis. executables into installdir/bin_dp, and og and oversmart into installdir/bin_sp and bin_dp "make CMD=installall" to do similar installation into installalldir For clean up, type "make CMD=clean" to remove temporary files "make CMD=clobber" to remove temporary files, executables, .a, .mod, etc. Compilation of specific modules in CGT can be done by typing: "make PGM=prog" to create single and double precision executables for module "prog" only "make sp PGM=prog" to create single precision executable for module "prog" "make dp PGM=prog" to create double precision executable for module "prog" (10) Path Make sure that the location of the compiled executables (installdir/bin_sp or installdir/bin_dp, depending on default precision required) is within your $path variable, for easy access. (11) Scripting The use of the macro scripts in Chimera Grid Tools requires the setting of two environment variables: SCRIPTLIB = full path to the chimera*/scriptlib directory CGTBINDIR = full path to installdir/bin_sp or installdir/bin_dp For example, in .cshrc, add setenv SCRIPTLIB $HOME/chimera*/scriptlib setenv CGTBINDIR $HOME/chimera*/bin_dp (12) Endian The user needs to be aware of runtime endian for unformatted I/O. Most modern machines are little endian, but a few big endian chips still exist in the market. Control of the endian attributes can be achieved using the following environment variables. For Intel compilers: setenv F_UFMTENDIAN big (big endian I/O) setenv F_UFMTENDIAN little (little endian I/O) Similarly, for gnu compilers: setenv GFORTRAN_CONVERT_UNIT big_endian (big endian I/O) setenv GFORTRAN_CONVERT_UNIT little_endian (little endian I/O) Endian attribute in I/O using Portland group compilers cannot be controlled at runtime, but can be changed at compile time using the --enable-byteswap configure option. An effort to make all codes endian agnostic is underway using the FFIO library. A list of the codes that are using FFIO and are thus not effected by the above options in a significant way is available in the README file. (13) Precision Both single and double precision executables are produced by default and placed in the bin_sp and bin_dp directories respectively. For the codes that are using the FFIO library, either set of executables can be used with any type of data file. However, the user must be aware that all data is converted and computations are carried out in the native precision of the executable.