我要评分
获取效率
正确性
完整性
易理解

Compiling and Installing Chaste

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the source code package.
    cd /path/to/CHASTE
    tar -xvf Chaste-release_2019.1.tar.gz
  3. Modify the translators.py file.
    1. Open translators.py.
      vim /path/to/CHASTE/Chaste-release_2019.1/python/pycml/translators.py
    2. Press i to enter the insert mode and modify the file.

      Uncomment line 1830 and comment out line 1831.

      Uncomment line 1838 and comment out line 1839.

      Before the modification:

      1830                 #self.writeln('std::cout << "Too small: ', self.code_name(var), ' = " << ', self.code_name(var) , ' << std::endl << std::flush;')
      1831                 self.writeln(error_template.format(self.var_display_name(var)))
      1832                 self.close_block(False)
      1833             for var in high_range_vars:
      1834                 if using_cvode:
      1835                     additional_tolerance_adjustment = ' + tol'
      1836                 self.writeln('if (', self.code_name(var), ' > ', var.get_rdf_annotation(high_prop), additional_tolerance_adjustment, ')')
      1837                 self.open_block()
      1838                 #self.writeln('std::cout << "Too large: ', self.code_name(var), ' = " << ', self.code_name(var) , ' << std::endl << std::flush;')
      1839                 self.writeln(error_template.format(self.var_display_name(var)))

      After the modification:

      1830                 self.writeln('std::cout << "Too small: ', self.code_name(var), ' = " << ', self.code_name(var) , ' << std::endl << std::flush;')
      1831                 #self.writeln(error_template.format(self.var_display_name(var)))
      1832                 self.close_block(False)
      1833             for var in high_range_vars:
      1834                 if using_cvode:
      1835                     additional_tolerance_adjustment = ' + tol'
      1836                 self.writeln('if (', self.code_name(var), ' > ', var.get_rdf_annotation(high_prop), additional_tolerance_adjustment, ')')
      1837                 self.open_block()
      1838                 self.writeln('std::cout << "Too large: ', self.code_name(var), ' = " << ', self.code_name(var) , ' << std::endl << std::flush;')
      1839                 #self.writeln(error_template.format(self.var_display_name(var)))
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Compile and install Chaste.
    cd /path/to/CHASTE
    mkdir chaste_build
    cd chaste_build
    cmake -DCMAKE_INSTALL_PREFIX=/path/to/CHASTE/chaste_build /path/to/CHASTE/Chaste-release_2019.1 -DBoost_INCLUDE_DIR=/path/to/CHASTE/CHASTE_LIBS/boost_1_58_0/build/include
    make -j48 Continuous
    make install
    export PATH=/path/to/CHASTE/chaste_build/apps:$PATH