.. _start-xclass: Start XCLASS ============ Init file --------- During the installation process, *XCLASS* creates a new subdirectory, called ``.xclass`` located in the user's home directory, i.e. :: /path-to-user-home-directory/.xclass/ This subdirectory contains a small text file called ``init.dat``, which describes some internal parameters used by *XCLASS*. Additionally, *XCLASS* creates a subdirectory called ``db/``, i.e. :: /path-to-user-home-directory/.xclass/db/ which contains the *XCLASS* database file ``cdms_sqlite.db``. Parallelization --------------- In order to use the parallelization option of the interface, the user might increase the stack size for OpenMP by adding the following lines to the .bashrc (or .bash_profile) file: .. code:: shell ulimit -s unlimited export KMP_STACKSIZE='3999M' export OMP_STACKSIZE='3999M' export GOMP_STACKSIZE='3999M' Please note, if more or less RAM is available, please increase/decrease the value ``"3999"`` to a value useful for your machine. Job directories --------------- The *XCLASS* interface creates so-called job directories for many *XCLASS* function, where all files created by a function call are stored in. By default, all these job-directories are stored in a so-called run directory which is created within the .xclass subdirectory with name “run”, i.e. :: /path-to-user-home-directory/.xclass/run/ Sometimes it is useful to create the run directory, not within the *XCLASS* subdirectory. By defining the environment variable **XCLASSJobDirectory** .. code:: shell export XCLASSJobDirectory="run_somewhere_else" the user can define another location for the run directory. Temporary files --------------- During the fit process, the MAGIX optimization package included in *XCLASS* creates many temporary files, which are written to the temporary directory (temp). This directory is by default also located within the .xclass subdirectory with name “temp”, i.e. :: /path-to-user-home-directory/.xclass/temp/ By defining the environment variable **MAGIXTempDirectory** .. code:: shell export MAGIXTempDirectory="temp_somewhere_else" in the bashrc (or .bash_profile) file, the user can define another location for this temporary directory. It is strongly recommended to use a so-called RAM drive, i.e. set the environment variable to (Linux users) .. code:: shell export MAGIXTempDirectory="/dev/shm/user-name/" whenever possible. (The RAM drive is a common name for a temporary file storage facility on many Unix-like operating systems. The usage of a RAM drive improve the performance of *XCLASS* because the temporary files are not written to the hard drive but to the RAM, which is orders of magnitude faster.) For Mac users, add the following lines to your .bash_profile file to create a RAM drive (no guarantee) .. code:: shell ## create RAM drive on Mac if [ -d /Volumes/RAMDisk/ ]; then echo ' '; else diskutil erasevolume HFS+ 'RAMDisk' `hdiutil attach -nomount ram://16777216`; fi ## create a subdirectory there for user 'user-name' if [ -d /Volumes/RAMDisk/user-name/ ]; then echo ' '; else mkdir -p /Volumes/RAMDisk/user-name/; fi ## set temp directory environment variable for MAGIX export MAGIXTempDirectory=/Volumes/RAMDisk/user-name/