Hello all,
I have installed TELEMAC (for various reasons) on a network drive accessed using UNC paths, which I believe isn't uncommon or forbidden. Being a Windows user, I have being plagued with the native shell's (CMD.exe) limitation to handle UNC paths. So far I had been working around it using registry hacks, but the issue keeps coming back at every major Windows update. So I decided to seek a proper solution.
The obvious one was to use Powershell instead of CMD, which I am already implementing (e.g. job submission and recollection in the HPC Queue). However, I have stumbled across the hidden 'shell=True' parameter in the various calls using python's subprocess module. This argument forces using the CMD shell that presents the UNC limitation leading to a dead end.
Changing subprocess argument 'shell=True' to False, worked for compiling the whole system (including the api) but fails in the partitioning step when calling partel (and possibly more failures are waiting downstream, at least gretel).
I have pinpointed the issue in the issue in messages.py, line 258:
code.value = sp.call(exe, shell=True)
Changing shell=False freezes partel execution with the following being the printout:
+-------------------------------------------------+
PARTEL/PARRES: TELEMAC METISOLOGIC PARTITIONER
REBEKKA KOPMANN & JACEK A. JANKOWSKI (BAW)
JEAN-MICHEL HERVOUET (LNHE)
CHRISTOPHE DENIS (SINETICS)
YOANN AUDOUIN (LNHE)
PARTEL (C) COPYRIGHT 2000-2002
BUNDESANSTALT FUER WASSERBAU, KARLSRUHE
METIS 5.0.2 (C) COPYRIGHT 2012
REGENTS OF THE UNIVERSITY OF MINNESOTA
BIEF TRUNK (C) COPYRIGHT 2012 EDF
+-------------------------------------------------+
MAXIMUM NUMBER OF PARTITIONS: 100000
+--------------------------------------------------+
--INPUT FILE NAME <INPUT_NAME>:
I will keep digging, but I have two questions while at it:
- Does Linux installations behave better when changing 'shell=False'?
- Is there a coding/functionality limitation (that obviously haven't figured out myself), that excludes 'shell' from being set to False?
Any help would be greatly appreciated.
Best Regards,
Costas