-
Notifications
You must be signed in to change notification settings - Fork 16
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
Allow single and double precision libraries in a single build. #70
base: main
Are you sure you want to change the base?
Conversation
Behaviour controlled by ENABLE_SINGLE_PRECISION and ENABLE_DOUBLE_PRECISION.
In principle OK, but I did not think this was needed. What's the rationale? |
Regardless of my previous comment if we should even do this, and assuming we do: We have following lines in the CMakelists.txt get_filename_component( ecwam-source_dir ${CMAKE_CURRENT_SOURCE_DIR} NAME )
if( ecwam-source_dir MATCHES "ecwam_(dp|sp)" )
set( ECWAM_PROJECT_NAME ${ecwam-source_dir} )
endif() For backwards compatibility perhaps there we should make sure that if the ecwam-source_dir is "ecwam_dp" it is only enabling double precision, and if it is "ecwam_sp" it should only enable single precision. The target names currently set to |
I don't think it is needed at the moment, but it would be a step towards allowing both single and double precision libraries to be linked in a single binary, for example OOPS with single precision trajectory and double precision inner loops. |
This will then need to go the ectrans route of trying to make the symbols unique. |
I thought this was needed for easybuild recipes, where we don't want to do the symlinked projects like we do in the bundle but still wish to retain the ability to build both sp and dp targets in a single "bundle" invocation. In that case, the work of making the symbols unique like in ecTrans could be done in a follow-up PR? In terms of getting the current PR over the line, we would need a few fixes (which I am happy to help with @marsdeno if you are pressed for time):
|
Yes a separate PR for sure. We should aim to be backwards compatible still for the time being, i.e. not introducing API changes or ABI changes. |
Behaviour controlled by ENABLE_SINGLE_PRECISION and ENABLE_DOUBLE_PRECISION.