Skip to content
Snippets Groups Projects
Select Git revision
  • improve-type-safety-apps
  • 2376-add-transfer-upload-bundle-endpoint
  • mapping-parser-fixes
  • temporal-workflows
  • v1.3.17
  • reset-pause-start-processing
  • develop default protected
  • 2394-unformatted-log-in-the-upload-and-entry-overviews
  • improve-error-messages-on-transfer-bundle-workflow
  • 2388-schema-label-not-showing-in-create-from-schema-dialog
  • north-integration-final
  • 2390-not-all-units-available-in-the-front-end
  • upgrade-numpy
  • upgrade-ase-attempt-2
  • fix-error-v2basesection
  • tlc/two-tier-indexing
  • update-mongo
  • 2386-re-order-matrix-visualisation-from-column-major-to-row-major-ordering
  • 2372-merging-and-overwriting-for-nomad-yaml
  • cheminformatics
  • v1.3.16
  • tag-skip-tests-for-docs
  • v1.3.15
  • v1.3.14
  • v1.3.13
  • v1.3.12
  • v1.3.11
  • v1.3.10
  • v1.3.9
  • v1.3.8
  • v1.3.7
  • v1.3.6
  • v1.3.5
  • v1.3.4
  • v1.3.3
  • v1.3.2
  • v1.3.1
  • v1.3.0
  • v1.2.1
  • v1.2.0
40 results

patch.py

Blame
  • Lauri Himanen's avatar
    Lauri Himanen authored and Markus Scheidgen committed
    Changelog: Changed
    de1ed6ff
    History
    patch.py 1.34 KiB
    #
    # Copyright The NOMAD Authors.
    #
    # This file is part of NOMAD. See https://nomad-lab.eu for further info.
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    #
    
    import matid.symmetry.symmetryanalyzer  # pylint: disable=import-error
    import matid.utils.segfault_protect  # pylint: disable=import-error
    
    
    # A patch for the segfault protection of systax (internally uses protection for spglib calls.)
    # We basically disable the protection. The multiprocessing based original protection.
    # somehow interfers with the celery work infrastructure and leads to a deadlock. Its a TODO.
    # It also seems to deadlock without celery .. just not working consistently.
    def segfault_protect_patch(f, *args, **kwargs):
        return f(*args, **kwargs)
    
    
    matid.symmetry.symmetryanalyzer.segfault_protect = segfault_protect_patch
    matid.utils.segfault_protect.segfault_protect = segfault_protect_patch