prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  -lpthtread is missing from $LIBBLAS_MT
  when building with the `foss` toolchain, I noticed that `$LIBBLAS_MT` is defined identical to `$LIBBLAS` as `-lopenblas -lgfortran`
  
  we should make sure `-lpthread` is included as well.
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `easybuild/toolchains/linalg/openblas.py`
  Content:
  ```
  1 ##
  2 # Copyright 2013-2021 Ghent University
  3 #
  4 # This file is part of EasyBuild,
  5 # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
  6 # with support of Ghent University (http://ugent.be/hpc),
  7 # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
  8 # Flemish Research Foundation (FWO) (http://www.fwo.be/en)
  9 # and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
  10 #
  11 # https://github.com/easybuilders/easybuild
  12 #
  13 # EasyBuild is free software: you can redistribute it and/or modify
  14 # it under the terms of the GNU General Public License as published by
  15 # the Free Software Foundation v2.
  16 #
  17 # EasyBuild is distributed in the hope that it will be useful,
  18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20 # GNU General Public License for more details.
  21 #
  22 # You should have received a copy of the GNU General Public License
  23 # along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.
  24 ##
  25 """
  26 Support for OpenBLAS as toolchain linear algebra library.
  27 
  28 :author: Kenneth Hoste (Ghent University)
  29 """
  30 
  31 from easybuild.tools.toolchain.linalg import LinAlg
  32 
  33 
  34 TC_CONSTANT_OPENBLAS = 'OpenBLAS'
  35 
  36 
  37 class OpenBLAS(LinAlg):
  38     """
  39     Trivial class, provides OpenBLAS support.
  40     """
  41     BLAS_MODULE_NAME = ['OpenBLAS']
  42     BLAS_LIB = ['openblas']
  43     BLAS_FAMILY = TC_CONSTANT_OPENBLAS
  44 
  45     LAPACK_MODULE_NAME = ['OpenBLAS']
  46     LAPACK_IS_BLAS = True
  47     LAPACK_FAMILY = TC_CONSTANT_OPENBLAS
  48
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/easybuild/toolchains/linalg/openblas.py b/easybuild/toolchains/linalg/openblas.py
  --- a/easybuild/toolchains/linalg/openblas.py
  +++ b/easybuild/toolchains/linalg/openblas.py
  @@ -40,6 +40,7 @@
       """
       BLAS_MODULE_NAME = ['OpenBLAS']
       BLAS_LIB = ['openblas']
  +    BLAS_LIB_MT = ['openblas']
       BLAS_FAMILY = TC_CONSTANT_OPENBLAS
   
       LAPACK_MODULE_NAME = ['OpenBLAS']
  
verification_info: {"golden_diff": "diff --git a/easybuild/toolchains/linalg/openblas.py b/easybuild/toolchains/linalg/openblas.py\n--- a/easybuild/toolchains/linalg/openblas.py\n+++ b/easybuild/toolchains/linalg/openblas.py\n@@ -40,6 +40,7 @@\n     \"\"\"\n     BLAS_MODULE_NAME = ['OpenBLAS']\n     BLAS_LIB = ['openblas']\n+    BLAS_LIB_MT = ['openblas']\n     BLAS_FAMILY = TC_CONSTANT_OPENBLAS\n \n     LAPACK_MODULE_NAME = ['OpenBLAS']\n", "issue": "-lpthtread is missing from $LIBBLAS_MT\nwhen building with the `foss` toolchain, I noticed that `$LIBBLAS_MT` is defined identical to `$LIBBLAS` as `-lopenblas -lgfortran`\r\n\r\nwe should make sure `-lpthread` is included as well.\r\n\r\n\n", "before_files": [{"content": "##\n# Copyright 2013-2021 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemish Research Foundation (FWO) (http://www.fwo.be/en)\n# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n#\n# https://github.com/easybuilders/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation v2.\n#\n# EasyBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n##\n\"\"\"\nSupport for OpenBLAS as toolchain linear algebra library.\n\n:author: Kenneth Hoste (Ghent University)\n\"\"\"\n\nfrom easybuild.tools.toolchain.linalg import LinAlg\n\n\nTC_CONSTANT_OPENBLAS = 'OpenBLAS'\n\n\nclass OpenBLAS(LinAlg):\n    \"\"\"\n    Trivial class, provides OpenBLAS support.\n    \"\"\"\n    BLAS_MODULE_NAME = ['OpenBLAS']\n    BLAS_LIB = ['openblas']\n    BLAS_FAMILY = TC_CONSTANT_OPENBLAS\n\n    LAPACK_MODULE_NAME = ['OpenBLAS']\n    LAPACK_IS_BLAS = True\n    LAPACK_FAMILY = TC_CONSTANT_OPENBLAS\n", "path": "easybuild/toolchains/linalg/openblas.py"}], "after_files": [{"content": "##\n# Copyright 2013-2021 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemish Research Foundation (FWO) (http://www.fwo.be/en)\n# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n#\n# https://github.com/easybuilders/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation v2.\n#\n# EasyBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n##\n\"\"\"\nSupport for OpenBLAS as toolchain linear algebra library.\n\n:author: Kenneth Hoste (Ghent University)\n\"\"\"\n\nfrom easybuild.tools.toolchain.linalg import LinAlg\n\n\nTC_CONSTANT_OPENBLAS = 'OpenBLAS'\n\n\nclass OpenBLAS(LinAlg):\n    \"\"\"\n    Trivial class, provides OpenBLAS support.\n    \"\"\"\n    BLAS_MODULE_NAME = ['OpenBLAS']\n    BLAS_LIB = ['openblas']\n    BLAS_LIB_MT = ['openblas']\n    BLAS_FAMILY = TC_CONSTANT_OPENBLAS\n\n    LAPACK_MODULE_NAME = ['OpenBLAS']\n    LAPACK_IS_BLAS = True\n    LAPACK_FAMILY = TC_CONSTANT_OPENBLAS\n", "path": "easybuild/toolchains/linalg/openblas.py"}]}