Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update STAR-CCM+ easyblock for new installer #3517

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions easybuild/easyblocks/s/star_ccm.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import easybuild.tools.environment as env
from easybuild.framework.easyblock import EasyBlock
from easybuild.tools import LooseVersion
from easybuild.tools.config import build_option
from easybuild.tools.filetools import change_dir, find_glob_pattern
from easybuild.tools.run import run_cmd
Expand All @@ -57,7 +58,15 @@ def build_step(self):
def install_step(self):
"""Custom install procedure for STAR-CCM+."""

install_script_pattern = "./STAR-CCM+%s_*.sh" % self.version
loose_ver = LooseVersion(self.version)

# New installer and new versioning for the installer.
# It uses 24xx instead of 19.xx.xxx. Ignore version in pattern search.
if loose_ver >= LooseVersion('19.06.008'):
install_script_pattern = "./STAR-CCM+*.aol"
else:
install_script_pattern = "./STAR-CCM+%s_*.sh" % self.version

if self.dry_run:
install_script = install_script_pattern
else:
Expand All @@ -69,13 +78,21 @@ def install_step(self):

env.setvar('IATEMPDIR', tempfile.mkdtemp())

if loose_ver >= LooseVersion('19.06.008'):
other_install_opts = ' '.join([
"-DINSTALL_LICENSING=false",
"-DPRODUCTEXCELLENCEPROGRAM=decline",
])
else:
other_install_opts = "-DINSTALLFLEX=false"

cmd = ' '.join([
self.cfg['preinstallopts'],
install_script,
"-i silent",
"-DINSTALLDIR=%s" % self.installdir,
"-DINSTALLFLEX=false",
"-DADDSYSTEMPATH=false",
other_install_opts,
self.cfg['installopts'],
])

Expand Down