ecmwf / ecflow

ECMWF's workflow manager
Apache License 2.0
41 stars 15 forks source link

Support Intel Classic #40

Closed AlexanderRichert-NOAA closed 10 months ago

AlexanderRichert-NOAA commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to be able to build and run ecFlow with Intel Classic compilers, including Intel-built dependencies, namely Boost. I can get it to build, but there's an issue with cereal and Boost where ecflow_client fails when it goes to register the command arguments with cereal. I think there may be a way to force the type registration (which apparently Intel Classic doesn't do automatically), but I don't know enough about cereal to know where or how to do that.

Here's the client error output with ecflow 5.8.3 with everything built with Intel Classic 2021.10.0 after firing up ecflow_server & and attempting to run ecflow_client --stats:

Connection::async_write, exception Trying to save an unregistered polymorphic type (CtsCmd).
Make sure your type is registered with CEREAL_REGISTER_TYPE and that the archive you are using was included (and registered with CEREAL_REGISTER_ARCHIVE) prior to calling CEREAL_REGISTER_TYPE.
If your type is already registered and you still see this error, you may need to use CEREAL_REGISTER_DYNAMIC_INIT., in client data

Describe the solution you'd like

Some C++ magic that will let ecFlow build with all-Intel Classic dependencies :sunglasses: :sunglasses: :sunglasses:

Describe alternatives you've considered

In principle we can build boost with GCC (or build everything with GCC, for that matter) and work around this, but it would make things a whole lot cleaner if we could do an all-Intel build.

Additional context

No response

Organisation

RedLine Perf Solutions (NOAA EMC affilitate)

marcosbento commented 10 months ago

This issue seems to originate in Cereal itself, and cannot easily be fixed from within ecFlow. We put together an example, available at https://godbolt.org/z/958oh6jcr, that demonstrates the issue only occurs with ICC. The example also shows that the issue does not occur with the more recent Clang-based Intel compiler.

As we effectively don't use ecFlow built on the "classic" Intel compiler, so there is no plan to pursue a fix for this issue ourselves.

Nonetheless, we are open to review and accept a set of changes proposed by the community on this topic. In case of pursuing this avenue, please consider re-opening the issue and pull request the changes.

marcosbento commented 10 months ago

BTW, this seems to be a known issue at Cereal (https://github.com/USCiLab/cereal/issues/606).