Zobrazují se příspěvky se štítkemopenSUSE. Zobrazit všechny příspěvky
Zobrazují se příspěvky se štítkemopenSUSE. Zobrazit všechny příspěvky

pátek 29. listopadu 2013

Ansys 5.7 license manager (windows based) on Linux

Our professional version of Ansys 5.7 has been bound to a license manager running on a windows NT server. Once mighty server rests in peace already, but our professional Ansys is worth to use. At least time to time.

Our license is based on serial number of hard disc, from which is the flexlm started. OK, wine emulator allows to specify the label and serial of its (virtual) disks.

Wine installation on CentOS 6.4 x86_64

Remark: use just zypper in wine on (open)SUSE. However, Ansys on CentOS is said to be "oficially supported". It does not apply to this case, I guess.
Wine is not part of the official repository tree. As a first step configure EPEL repository (thanks to this link ).
yum install wget
wget https://fedoraproject.org/static/0608B895.txt --no-check-certificate
mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
rpm -ivh http://mirror.slu.cz/epel/6/i386/epel-release-6-8.noarch.rpm

check success:
[root@localhost ~]# yum repolist
repo id     repo name                                         status
base        CentOS-6 - Base                                   6,381
epel        Extra Packages for Enterprise Linux 6 - x86_64    10,031
extras      CentOS-6 - Extras                                 13
updates     CentOS-6 - Updates                                1,555

install Wine:
[root@localhost ~]# yum install wine
Yum finds and installs a huge number of 32bit dependencies. 

License manager configuration

Run winecfg and specify Windows NT compatibility. In the Drives panel press Advanced options and specify the serial number of the disk C: (or use ~/.wine/drive_c/.windows-serial file containing the serial number)

copy flexlm directory to C: (.wine/drive_c)

┌┌<─ ~/.wine/drive_c/flexlm ───────────────────────────.[^]>┐
││'n               Name                │ Size  │Modify time │
││/..                                  │UP--DIR│Nov 29 01:19│
││/Intel                               │   4096│Apr 26  2004│
││ ansyslmd                            │      0│Nov 29 01:45│
││ ansyslmd.ini                        │     33│Apr 26  2004│
││ license.dat                         │    224│Nov 29 01:38│
││ license.log                         │   1351│Nov 29 01:45│
││ lmgrd.8                             │    144│Nov 29 01:45│
││ startup.log                         │    227│Nov 29 01:45│
││                                     │       │            │



startup.sh :
#!/bin/bash
cd ~/.wine/drive_c/flexlm
date >>startup.log
LOGF=license.log
mv -f $LOGF license.log-`date +"%F+%T"`
nohup wine Intel/lmgrd.exe -z >> $LOGF 2>>startup.log  &

Check the status (it takes some time to start up the server)
[root@plchova3 flexlm]# wine Intel/lmutil.exe lmdiag -c license.dat
lmutil - Copyright (C) 1989-2001 Globetrotter Software, Inc.
FLEXlm diagnostics on Fri 11/29/2013 11:06

-----------------------------------------------------
License file: license.dat
-----------------------------------------------------
"ansys" v2001.0630, vendor: ansyslmd
  License server: hostname
  floating license no expiration date


This license can be checked out
-----------------------------------------------------
or:
[root@plchova3 flexlm]# wine Intel/lmutil.exe lmstat -a -c license.dat

For shutdown:

[root@plchova3 flexlm]# wine Intel/lmutil.exe lmdown -c license.dat
lmutil - Copyright (C) 1989-2001 Globetrotter Software, Inc.
[Detecting lmgrd processes...]

   Port@Host            Vendors
1) 1057@hostname        ansyslmd 

Are you sure (y/n)?  y
    1 FLEXlm License Server shut down

Troubleshooting

  • check the drive serial number
    [root@localhost flexlm]# wine cmd
    
    CMD Version 1.4.1
    
    C:\flexlm>dir
    Volume in drive C has no label.
    Volume Serial Number is 70fa-1234
    
    Directory of C:\flexlm
    
    11/29/2013   1:45 AM  <dir>         .
    11/29/2013   1:19 AM  <dir>         ..
    11/29/2013   1:45 AM             0  ansyslmd
     4/26/2004   8:34 PM            33  ansyslmd.ini
     4/26/2004   8:23 PM  <dir>         Intel
    11/29/2013   1:38 AM           224  license.dat
    11/29/2013   2:05 AM         1,452  license.plchova.log
    11/29/2013   2:15 AM           144  lmgrd.8
    11/29/2013   1:45 AM           227  startup.log
           6 files                    2,080 bytes
           3 directories      7,727,013,888 bytes free
    

  • check the if hostname in the license.dat match the hostname, specify the same hostname in /etc/hosts
  • check the firewall settings. The two ports specified in the license file have to be opened fog incoming traffic
    SERVER hostname DISK_SERIAL_NUM=70fa1234 1057
    VENDOR ansyslmd PORT=1058
    
    INCREMENT ansys ansyslmd 2001.0630 permanent 1 3A8F12345678 \
     VENDOR_STRING=customer:00000001 SUPERSEDE ISSUED=24-May-2001 \
     START=03-Apr-2001
    
    
    The two ports are 1057 and 1058 in our case:
    iptables -A INPUT -m state -s $LAN --state NEW -m tcp -p tcp --dport 1057 -j ACCEPT
    iptables -A INPUT -m state -s $LAN --state NEW -m tcp -p tcp --dport 1058 -j ACCEPT
    
    or specify the corresponding rules in /etc/sysconfig/iptables (in CentOS).

neděle 24. listopadu 2013

Ansys 12.x-14.0 license manager on openSUSE

update Ansys license manager installation program regularly fails to produce a running configuration on openSUSE servers. Key to success full installation was to run separately flexlm and interconnect. These scripts should work in 14.5 too, as there the installation script fails as well. The modified startup script are shown here:

The ansys license manager is run under user "licence", its installed in the directory /home/licence/ansys_inc/.

In
/home/licence/ansys_inc/shared_files/licensing/init_ansysli :
change

ANSYSLIC_DIR="/home/licence/ansys_inc/shared_files/licensing"

The init_ansli script is going to be linked to /etc/init.d
The start script will keep the old log files in the time stamped copies.

/home/licence/ansys_inc/shared_files/licensing/start_ansysli :


#!/bin/sh
#
LMGRD="${ANSYSLIC_DIR}/lin32/lmgrd"

# Self-locate
selfdir="`dirname $0`"

# Does licsh.ini exist?
if test -r "${selfdir}/lic_admin/licsh.ini"; then
  . ${selfdir}/lic_admin/licsh.ini
  if test -x "${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server"; then
    su licence -c "date >> ${ANSYSLIC_DIR}/ansyslic.start.log"
    su licence -c "${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server < /dev/null"
    mv -f ${ANSYSLIC_DIR}/license.log ${ANSYSLIC_DIR}/license.log-`date +"%F+%T"`
    su licence -c "${LMGRD} -c ${ANSYSLIC_DIR}/license.dat -l ${ANSYSLIC_DIR}/license.log >>${ANSYSLIC_DIR}/ansyslic.start.log  2>&1"
  else
    echo "ERROR: '${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server' cannot be executed."
    echo "Cannot start the ANSYS, Inc. License Manager."
    exit 1
  fi
else
  echo "ERROR: '${selfdir}/lic_admin/licsh.ini' is not readable."
  echo "Cannot start the ANSYS, Inc. License Manager."
  exit 1
fi

exit 0


The shutdown script is almost untouched. Just stop explicitly the flexlm.

/home/licence/ansys_inc/shared_files/licensing/stop_ansysli :

#!/bin/sh
#
LMGRD="${ANSYSLIC_DIR}/lin32/lmutil"

# Self-locate
selfdir="`dirname $0`"

# Does licsh.ini exist?
if test -r "${selfdir}/lic_admin/licsh.ini"; then
  . ${selfdir}/lic_admin/licsh.ini
  if test -x "${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server"; then
    exec ${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server -k stop
    exec ${LMGRD} lmdown -c ${ANSYSLIC_DIR}/license.dat -force >>${ANSYSLIC_DIR}/ansyslic.start.log  2>&1
  else
    echo "ERROR: '${ANSYSLIC_DIR}/${ANSYSLIC_SYSDIR}/ansysli_server' cannot be executed."
    echo "Cannot stop the ANSYS, Inc. License Manager."
    exit 1
  fi
else
  echo "ERROR: '${selfdir}/lic_admin/licsh.ini' is not readable."
  echo "Cannot stop the ANSYS, Inc. License Manager."
  exit 1
fi
exit 0



Update

It is said that the "officially supported platforms for ANSYS are SLES and RHEL", silently CentOS too. On a recent CentOS installation the installation script "INSTALL.LM" works correctly and out-of-box script init_ansli starts and stops  the license manager as expected.

čtvrtek 21. listopadu 2013

Ansys 12.1, 14.0, 14.5 on openSUSE


Let's have a fresh installed openSUSE 12.3 machine (as minimal text-mode server).

The only prerequisite for the license manager is the package lsb:

zypper in lsb

Having lsb installed, I can install the license manager from the newest version available (14.5). However, the installation is not straightforward on openSUSE, the launching script is not able to launch the flexlm part of the manager. It has to be launched in advance. Then everything works.

For Ansys 12.1 itself (and VNC etc), install the following:
 
zypper in command-not-found
zypper in x11 -t pattern
zypper install tightvnc
zypper in libGLU1
zypper in openmotif openmotif-libs
ln -s /usr/lib64/libXm.so.4 /usr/lib64/libXm.so.3
(the last command is daring and cheeky, of course. But it seems to work.)

Now install the oldest Ansys. It correctly finds the license manager available and does not try to install its own (old) version.

Ansys 14.0 installs OK. Neither this version installs the license manager.

Ansys 14.5 installer tries to mess up the running license manager, but everything ends up well. No problems to launch /ansys_inc/v145/ansys/bin/launcher145.