# $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
# $1 : computer name for CORBA name service (where SALOME was launched)
# $2 : port for CORBA name service
-# $3 : working directory
-# $4 and following : local command to execute, with args
+# $3 : WORKINGDIR (if $3 == WORKINDIR a working dir is given in $4. If not the working dir is $HOME)
+# $4 : if $3 == WORKINGDIR, the path to the workingdir
+# $5 (or $3 if no workingdir given) and following : local command to execute, with args
#
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
echo "ORBInitRef $initref" > $OMNIORB_CONFIG
#go to the requested working directory if any
-if test "x$3" != x; then
- if test "x$3" = "x\$TEMPDIR"; then
+if test "x$3" == "xWORKINGDIR"; then
+ if test "x$4" = "x\$TEMPDIR"; then
#create a temp working dir and change to it
WDIR=`mktemp -d` && {
cd $WDIR
}
else
- if test -d $3; then
+ if test -d $4; then
#the dir exists, go to it
- cd $3
+ cd $4
else
- if test -a $3; then
+ if test -a $4; then
# It's a file do nothing
- echo $3 "is an existing file. Can't use it as a working directory"
+ echo $4 "is an existing file. Can't use it as a working directory"
else
#It does not exists, create it
- mkdir -p $3 && {
- cd $3
+ mkdir -p $4 && {
+ cd $4
}
fi
fi
fi
+ shift 4
+else
+ shift 2
fi
# --- execute the command in the SALOME environment
-shift 3
# suppress --rcfile option because of problem on Mandriva2006 - B Secher mai 2007
#${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile $HOME/$APPLI/.bashrc -c "$*"
<objref name="CALCIUM_real" id="IDL:Ports/Calcium_Ports/Calcium_Real_Port:1.0"/>
<objref name="CALCIUM_double" id="IDL:Ports/Calcium_Ports/Calcium_Double_Port:1.0"/>
<objref name="CALCIUM_string" id="IDL:Ports/Calcium_Ports/Calcium_String_Port:1.0"/>
+ <objref name="CALCIUM_logical" id="IDL:Ports/Calcium_Ports/Calcium_Logical_Port:1.0"/>
<objref name="CALCIUM_boolean" id="IDL:Ports/Calcium_Ports/Calcium_Logical_Port:1.0"/>
+ <objref name="CALCIUM_complex" id="IDL:Ports/Calcium_Ports/Calcium_Complex_Port:1.0"/>
<objref name="BASIC_short" id="IDL:Ports/Data_Short_Port:1.0"/>
<objref name="Study" id="IDL:SALOMEDS/Study:1.0"/>
<objref name="SObject" id="IDL:SALOMEDS/SObject:1.0"/>
}
//redirect stdout and stderr in a file
- string logFilename="/tmp/"+_NS->ContainerName(params)+"_"+GetHostname()+"_"+getenv( "USER" )+".log" ;
+ string logFilename="/tmp/"+_NS->ContainerName(params)+"_"+ theMachine +"_"+getenv( "USER" )+".log" ;
command += " > " + logFilename + " 2>&1 &";
// launch container with a system call
if (files_not_ok != "")
{
- std::cerr << "tutu" << std::endl;
SALOME::ExceptionStruct es;
es.type = SALOME::INTERNAL_ERROR;
std::string text = "files not ready : " + files_not_ok;
es.text = CORBA::string_dup(text.c_str());
- std::cerr << "titi" << std::endl;
throw SALOME::SALOME_Exception(es);
}
else
} catch ( const CalciumException & ex) { \
DEBTRACE( ex.what() ); \
return ex.getInfo(); \
+ } catch ( ... ) { \
+ std::cerr << "Unexpected exception " << std::endl; \
+ return CalciumTypes::CPATAL; \
} \
if ( IsSameType< _name , cplx >::value ) { *nRead=_nRead/2; \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part) IsSameType cplx -------------" ) \
} catch ( const CalciumException & ex) { \
std::cerr << ex.what() << std::endl; \
return ex.getInfo(); \
+ } catch ( ... ) { \
+ std::cerr << "Unexpected exception " << std::endl; \
+ return CalciumTypes::CPATAL; \
} \
DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \
return CalciumTypes::CPOK; \
{
if ( _typeMap.find(aType.name) == _typeMap.end() )
{
- std::cerr << "Registered basic type: " << aType.name << " " << aType.kind << std::endl;
+ MESSAGE("Registered basic type: " << aType.name << " " << aType.kind );
_typeMap[aType.name]=aType;
_typeList.push_back(aType);
}
{
if ( _typeMap.find(aType.name) == _typeMap.end() )
{
- std::cerr << "Registered sequence type: " << aType.name << " " << aType.content << std::endl;
+ MESSAGE("Registered sequence type: " << aType.name << " " << aType.content );
_typeMap[aType.name]=aType;
_typeList.push_back(aType);
}
{
if ( _typeMap.find(aType.name) == _typeMap.end() )
{
- std::cerr << "Registered objref type: " << aType.name << " " << aType.id << std::endl;
+ MESSAGE("Registered objref type: " << aType.name << " " << aType.id );
_typeMap[aType.name]=aType;
_typeList.push_back(aType);
}
{
if ( _typeMap.find(aType.name) == _typeMap.end() )
{
- std::cerr << "Registered struct type: " << aType.name << " " << aType.id << std::endl;
+ MESSAGE("Registered struct type: " << aType.name << " " << aType.id );
_typeMap[aType.name]=aType;
_typeList.push_back(aType);
}
for (int ind = 0 ; ind < _typeList.size() ; ind++)
{
- std::cerr << "name: " << _typeList[ind].name << std::endl;
//no real need to call string_dup, omniorb calls it on operator= (const char *) but it is safer
type_list[ind].name=CORBA::string_dup(_typeList[ind].name.c_str());
type_list[ind].kind=SALOME_ModuleCatalog::NONE;
* see BuildTempFileToLaunchRemoteContainer()
*
* Else rely on distant configuration. Command is under the form (example):
- * ssh user@machine distantPath/runRemote.sh hostNS portNS workingdir \
+ * ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
* SALOME_Container containerName &"
* - where user is ommited if not specified in CatalogResources,
* use to launch SALOME and servers in $APPLI: runAppli.sh, runRemote.sh)
* - where portNS is the port used by CORBA naming server (set by scripts to
* use to launch SALOME and servers in $APPLI: runAppli.sh, runRemote.sh)
- * - where workingdir is the requested working directory for the container
+ * - where workingdir is the requested working directory for the container.
+ * If WORKINGDIR (and workingdir) is not present the working dir will be $HOME
*/
//=============================================================================
nbproc = params.nb_node * params.nb_proc_per_node;
}
- // "ssh user@machine distantPath/runRemote.sh hostNS portNS workingdir \
+ // "ssh user@machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
// SALOME_Container containerName &"
if (resInfo.Protocol == rsh)
ASSERT(getenv("NSPORT"));
command += getenv("NSPORT"); // port of CORBA name server
- command += " '";
std::string wdir=params.workingdir.in();
- if(wdir == "$TEMPDIR")
- wdir="\\$TEMPDIR";
- command += wdir; // requested working directory
- command += "'";
+ if(wdir != "")
+ {
+ command += " WORKINGDIR ";
+ command += " '";
+ if(wdir == "$TEMPDIR")
+ wdir="\\$TEMPDIR";
+ command += wdir; // requested working directory
+ command += "'";
+ }
if(params.isMPI)
{
{
command="";
std::string wdir=params.workingdir.in();
- std::cerr << wdir << std::endl;
if(wdir != "")
{
// a working directory is requested
-I$(srcdir)/$(RPATH)/SALOMEDSImpl \
-I$(top_builddir)/salome_adm/unix \
-I$(top_builddir)/idl \
- @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ @BOOST_CPPFLAGS@
# This local variable defines the list of dependant libraries common to all target in this package.
COMMON_LIBS =\