Repository navigation
generic-parallel material properties: load, check and describe the libraries generated by TFEL 5.2 - #321
Open
trsxvz wants to merge 7 commits into
Open
generic-parallel material properties: load, check and describe the libraries generated by TFEL 5.2#321trsxvz wants to merge 7 commits into
trsxvz wants to merge 7 commits into
Conversation
Copies of the types of the functions generated by the `generic-parallel` interface of `MFront` for material properties (`TFEL` 5.2): data of a batch, fields, statistics, output status and pointers to the functions (`MGIS/MaterialProperty/BatchMaterialPropertyFctPtr.hxx`), version 1 of those functions. The execution policies are defined by `TFEL`: `MGIS` only declares their type (`MGIS/BackendExecutionPolicy.h`), so that it does not depend on `TFEL`.
`load` recognizes the libraries generated by the `generic-parallel` interface by the version of their functions, checks this version and the memory space, and fills the new members of `MaterialProperty` (interface, version, backend, memory space, identifier of the expected execution policy, functions of batches of points). The libraries of the other interfaces are loaded as before. A library generated by a version of the `generic-parallel` interface which does not export the version of its functions is refused.
With `TFEL` 5.2 or later: copies of the types of `TFEL` (sizes and offsets of the members), loading of a library generated with the `stlpar` backend, values and statuses compared to the `generic` interface, report of an evaluation with statistics, refused libraries.
…st and by the device The statistics are read on the host by the report function (and written on the host by the stlpar backend): as in TFEL, they must be accessible by the host and by the device, not only in the memory space of the library. Review item: M-008
…l-material-properties # Conflicts: # docs/web/release-notes-3.2.md
The generic-parallel material property libraries of the tests were only built by check, so that make build-tests followed by ctest ran with missing or stale libraries; they now depend on build-tests, as the other test targets. Review item: M-116
This file contains hidden or 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
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.
[AI-assisted]
/!\ : TO MERGE ONLY AFTER MERGING thelfer/tfel#1088
Fixes #320.
Support of the material properties generated by the
generic-parallelinterface ofMFront(thelfer/tfel#1088). Only additions: the existing API is unchanged.Types of the generated functions
MGIS/MaterialProperty/BatchMaterialPropertyFctPtr.hxxdeclares copies of the types ofTFEL: data of a batch (mgis_mp_BatchData), fields, statistics, output status, pointers to the functions.MGIS_MP_GENERIC_PARALLEL_API_VERSIONgives the supported version of those functions: 1.MGIS/BackendExecutionPolicy.honly declares the type of the execution policies. A code creating a policy includes the headers ofTFELand linksMFrontGenericParallelRuntime.MGISdoes not depend onTFEL, as for thegenericinterface.Loading
loadrecognizes a library of thegeneric-parallelinterface by its<name>_generic_parallel_api_versionsymbol.MaterialProperty:mfront_interface,batch_api_version,backend,memory_space,execution_policy,batch_fct,batch_report_fct.isGenericParallelMaterialPropertytells if those functions are available.mfront_interface, after the<name>_mfront_interfacesymbol:interfaceis a macro of the headers of Windows.Tests
LoadGenericParallelMaterialPropertyTest, withTFEL5.2 or later and theenable-parallel-stl-algorithmsoption (check-tbbworkflow):TFEL;stlparbackend: description, values and statuses compared to thegenericinterface, report of an evaluation with statistics;All the tests of
MGISpass on Linux withTFELbuilt from thelfer/tfel#1088. Windows and macOS are covered by the continuous integration.Documentation: as in
TFEL, the statistics must be accessible by the host and by the device (the report function reads them on the host), not only in the memory space of the library (commit 657866c).Not included, for a later version: behaviours and models of the
generic-parallelinterface, helpers creating execution policies or evaluating batches, bindings.