It looks like adding a
wPETSC_DIR=@wPETSC_DIR@
in the script header will work (see config/example_template.py)
with wPETSC_DIR then added to the variables that get substituted.
Then convertExamples will just pass the arguments as it and it
should *just work*.

OK.

But out of curiosity, when I look at config/PETSc/Configure.py, it looks like wPETSC_DIR is only defined on Windows as a make macro:

...
  def configureWin32(self):
    ...
    if self.compilers.CC.find('win32fe') >= 0:
      ...
      self.addMakeMacro('wPETSC_DIR',petscdir)
    else:
      ...
      self.addMakeMacro('wPETSC_DIR',self.petscdir.dir)



How does wPETSC_DIR get set for non-windows systems?
I know how I am going to do it, but how does the current/legacy
system do it?

Scott



On 1/18/17 1:47 PM, Satish Balay wrote:
wPETSC_DIR is one of the petscconf variables.

Perhaps we should start a branch origin/scott/testharness-update2 or
something to push all new changes..

[and change wPETSC_DIR to W_PETSC_DIR everywhere? There is still some
inconsistancy wrt lowercase/uppercase in these 2 scripts]

Satish

-----

diff --git a/config/example_template.py b/config/example_template.py
index 6296f46..2f9050e 100755
--- a/config/example_template.py
+++ b/config/example_template.py
@@ -9,6 +9,7 @@ exec=@EXEC@
 testname='@TESTNAME@'
 label=@LABEL@
 runfiles=@LOCALRUNFILES@
+wPETSC_DIR=@WPETSC_DIR@
 petsc_dir=@PETSC_DIR@

 . ${petsc_dir}/config/petsc_harness.sh
diff --git a/config/gmakegentest.py b/config/gmakegentest.py
index 79894e7..fe449a8 100755
--- a/config/gmakegentest.py
+++ b/config/gmakegentest.py
@@ -244,6 +244,7 @@ class generateExamples(Petsc):
     subst['rm']=self.conf['RM']
     subst['grep']=self.conf['GREP']
     subst['petsc_lib_dir']=self.conf['PETSC_LIB_DIR']
+    subst['wpetsc_dir']=self.conf['wPETSC_DIR']

     return subst

On Wed, 18 Jan 2017, Scott Kruger wrote:




In the current version of the new test system, there is support for 'requires:
DATAFILESPATH' which then keys off what is configured,
similar to any other requirement on how PETSc is configured.

How would I get wPETSC_DIR?

Scott


On 1/18/17 8:09 AM, Satish Balay wrote:
On Tue, 17 Jan 2017, Barry Smith wrote:

In this case the data files is in the PETSc share directory so you should
use the ${PETSC_DIR} to point to it. Only files in the DATAFILESPATH
directory should use $DATAFILESPATH


Hm - we use wPETSC_DIR so that the path is  valid for windows binaries
aswell. Perhaps
the test harness will need a fix for this..

$ git grep wPETSC_DIR |grep makefile |head -3
src/ksp/ksp/examples/tutorials/makefile:        -@${MPIEXEC} -n 2 ./ex10 -f0
${wPETSC_DIR}/share/petsc/datafiles/matrices/spd-real-int${PETSC_INDEX_SIZE}-float${PETSC_SCALAR_SIZE}
ex10_1.tmp 2>&1; \
src/ksp/ksp/examples/tutorials/makefile:        -@${MPIEXEC} -n 2 ./ex10
-pc_type asm -pc_asm_sub_mat_type aijviennacl -f0
${wPETSC_DIR}/share/petsc/datafiles/matrices/spd-real-int${PETSC_INDEX_SIZE}-float${PETSC_SCALAR_SIZE}
ex10_asm_viennacl.tmp 2>&1; \
src/ksp/ksp/examples/tutorials/makefile:        -@${MPIEXEC} -n 1 ./ex63
--filedir=${wPETSC_DIR}/share/petsc/datafiles/matrices/
--filename=amesos2_test_mat0.mtx --solver=SuperLU --print-residual=true
-ksp_monitor -pc_type lu -pc_factor_mat_solver_package superlu -ksp_view
-ksp_converged_reason  > ex63_1.tmp 2>&1;       \

Satish




--
Tech-X Corporation               [email protected]
5621 Arapahoe Ave, Suite A       Phone: (720) 974-1841
Boulder, CO 80303                Fax:   (303) 448-7756

Reply via email to