



Next: Units Up: CalculiX CrunchiX USER'S MANUAL Previous: Introduction. Contents
How to perform CalculiX calculations in parallel
Nowadays most computers have several CPUs, allowing for the calculations to be performed in a parallel way. In CalculiX one can
- solve the system of equations with the multithreaded version of
SPOOLES. To this end
- the MT-version of SPOOLES must have been compiled. For further information on this topic please consult the SPOOLES documentation
- CalculiX CrunchiX must have been compiled with the USE_MT flag activated in the Makefile, please consult the README.INSTALL file.
- at execution time the environment variable OMP_NUM_THREADS must have been set to the number of CPUs you want to use. In Linux this can be done by ``export OMP_NUM_THREADS=n'' on the command line, where n is the number of CPUs. Default is 1. Alternatively, you can set the number of CPUs using the environment variable CCX_NPROC_EQUATION_SOLVER. If both are set, the latter takes precedence.
- solve the system of equations with the multithreaded version of
PARDISO. PARDISO is proprietary. Look at the PARDISO documentation how to link the
multithreaded version. At execution
time the environment variable OMP_NUM_THREADS must be set to the number of CPUs,
default is 1.
- create material tangent matrices and calculate the stresses at the
integration points in parallel. No special compilation flag is needed. At execution
time the environment variable OMP_NUM_THREADS or the environment variable CCX_NPROC_RESULTS must be set to the number of CPUs,
default is 1. If both are set, CCX_NPROC_RESULTS takes
precedence. The maximum number of CPUs is detected automatically by CalculiX
by using
the sysconf(_SC_NPROCESSORS_CONF) function. It can be overriden by the
user by means of environment variable NUMBER_OF_CPUS. Notice that if a
material user subroutine (Sections 8.5 and 8.6) is used, certain rules have to be complied with in
order to allow parallelization. These include (this list is possibly not exhaustive):
- no save statements
- no data statements
- avoid logical variables
- no write statements
- calculate the viewfactors for thermal radiation computations in parallel. No special compilation flag is needed. At execution
time the environment variable OMP_NUM_THREADS or the environment variable CCX_NPROC_VIEWFACTOR must be set to the number of CPUs,
default is 1. If both are set, CCX_NPROC_VIEWFACTOR takes precedence. The maximum number of CPUs is detected automatically by CalculiX by using
the sysconf(_SC_NPROCESSORS_CONF) function. It can be overriden by the
user by means of environment variable NUMBER_OF_CPUS.
- create the right hand side of the CFD equations (computational fluid
dynamics) in parallel. No special compilation flag is needed. At execution
time the environment variable OMP_NUM_THREADS or the environment variable CCX_NPROC_CFD must be set to the number of CPUs,
default is 1. If both are set, CCX_NPROC_CFD takes precedence. The maximum number of CPUs is detected automatically by CalculiX by using
the sysconf(_SC_NPROCESSORS_CONF) function. It can be overriden by the
user by means of environment variable NUMBER_OF_CPUS.
Examples:
- For some reason the function sysconf does not work on your computer system and leads to a segmentation fault. You can prevent using the function by defining the maximum number of CPUs explicitly using the NUMBER_OF_CPUS environment variable
- You want to perform a thermomechanical calculation, but you are using a user defined material subroutine (Sections 8.5 and 8.6) which is not suitable for parallelization. You can make maximum use of parallelization (e.g. for the calculation of viewfactors) by setting the variable OMP_NUM_THREADS to the maximum number of cores on your system, and prevent parallelization of the material tangent and stress calculation step by setting CCX_NPROC_RESULTS to 1.




Next: Units Up: CalculiX CrunchiX USER'S MANUAL Previous: Introduction. Contents guido dhondt 2012-10-06