Hi,

I try to install the whole Ansys package - not only fluent.
My approach is based on the Fluent eb and block, see attached. It seems to work fine, except for the module.

Like in the fluent block, I define the path that should be set. The method in which that happens is executed, however, the path is not set in the module file (see attached).

Any ideas what I do wrong?

Thanks!
Bart


--
Dr. Bart Verleye
Centre for e-Research
Level G, Room 409-G21
24 SYMONDS ST
Auckland 1010
New Zealand
+64 (0) 9 923 9740 ext 89740
#%Module

proc ModulesHelp { } {
    puts stderr {   ANSYS simulation software enables organizations to 
confidently predict 
    how their products will operate in the real world. We believe that every 
product is 
    a promise of something greater.  - Homepage: http://www.ansys.com
    }
}

module-whatis {Description: ANSYS simulation software enables organizations to 
confidently predict 
    how their products will operate in the real world. We believe that every 
product is 
    a promise of something greater.  - Homepage: http://www.ansys.com}

set root    /share/easybuild/RHEL6.3/sandybridge/software/ANSYS/15.0

conflict    ANSYS


setenv  EBROOTANSYS             "$root"
setenv  EBVERSIONANSYS          "15.0"
setenv  EBDEVELANSYS            "$root/easybuild/ANSYS-15.0-easybuild-devel"


# Built with EasyBuild version 1.12.0
##
# Copyright 2009-2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://www.herculesstichting.be/in_English)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
# http://github.com/hpcugent/easybuild
#
# EasyBuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation v2.
#
# EasyBuild is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.
##
"""
EasyBuild support for installing ANSYS, implemented as an easyblock

@author: Kenneth Hoste (Ghent University)
@author: Bart Verleye (Auckland)
"""


import shutil
import os
import stat

from easybuild.framework.easyblock import EasyBlock
from easybuild.framework.easyconfig import CUSTOM
from easybuild.tools.filetools import run_cmd, rmtree2
from easybuild.tools.filetools import adjust_permissions


class EB_ANSYS(EasyBlock):
    """Support for installing ANSYS."""


    def configure_step(self):
        """No configuration for ANSYS."""
        pass

    def build_step(self):
        """No building for ANSYS."""
        pass

    def install_step(self):
        """Custom install procedure for ANSYS."""

        cmd = "./INSTALL -noroot -silent -install_dir %s %s" % (self.installdir,self.cfg['installopts'])
        run_cmd(cmd, log_all=True, simple=True)

        adjust_permissions(self.installdir, stat.S_IWOTH, add=False)

    def sanity_check_step(self):
        """Custom sanity check for ANSYS."""

        ver = 'v%s' % ''.join(self.version.split('.'))

        custom_paths = {
                        'files': ["%s/fluent/bin/fluent%s" % (ver, x) for x in ['', '_arch', '_sysinfo']],
                        'dirs': ["%s/%s" % (ver,x) for x in ["ansys", "aisol", "CFD-Post","CFX"]]
                       }

        super(EB_ANSYS, self).sanity_check_step(custom_paths=custom_paths)

    def make_module_req_guess(self):
        """Custom extra module file entries for ANSYS."""

        guesses = super(EB_ANSYS, self).make_module_req_guess()

        ver = "v%s" % ''.join(self.version.split('.'))

        guesses.update({
                        "PATH": [os.path.join(ver, "tgrid", "bin") + ":" +
                        os.path.join(ver, "Framework", "bin/linux64") + ":" +
                        os.path.join(ver, "aisol", "bin/linux64")+ ":" +
                        os.path.join(ver, "RSM", "bin")+ ":" +
                        os.path.join(ver, "ansys", "bin")+ ":" +
                        os.path.join(ver, "autodin", "bin")+ ":" +
                        os.path.join(ver, "CFX", "bin")+ ":" +
                        os.path.join(ver, "fluent", "bin")+ ":" +
                        os.path.join(ver, "CFD-Post", "bin")+ ":" +
                        os.path.join(ver, "TurboGrid", "bin")+ ":" +
                        os.path.join(ver, "polyflow", "bin")+ ":" +
                        os.path.join(ver, "IcePack", "bin")],
                       })
        return guesses
name = 'ANSYS'
version = '15.0'

homepage = 'http://www.ansys.com'
description = """ANSYS simulation software enables organizations to confidently 
predict 
    how their products will operate in the real world. We believe that every 
product is 
    a promise of something greater. """

toolchain = {'name': 'dummy', 'version': 'dummy'}

sources = ['ANSYS-15.0.zip']
source_urls = ['/share/src/Ansys150']

installopts=['-licserverinfo 2325:1055:ansys.licenses.foe.auckland.ac.nz'] 

moduleclass = 'tools'

Reply via email to