forked from tsdev/spinw
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyspinw (Initial Version) #136
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Parameterize tests to loop over mex enabled/disabled * Validate eignevectors allowing sign-flip in super class * Add setup/teardown that disables mex I would like this to be a single static method thats called on setup/teardown * Compile mex files in run_tests * brew install llvm to allow mac os to compile mex with openMP And change compile flags in sw_mex for mac * In rare case chol_omp fails try the non-mex code ( cbebda2 ) test test_sw_qh5_saveSabp_incommensurate fails ~1/50 timeswith an error in sortmode - but the cause is actually that K2 contains NaN values. Have moved non-nex code to a separate function - hopefully copy-on-write will mean the matrices passed as input (for which memory is pre-allocated) aren't copied/duplicated * Fix non-thread safe mex code cause flaky tests It seems that calls which reference the input arrays plhs and prhs in mex files are not thread safe The code in `eig_omp` and `chol_omp` has been fix so that this is now done outside the parallel loops * Fix flaky MacOS test with mex For some reason with a large omega_tol added to the diagonal, on MacOS `chol` gives erroneous eigenvalues (of ~1e-3 instead of zero). This error goes down with the value of omega_tol. On other platforms the error is not so large (~1e-6). In the non-mex code, it tries first with smaller omega_tol, (==`min(eig(ham))`) so doesn't get this error but the mex code just uses `omega_tol` input directly. * Revert cbebda2 - not needed after mex thread safe fix --------- Co-authored-by: Duc Le <duc.le@stfc.ac.uk>
Fix out-of-memory error in mmat
* Fix bug in systemtest where ref data was always regenerated * Reduce test verbosity * Fix flaky optmagk test * Use persistent swpref in sw_timeit * Fix PCSMO system test twin matrix * Silence warnings in tests * OpenMP mex improvements Zero initialises arrays in chol_omp seems to fix remaining flaky mex tests Change omp critical to atomic for better performance * Improve optmagstr params test with new mock * Fix chol_omp error code collision
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.