554 |
|
hasgfort = bool(0) |
555 |
|
|
556 |
|
# Try icc. |
557 |
< |
cmd = 'icc -V 2>&1' |
557 |
> |
cmd = 'icc --version 2>&1' |
558 |
|
try: |
559 |
|
ret = check_output(cmd, shell=True) |
560 |
|
ret = ret.decode("utf-8") |
563 |
|
rv = bool(1) |
564 |
|
|
565 |
|
if not rv: |
566 |
< |
regexp = re.compile(r".+Version\s+(\d+)[.](\d+)", re.DOTALL) |
566 |
> |
regexp = re.compile(r"\s*\S+\s+\S+\s+(\d+)[.](\d+)", re.DOTALL) |
567 |
|
matchobj = regexp.match(ret) |
568 |
|
if matchobj is None: |
569 |
|
raise Exception('unexpectedIccRet', ret) |
595 |
|
hasgcc = bool(1) |
596 |
|
|
597 |
|
# Try ifort. |
598 |
< |
cmd = 'ifort -V 2>&1' |
598 |
> |
cmd = 'ifort --version 2>&1' |
599 |
|
try: |
600 |
|
ret = check_output(cmd, shell=True) |
601 |
|
ret = ret.decode("utf-8") |
604 |
|
rv = bool(1) |
605 |
|
|
606 |
|
if not rv: |
607 |
< |
regexp = re.compile(r".+Version\s+(\d+)\.(\d+)", re.DOTALL) |
607 |
> |
regexp = re.compile(r"\s*\S+\s+\S+\s+(\d+)\.(\d+)", re.DOTALL) |
608 |
|
matchobj = regexp.match(ret) |
609 |
|
if matchobj is None: |
610 |
|
raise Exception('unexpectedIfortRet', ret) |