Salome HOME
Copyright update 2021
[modules/yacs.git] / src / evalyfx_swig / test3.py
index 4bb752016ebe6442de7593a2a28c66f09e658529..7916f46a234444ae8e7f9eedbb3a3a410722e324 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2015-2021  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,7 @@ import os,getpass
 CatalogResources="""<?xml version="1.0"?>
 <resources>
   <machine name="localhost" hostname="dsp0698184" type="single_machine" appliPath="" batchQueue="" userCommands="" protocol="ssh" iprotocol="ssh" workingDirectory="" canLaunchBatchJobs="false" canRunContainers="true" batch="none" mpi="no mpi" userName="" OS="" memInMB="0" CPUFreqMHz="0" nbOfNodes="1" nbOfProcPerNode="4"/>
-  <machine name="athos" hostname="athos" type="cluster" appliPath="/home/H87074/ATHOS_V771/appli_V7_7_1" batchQueue="" userCommands="" protocol="ssh" iprotocol="ssh" workingDirectory="" canLaunchBatchJobs="true" canRunContainers="false" batch="slurm" mpi="no mpi" userName="" OS="" memInMB="0" CPUFreqMHz="0" nbOfNodes="250" nbOfProcPerNode="28"/>
+  <machine name="athos" hostname="athos" type="cluster" appliPath="/home/H87074/ATHOS_V830/appli_V8_3_0" batchQueue="" userCommands="" protocol="ssh" iprotocol="ssh" workingDirectory="" canLaunchBatchJobs="true" canRunContainers="false" batch="slurm" mpi="no mpi" userName="" OS="" memInMB="0" CPUFreqMHz="0" nbOfNodes="250" nbOfProcPerNode="28"/>
 </resources>"""
 
 def buildScheme(fname):
@@ -43,7 +43,8 @@ def buildScheme(fname):
     p.edAddChild(n0)
     q=n0.edAddInputPort("q",td)
     ep=n0.edAddOutputPort("ep",td)
-    n0.setScript("ep=1./(4.-q)") # <- force division by 0
+    #n0.setScript("ep=1./(4.-q)") # <- force division by 0
+    n0.setScript("ep=2.*float(___idx___)")
     n0.setExecutionMode("remote")
     n0.setContainer(cont)
     p0.saveSchema(fname)
@@ -65,7 +66,7 @@ efx.lockPortsForEvaluation(inps,outps)
 rss=efx.giveResources()
 rss[0][0].setWantedMachine("athos")
 cp=rss.getAddParamsForCluster() ; cp.setRemoteWorkingDir(os.path.join("/scratch",getpass.getuser(),"TMP3")) ; cp.setLocalWorkingDir(os.path.join(os.path.expanduser("~"),"TMP52"))
-cp.setWCKey("P11U50:CARBONES") ; cp.setNbProcs(5) ; cp.setMaxDuration("00:05")
+cp.setWCKey("P11U5:CARBONES") ; cp.setNbProcs(5) ; cp.setMaxDuration("00:05")
 assert(not rss.isInteractive())
 a,b=efx.run(session)
 print(("************",a,b))