Micro Magic Tools Installation and Setup ======================================== Copyright (c) Micro Magic, Inc. All Rights Reserved. BY COPYING, INSTALLING, OR USING ANY MICRO MAGIC SOFTWARE OR DOCUMENTATION, YOU ACKNOWLEDGE THAT YOU HAVE READ THE MMI LICENSE AGREEMENT, UNDERSTAND IT AND AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT USE the Software, REMOVE IT FROM YOUR SYSTEM IMMEDIATELY, AND PROMPTLY RETURN the Software AND THE ACCOMPANYING ITEMS (including all documentation and other materials) TO MICRO MAGIC. Installation Instructions ========================= Terminology ----------- = top-level directory of the MMI release. This dir has a name something like mmi_070221 = directory where you are putting release_dir (e.g. /usr/cad) There are various sets of instructions below: First Time Installation Installing Non-Linux Distributions Node-Locked License Installation Floating License Installation New User Setup Upgrading from a Previous Release Follow the ones that apply to your situation! First Time Installation ----------------------- (Follow these instructions if you do not already have an existing MMI release installed.) 1. Download the current release from www.micromagicdownloads.com. The base release includes the linux executables. If you are running a different operating system you will have to also download the other executables which come in a separate tarball. 2. Choose an install dir. Pick a place that is logical for your site. You will need at least 100 MB of free disk space. You do not need root priveledges for the installation unless you decide to place the installation in a protected area. There is no "standard" location. Then cd there, i.e.: cd A common place is something like /home/cad/mmi or /usr/cad/mmi. 3. Put the release in the install dir. NOTE: the date on the release will be different. cp /mmi_070221.tgz . tar -xzvf mmi_070221.tgz NOTE: on solaris systems and some linux systems, you need to gunzip/untar the release in 2 stages or use gtar: gunzip mmi_070221.tgz tar -xvf mmi_070221.tar Note that moving the release around with "cp -r" is not a good idea, since cp can affect symbolic links and permissions. It is better to just untar it into the desired location. If you absolutely need to copy it, use "cp -a" or "gcp -a". 4. Make a symbolic link from /mmi to the : ln -s mmi This allows you to refer to the release, simply as mmi. When you wish to upgrade to a new release, all you need to do is untar the new release into your install_dir and then change the "mmi" link to point to the new release. 5. Create your mmi_local directory. All site specific data is kept in /mmi_local. That way you can upgrade to new releases without losing or having to move around local data. Create your initial mmi_local as follows: cp -a mmi/mmi_local.sample mmi_local 6. If you are installing for an operating system other than linux, follow the Installing Non-Linux Distributions instructions below. 7. Follow the new user setup instructions below. Installing Non-Linux Distributions ---------------------------------- To install a non-linux distribution, for example for sparc-solaris or i386-solaris, first install the complete linux distribution. Then cd cp /mmi_070221-sparc-solaric.tar.gz . gunzip mmi_070221-sparc-solaric.tar.gz The non-linux release only includes the executables for your selected operating system and is overlayed onto the existing linux release: cd mmi tar -xvf ../mmi_070221-sparc-solaric.tar You can install multiple different non-linux releases if you so desire. Node-Locked License Installation -------------------------------- To obtain a license file, run the mmihostinfo program, and email the result to support@micromagic.com. You will receive a license file named "mmi_license.lic" that can be installed in any of these locations: $HOME/mmi_private/mmi_license.lic $MMI_LOCAL/mmi_license.lic $MMI_TOOLS/../mmi_local/mmi_license.lic Or you can put this file anywhere and set the environment variable MMI_LICENSE_FILE to the full pathname of the license file before starting any MMI tools. Floating License Installation ----------------------------- For your license server computer, choose a reliable computer that is not going to change. Run mmihostinfo on this server computer, and email the result to support@micromagic.com. You will receive a license file named "mmi_license.lic". This license must be specified to the mmiserver program, which will run only on the server computer. You can specify the license location using the mmiserver -f option, or install the license in any of the directories as documented for 'node-locked licenses', above. Generally, however, you will want to install mmiserver so that it is automatically started when the server computer is rebooted. One way to do this is to put it in the file /etc/rc.d/rc.local with a line like this: mmiserver -f /full_path/mmi_license.lic -l /var/log/mmi_server_log & Note that you must specify a log file with the -l option or the messages will all come out to the console! If you start mmiserver on a command line, add 'nohup' so that it will not automatically be killed when the controlling terminal exits. Like this: nohup mmiserver -f /full_path/mmi_license.lic -l /var/log/mmi_server_log & To use a floating license, each MMI application (sue, max, etc.) must be able to find the floating license server. There are many ways they can do this. Method 1: If the license server computer and the user's computer are on the same ethernet segment, with no intervening routers, they may find each other automatically. (Uses an internet "data-gram" message.) Method 2: The user can set the MMI_LICENSE_SERVER environment variable to the name of the license server computer. Method 3: If the license file is on an exported NFS file system of the license server computer, the user can set their MMI_LICENSE_FILE environment variable to point to the mmi_license.lic file on the server computer. Method 4: The user can install a copy of the original mmi_license.lic file in any of the locations documented above. Method 5: For client computers, only the "server" line is required in the license file, so you can install a file named "mmi_license.lic" in any of the locations documented above, containing just this line: server Where is the name of the license server computer. The mmiserver program ignores any "server" line. In the unusual case that your license computer has a different IP address than its own "hostname", you can also add a "server" line to the mmi_license.lic file on the license computer, before any "floating" lines, to specify how user programs can access the license server computer. If your MMI application (eg. sue or max) cannot find the license server, first try using ping. If ping cannot reach the computer, then max and sue cannot reach it either. For example, set the MMI_LICENSER_SERVER environment variable to your server name, and then type this: ping $MMI_LICENSE_SERVER Nodelocked licenses and floating licenses can be mixed and matched. If you have both floating and nodelocked licenses, you can add the "server" line above to the nodelocked license file on any computer; then on that computer, the nodelocked license, if any, will be used first, followed by any floating license. Floating License Notes ---------------------- Note that the mmiserver program must remain accessible whenever you are running MMI applications. If the license server computer crashes, or needs routine maintenance, MMI applications generally permit an hour grace period, during which they will continue to run normally, before revoking the license. When a license is revoked, the application becomes annoying to use (lots of popup messages warning about the license), however, it will not abort. If you restart the mmiserver, the applications will reacquire their licenses and stop becoming annoying to use. The mmiserver log file contains a detailed record of all licenses granted. Each new instance of an MMI program (like sue or max) is assigned a unique "thread" number, and all messages in the log file about that MMI program include the thread number. The mmilicshow program displays the current floating license information, obtained by communicating with the running mmiserver program. This information includes who is currently using which licenses. The floating license server uses IP port 6504, which cannot be changed. This IP port is an internet "unassigned port". For security purposes, the floating license server rejects any messages longer than a specific length; encrypts its communications; and immediately drops the TCP connection if any unexpected response occurs. The mmiserver program does not need to run with "root" privileges. mmiserver syntax: mmiserver [ -u ] [ -l log_file ] [ -f license_file ] If no log_file is specified, messages are printed to stdout. If no license_file is specified, the file mmi_license.lic is searched for as follows: if MMI_LICENSE_FILE environment variable is set, try that; search current directory, then $HOME/mmi_private, then $MMI_LOCAL/mmi_private, then $MMI_TOOLS/mmi_private. If -u specified, do not start the UDP responder service used by MMI applications to find the license server. If this option is specified the mmiserver program will not broadcast UDP DGRAM messages (which it only does anyway when its port is pinged is by an MMI application); it will only respond to direct TCP/IP connection requests on its single port. You don't need to use this option, but it is supplied in the remote possibility that someone needs to restrict all network traffic for some arcane purpose. New User Setup -------------- 1. Modify the users .cshrc, .bashrc, or appropriate file to include the following (for csh/tcsh): # Setup for Micro Magic CAD tools setenv MMI_TOOLS /mmi set path=(${MMI_TOOLS}/bin.i486-linux $path) For bash users, add the following instead to your .bashrc: # Setup for Micro Magic CAD tools MMI_TOOLS=/mmi export MMI_TOOLS PATH=${MMI_TOOLS}/bin.i486-linux:$PATH export PATH NOTE: for non-linux users, replace i486-linux above with the appropriate (e.g. sparc-solaris or i386-solaris). This needs to be done for each user. A better method is to create a common file, , and add the above lines, to it. You can also add the setup for other cad tools used at your site. Each users .cshrc, or .bashrc will then need to include only the following: # setup cad tools source If you use a common file, when you add setup for new tools or make site wide modifications to the setup, you only need to change this one file. Also you will know that the setup is consistent and up-to-date for all your users. NOTE: we do not advise running the MMI tools through a queueing system (e.g. LFS) or on remote hosts. The MMI tools are primarily interactive and should preferably run on the user's local machine unless there are operating system or resource issues. If running remotely, screen redisplay performance in MAX may be impacted. 2. On some systems, all of the required libraries for openGL are not installed. If you get an error message when running max, try using the following switches: max -nogl this insures that max runs using openGL emulation. You can also try setting your LD_LIBRARY_PATH to use the supplied libraries: (for csh/tcsh) setenv LD_LIBRARY_PATH ${MMI_TOOLS}/lib/i486-linux or, for bash users, LD_LIBRARY_PATH=${MMI_TOOLS}/lib/i486-linux export LD_LIBRARY_PATH ${MMI_TOOLS}/lib/i486-linux 3. Firefox or the web browser of your choice is used to display documentation. If you do not have firefox installed at your site, or prefer another browser, you should set the BROWSER or MMI_BROWSER environment variable to it. For example: setenv MMI_BROWSER firefox or, for bash users: export MMI_BROWSER=firefox This can be done on a per user basis in the .login file, or on a site wide basis in the file (if you are using one). 4. Have the user logout and log back in, to make the setup take effect. That's it! After completing the above steps, a good way to get started is to go through the tutorials. Setup the tutorials with the command: mmi_tutorial and choose the tutorial you want to run. You should also look at the MMI online documentation, which you can get to with the following command: mmidoc [] where defaults to firefox. Otherwise you can change the default browser by setting the environment variable MMI_BROWSER or BROWSER. Upgrading from a Previous Release --------------------------------- 1. Download the new release from www.micromagicdownloads.com. 2. Go to your site's install dir: cd ( = $MMI_TOOLS/..) 3. Move the new release to the install dir, as follows. cp /mmi_070221.tgz . tar -xzvf mmi_070221.tgz 4. Change the mmi pointer to the new release. mv mmi mmi.old; ln -s mmi By moving mmi to mmi.old and then linking, any users currently using the tools will be unaffected. Simply removing the mmi link and then making a new one pointing to the new release can cause running programs to core dump. Note, it is also a good idea to type "rehash" after changing the link. 5. If you are running a non-linux distribution, you must now follow the Installing Non-Linux Distributions instructions again. Additional Potential Problems ----------------------------- 1. MAX or MAX-View reports Out of Memory and exits MAX/MAX-View will only load GDS files up to approximately 4GB. For larger GDS files, use max64/maxview64 (Linux only). You must be running a 64-bit operating system and have greater than 4GB of physical memory. Note that max64/maxview64 uses approximately 1.5X the physical memory of max/maxview. 2. MAX or MAX-View is slow MAX/MAX-View will slow down substantially if it must page memory out to disk (i.e. if there is not enough free physical memory to meet its requirements). To remedy, remove other processes that are using memory or use a machine with more physical memory. 3. OpenGL Emulation vs. Direct Rendering Depending on your Linux installation and setup, you may be emulating the OpenGL graphics routines instead of directly executing them on your graphics card/chip. This emulation will slow down max's redisplay speed by a factor or 10X-100X. In order to check that you are correctly using your graphics capabilities, at the unix prompt type: glxinfo | grep direct You should see the following response: direct rendering: Yes Otherwise, you will need to check the configuration and potentially load/install openGL drivers. If you do have direct rendering but on startup max still reports that it is not enabled, you may be missing certain openGL libraries. In this case, refer to #2 in "New User Setup" above. If you have a newer Linux, there is a good chance that there are prebuilt video drivers in rpm format. If so, you can easily install them with yum. To do so, you must first be root. Then add the following lines to the end of your /etc/yum.conf [livna] name=Livna.org Fedora Compatible Packages baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.lvn Then to install the nvidia drivers, type: yum install nvidia-glx kernel-module-nvidia-`(uname -r)` or the ati drivers, type: yum install ati-fglrx kernel-module-fglrx-`(uname -r)` Otherwise, if you have NVIDIA graphics, download the appropriate driver from http://www.nvidia.com/object/unix.html and follow the directions to install it. Finally, when trying to run Max if you get an error message of the form Can't create Layout widget: this X Server does not support the OpengGL GLX extension then you will need to modify your Xorg.conf (or XFree86 if you have an older system) to include the line: Load "glx" in the Section "Module" and restart X (or reboot). 4. X Window AutoRaise Option The X window managers have an "AutoRaise" option that automatically raises the window that the mouse is over. This option will not work with MMI programs, or, for that matter, many others. To check for this, look for a file called ".Xdefaults" in the user's home directory, and search for "AutoRaise". If found, set the value to false. For example, for a user using the open look window manager, the line should look like this: olwm.AutoRaise: false If you can not find a line containing "AutoRaise", its ok, because the default is false. 5. Shelltool Page Mode Both the shelltool and the cmdtool have a "Page Mode" that automatically stops the window from scrolling when it is full (it is not 100% reliable). You should NOT set this option in a shelltool or cmdtool that is used to start max or sue. This can result in max or sue appearing to "hang" when the window gets full of messages from max/sue. What has happened is that max/sue is halted by the window manager, which is waiting for you to type the Return key in that window. The "Page Mode" is typically controlled by an option menu that is accessed by pressing the right mouse button over the window that was used to start max/sue. 6. Alt Buttons Hijacked by Window Manager Certain shortcuts in Max use the Alt-key modifier like "select less" which is Alt-But-1 or "paint" which is Alt-But-3. Some window managers like gnome by default Hijack these key/button combinations for their own use. Often you can setup the window manager to allow these combinations to reach Max. For example, in gnome, go to applications in the gnome menu bar and then preferences and windows. Then change the movement key from Alt to Super (or "Windows logo").