Welcome, Guest
Username: Password: Remember me

TOPIC: what is the -uncpath option

what is the -uncpath option 13 years 1 month ago #2587

  • mtayel
  • mtayel's Avatar
hello,
i want to ask about something in the runcod.pl

my $s1="$REPLANCE";
if ( ($UNCPATH eq "oui") && ($TM_UNCPATH ne "") )
{ $s1 =~s/^[A-Za-z]:/$TM_UNCPATH/; }

the variable s1 is used only in version 6.1 and not used in version 6.0
to build the path to the exe file
version 6.0 : print F2 "exe $REP$ps$EXEFILE\n";
but in version 6.1 : print F2 "exe $s1$ps$REP$ps$EXEFILE\n";
so the path is repeated in version 6.1 which cause some problems

i want to ask about the following
is there an option in telemac2d called -uncpath?
is there relation between running telemac in parallel mode and the variable TM_UNCPATH in runcode.pl?
thanks
The administrator has disabled public write access.

Re: what is the -uncpath option 13 years 1 month ago #2719

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello mtayel,

A couple of things ...

1.- A UNC path describes the location of a volume, directory, or file. The format for a UNC path is not case‐sensitive and is in the form \\server\volume\directory\file.

2.- It causes problems on MS Windows operating systems sometimes as Windows drive letter mappings are arbitrary, whereas a UNC path is specific and applies to all operating systems. It should be noted that the UNC method started with the UNIX operating system. UNIX uses the forward‐slash character as a path separator. Many network services (ex. FTP) have their origins in the UNIX operating system, so they use forward‐slashes instead of the backslashes that DOS/Windows uses. It is important to recognize this distinction when using these services.

3.- If you look in the runtel.pl file you will find the line:
$TM_UNCPATH = $ENV{"TM_UNCPATH"};
which in means that if you have not declared TM_UNCPATH as an environmental variable, it will remain empty.
In the same script you will find that if the -uncpath option is used but that TM_UNCPATH is not defined, it will return an error.

4.- I do not think the PATH is repeated but rather that you can provide the script with a share drive location on your network (double-slashed...) defined by in a UNC convention which will be added to your standard directory structure.

5.- Instead of using the -uncpath option and the environmental variable TM_UNCPATH, I would rather recommend at this stage a small modification to you script runtel.pl as follows (changes highlighted). We will discuss the issue between developper and update the final solution chosen in version v6p2.

use Time::Local;
###> SEB @ HRW: Correction for UNC PATH
use Win32::NetResource;
###< SEB @ HRW

(...)

#jaj orig:
#$Directory_tmp=join "",$REPLANCE,$ps,$REP,$ps;
$Directory_tmp =join "",$REP,$ps;
$Directory_tmp =join "",$REP,$ps;
###> SEB @ HRW: Correction for UNC PATH
Win32::NetResource::GetUNCName( $TM_UNCPATH, $Directory_tmp );
if( $TM_UNCPATH ne "" ) {
$Directory_tmp=join "", $TM_UNCPATH;
}
###< SEB @ HRW

$filename=join "", $Directory_tmp,"PARAL";
$NCAR = length ($Directory_tmp);

open (F, ">$filename") or die "## Error : Open the $filename file is impossible\n";
printf F "$NCSIZE\n";

#- Traitement de l'option UNCPATH dans le fichier PARALL
#jaj orig
#$Directory_tmp=join "",$REPLANCE,$ps,$REP,$ps;
#$Directory_tmp=join "",$REP,$ps;
#if ( ($UNCPATH eq "oui") && ($TM_UNCPATH ne "") )
# { $Directory_tmp =~s/^[A-Za-z]:/$TM_UNCPATH/; }

#$NCAR = length ($Directory_tmp);
printf F "$NCAR\n";
printf F "$Directory_tmp\n";


You can otherwise try the installation based on Python scripts. Check under Documentations / installations.

Hope this helps,

Sébastien.
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.