How to add automatic benchmarking to your example

From KratosWiki
(Difference between revisions)
Jump to: navigation, search
(New page: Test)
 
Line 1: Line 1:
Test
+
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 <tt>benchmarking</tt> module from <tt>''kratos_root''/benchmarking</tt>. 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
 +
##################################################################
 +
##################################################################

Revision as of 16:29, 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