SpecUtils
SpecUtils copied to clipboard
Mods to support spectra file IO out of fortran
This looks like a nice addition - thanks!
@wcjohns I merged in master this am and did this cmake configuration:
$ cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DSpecUtils_ENABLE_D3_CHART=OFF -DSpecUtils_BUILD_UNIT_TESTS=ON -DSpecUtils_USING_NO_THREADING=ON -DSpecUtils_FLT_PARSE_METHOD="FastFloat" -DSpecUtils_FETCH_FAST_FLOAT=ON ../../../
I'm getting this error on WSL/Ubuntu:
Args: --log_level=test_suite;--report_level=detailed;--catch_system_errors=yes
-- Configuring done (5.7s)
CMake Error in CMakeLists.txt:
Target "SpecUtils" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/mnt/c/Projects/code/SpecUtils/out/build/WSL-GCC-Debug/_deps/fast_float-src"
which is prefixed in the build directory.
CMake Error in CMakeLists.txt:
Target "SpecUtils" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/mnt/c/Projects/code/SpecUtils/out/build/WSL-GCC-Debug/_deps/fast_float-src"
which is prefixed in the build directory.Target "SpecUtils"
INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/mnt/c/Projects/code/SpecUtils/out/build/WSL-GCC-Debug/_deps/fast_float-src"
which is prefixed in the source directory.
-- Generating done (0.1s)
CMake Generate step failed. Build files cannot be regenerated correctly.
Commit 6d8371f39d2eef24edb123a25abc738de43b13a3 should fix this - let me know if not.
The default_value wasn't working for me, and I think that was before you fixed the FastFloat retrieval. I can revert it back to default_value.
-Hugh
Hugh P. Bivens Sandia National Laboratories Albuquerque, NM USA +1 (505) 284-6822 https://snl-wiki.sandia.gov/x/6ID2BQ
From: William Johnson @.> Sent: Monday, September 16, 2024 5:43 PM To: sandialabs/SpecUtils @.> Cc: Bivens, Hugh P. @.>; Author @.> Subject: [EXTERNAL] Re: [sandialabs/SpecUtils] Mods to support spectra file IO out of fortran (PR #34)
@wcjohns commented on this pull request.
On CMakeLists.txthttps://github.com/sandialabs/SpecUtils/pull/34#discussion_r1762087752:
If SpecUtils_FLT_PARSE_METHOD is left as 'default_value' here, there is some logic below to hopefully pick the most reasonable float parsing method. Like for MSVC ≥2019, it should pick 'FromChars'. Is there is reason to default to the slowest common denominator, or was it giving you an issue?
Reply to this email directly, view it on GitHubhttps://github.com/sandialabs/SpecUtils/pull/34#pullrequestreview-2308000642, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAP4BE7WQ6LSBY52EADLQLZW5UJTAVCNFSM6AAAAABLPPWDBOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMBYGAYDANRUGI. You are receiving this because you authored the thread.Message ID: @.@.>>
You're saying that installing the headers is causing it to break?
Hugh P. Bivens Sandia National Laboratories Albuquerque, NM USA +1 (505) 284-6822 https://snl-wiki.sandia.gov/x/6ID2BQ
From: William Johnson @.> Sent: Wednesday, January 29, 2025 5:27 PM To: sandialabs/SpecUtils @.> Cc: Bivens, Hugh P. @.>; Author @.> Subject: [EXTERNAL] Re: [sandialabs/SpecUtils] Mods to support spectra file IO out of fortran (PR #34)
@wcjohns commented on this pull request.
In CMakeLists.txthttps://github.com/sandialabs/SpecUtils/pull/34#discussion_r1934851751:
@@ -11,6 +11,9 @@ endif()
project( SpecUtils VERSION 2025.1.0 )
enable_testing() # Enable here to allow running ctest from top-most build dir
+# Add this line to specify the architectures for MacOS
+set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for MacOS" FORCE)
We can probably remove that added line; I think the macOS architectures are set by the nanobind stuff.
I just triggered a build on the main branch, and it ran fine. It looks like the problem is that on this branch, it is installing all the headers, and I think crucially the static SpecUtils.a library, into the Python wheel. When delocate is ran on the wheel, the .a file is causing the failure.
Below is the step that is installing stuff into the python package:
image.png (view on web)https://github.com/user-attachments/assets/a55e5484-c0b4-4cb1-a78e-57823de454ef image.png (view on web)https://github.com/user-attachments/assets/688c9184-2f77-4745-8b9b-5544b94df5a1
And the actual error: image.png (view on web)https://github.com/user-attachments/assets/6ecc5b23-e2a3-46d8-9afc-cd8977ecb4a2 Which looks to be being triggered by the .a file.
Reply to this email directly, view it on GitHubhttps://github.com/sandialabs/SpecUtils/pull/34#discussion_r1934851751, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAP4BEL3FBAP6FG6EFTHJT2NFWWRAVCNFSM6AAAAABLPPWDBOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOBSGY3DQNBXHA. You are receiving this because you authored the thread.Message ID: @.@.>>
It looks like its libSpecUtils.a that is causing the issue; I'm not sure why delocate is trying to do its thing on a static library, I thought it essentially fixed up shared libraries.
I just pushed 4e708281757837b820658d3d17aa2209fe760b2c and 4f0f40253d08ff5de52aef91aaf93533e478eff3, which changes the main CMakeLists.txt file so none of the install stuff is called, if the build is not a top-level project. E.g., if a python build.
It seems like this is probably the behavior wanted, in general - does it seem like it to you?
It looks like its libSpecUtils.a that is causing the issue; I'm not sure why delocate is trying to do its thing on a static library, I thought it essentially fixed up shared libraries.
I just pushed 4e70828 and 4f0f402, which changes the main CMakeLists.txt file so none of the install stuff is called, if the build is not a top-level project. E.g., if a python build. It seems like this is probably the behavior wanted, in general - does it seem like it to you?
Yeah I don't think we need to install stuff on a python build.
@wcjohns How do I set or get the energy cal low energy field?
Its the 5th entry in the energy calibration coefficient parameters. For example, its used here.
Its the 5th entry in the energy calibration coefficient parameters. For example, its used here.
Thanks!