How to add automatic benchmarking to your example

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
m
Line 8: Line 8:
 
  kratos_libs_path = '../../../../libs' ##kratos_root/libs
 
  kratos_libs_path = '../../../../libs' ##kratos_root/libs
 
  kratos_applications_path = '../../../../applications' ##kratos_root/applications
 
  kratos_applications_path = '../../../../applications' ##kratos_root/applications
 +
 
  import sys
 
  import sys
 
  sys.path.append(kratos_libs_path)
 
  sys.path.append(kratos_libs_path)
Line 35: Line 36:
 
  kratos_libs_path = '../../../../libs' ##kratos_root/libs
 
  kratos_libs_path = '../../../../libs' ##kratos_root/libs
 
  kratos_applications_path = '../../../../applications' ##kratos_root/applications
 
  kratos_applications_path = '../../../../applications' ##kratos_root/applications
  kratos_benchmarking_path = '../../../../benchmarking' ##kratos_root/benchmarking
+
  '''kratos_benchmarking_path = '../../../../benchmarking' ##kratos_root/benchmarking'''
 
   
 
   
 
  import sys
 
  import sys
 
  sys.path.append(kratos_libs_path)
 
  sys.path.append(kratos_libs_path)
 
  sys.path.append(kratos_applications_path)
 
  sys.path.append(kratos_applications_path)
  sys.path.append(kratos_benchmarking_path)
+
  '''sys.path.append(kratos_benchmarking_path)'''
 
   
 
   
 
  #importing Kratos main library
 
  #importing Kratos main library
Line 52: Line 53:
 
  applications_interface.ImportApplications(kernel, kratos_applications_path)
 
  applications_interface.ImportApplications(kernel, kratos_applications_path)
 
   
 
   
  import benchmarking
+
  '''import benchmarking'''
 
  ## from now on the order is not anymore crucial
 
  ## from now on the order is not anymore crucial
 
  ##################################################################
 
  ##################################################################
 
  ##################################################################
 
  ##################################################################

Revision as of 16:31, 27 November 2008

Kratos contains an automatic benchmarking feature which can be used to automatically check the status of nightly build, for example. To use this feature you need to import benchmarking module from kratos_root/benchmarking. To do this change the few lines of your code from:

##################################################################
##################################################################
## ATTENTION: here the order is important

#including kratos path
kratos_libs_path = '../../../../libs' ##kratos_root/libs
kratos_applications_path = '../../../../applications' ##kratos_root/applications

import sys
sys.path.append(kratos_libs_path)
sys.path.append(kratos_applications_path)

#importing Kratos main library
from Kratos import *
kernel = Kernel()   #defining kernel

#importing applications
import applications_interface
applications_interface.Import_IncompressibleFluidApplication = True
applications_interface.Import_PFEMApplication = True
applications_interface.ImportApplications(kernel, kratos_applications_path)

## from now on the order is not anymore crucial
##################################################################
##################################################################

to:

#################################################################
##################################################################
## ATTENTION: here the order is important

#including kratos path
kratos_libs_path = '../../../../libs' ##kratos_root/libs
kratos_applications_path = '../../../../applications' ##kratos_root/applications
kratos_benchmarking_path = '../../../../benchmarking' ##kratos_root/benchmarking

import sys
sys.path.append(kratos_libs_path)
sys.path.append(kratos_applications_path)
sys.path.append(kratos_benchmarking_path)

#importing Kratos main library
from Kratos import *
kernel = Kernel()   #defining kernel

#importing applications
import applications_interface
applications_interface.Import_IncompressibleFluidApplication = True
applications_interface.Import_PFEMApplication = True
applications_interface.ImportApplications(kernel, kratos_applications_path)

import benchmarking
## from now on the order is not anymore crucial
##################################################################
##################################################################
Personal tools
Categories