Skip to content
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

UCT/API: remove redundant UCT_CB_FLAG_SYNC #2938

Merged
merged 4 commits into from
Oct 17, 2018

Conversation

evgeny-leksikov
Copy link
Contributor

What

Remove redundant UCT_CB_FLAG_SYNC

Why ?

Flags UCT_CB_FLAG_SYNC and UCT_CB_FLAG_ASYNC are mutually exclusive

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/5383/ for details.

@mellanox-github
Copy link
Contributor

Test PASSed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7912/ for details (Mellanox internal link).

@shamisp
Copy link
Contributor

shamisp commented Oct 11, 2018

@hjelmn FYI

@hjelmn
Copy link
Contributor

hjelmn commented Oct 11, 2018

Yeah, was wondering about that. Seemed odd to have both.

UCT_IFACE_FLAG_CB_SYNC flag is set),
the callback may be invoked only from
the context that called @ref
uct_iface_progress). */
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its probably a bad idea to change the UCS_BIT of the async flag. Can break code that is using UCT. Probably better off just blocking out UCS_BIT(1) for awhile and leaving async as UCS_BIT(2).

@shamisp
Copy link
Contributor

shamisp commented Oct 11, 2018

@hjelmn technically it breaks backward compatibility. But if you are not concerned about this, I'm not supper worried.

@hjelmn
Copy link
Contributor

hjelmn commented Oct 11, 2018

@shamisp I am not too concerned about it. Just concerned at the possibility that UCS_BIT(1) gets redefined at some point to something I don't want. Though I don't use ASYNC right now so I guess just protecting myself by checking for existence of the sync flag in btl/uct is enough. Linking should be protected by a new .so version for libuct.so.

@shamisp
Copy link
Contributor

shamisp commented Oct 12, 2018

@hjelmn - maybe we should start with UCS_BIT(3) ? @yosefe ?

@evgeny-leksikov
Copy link
Contributor Author

@shamisp why it's better than UCS_BIT(0) which was not used as well? may be rename UCS_BIT(1) and UCS_BIT(2) to UCT_CB_FLAG_DEPRECATED_XXX until lib version is bumped?

@hjelmn
Copy link
Contributor

hjelmn commented Oct 12, 2018

@evgeny-leksikov Just doesn't make as much sense to change the value of the async flag. Then could also block out the old sync flag until the so is bumped. That would make sense to me.

@shamisp
Copy link
Contributor

shamisp commented Oct 12, 2018

@hjelmn - agreed. This essentially was my intend.

@evgeny-leksikov
Copy link
Contributor Author

So, just to clarify:

  1. UCT_CB_FLAG_ASYNC = UCS_BIT(2) - old value
  2. return UCS_ERR_INVALID_PARAM if UCS_BIT(1) is set or block it by some "deprecated" name?

@hjelmn
Copy link
Contributor

hjelmn commented Oct 12, 2018

@evgeny-leksikov Yes. That would be the safest approach. But do both the block and error return to be safe.

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/5407/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7945/ for details (Mellanox internal link).

@yosefe
Copy link
Contributor

yosefe commented Oct 14, 2018

bot:mlx:retest

which only supports sync callback
(i.e., only the @ref UCT_IFACE_FLAG_CB_SYNC flag is set),
it will behave exactly like a sync callback. */
UCT_CB_FLAG_DEPRECATED = UCS_BIT(1), /**< Deprecated value. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UCT_CB_FLAG_RESERVED /* reserved for future use */

(i.e., only the @ref UCT_IFACE_FLAG_CB_SYNC flag is set),
it will behave exactly like a sync callback. */
UCT_CB_FLAG_DEPRECATED = UCS_BIT(1), /**< Deprecated value. */
UCT_CB_FLAG_ASYNC = UCS_BIT(2) /**< Callback may be invoked from any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls indent on column

status = uct_iface_query(tl_iface, &attr);
if (status != UCS_OK) {
return status;
}

if (flags & UCT_CB_FLAG_DEPRECATED) {
ucs_error("Deprecated flags value");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Unsupported callback flag 0x%x"

@@ -412,6 +412,10 @@ UCS_CLASS_INIT_FUNC(uct_base_iface_t, uct_iface_ops_t *ops, uct_md_h md,

UCS_CLASS_CALL_SUPER_INIT(uct_iface_t, ops);

if (params->err_handler_flags & UCT_CB_FLAG_DEPRECATED) {
return UCS_ERR_INVALID_PARAM;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Unsupported callback flag 0x%x"
maybe wrap this in a macro to avoid code duplication with am_handler flags check

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7954/ for details (Mellanox internal link).

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7957/ for details (Mellanox internal link).

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/5411/ for details.

@yosefe
Copy link
Contributor

yosefe commented Oct 15, 2018

@shamisp @gmegan @hjelmn pls take a look

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7960/ for details (Mellanox internal link).

@swx-jenkins1
Copy link

Test FAILed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/5414/ for details.

@swx-jenkins1
Copy link

Test PASSed.
See http://bgate.mellanox.com/jenkins/job/gh-ucx-pr/5416/ for details.

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7962/ for details (Mellanox internal link).

@shamisp
Copy link
Contributor

shamisp commented Oct 15, 2018

👍

@evgeny-leksikov
Copy link
Contributor Author

Not related failures should be fixed by #2958
bot:mlx:retest

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7969/ for details (Mellanox internal link).

@evgeny-leksikov
Copy link
Contributor Author

timed out
bot:mlx:retest

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7977/ for details (Mellanox internal link).

@evgeny-leksikov
Copy link
Contributor Author

#2958
bot:mlx:retest

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7979/ for details (Mellanox internal link).

@evgeny-leksikov
Copy link
Contributor Author

bot:mlx:retest

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7982/ for details (Mellanox internal link).

@evgeny-leksikov
Copy link
Contributor Author

bot:mlx:retest

@mellanox-github
Copy link
Contributor

Test FAILed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7987/ for details (Mellanox internal link).

@evgeny-leksikov
Copy link
Contributor Author

bot:mlx:retest

@mellanox-github
Copy link
Contributor

Test PASSed.
See http://hpc-master.lab.mtl.com:8080/job/hpc-ucx-pr/7995/ for details (Mellanox internal link).

@evgeny-leksikov
Copy link
Contributor Author

good to go?

@yosefe yosefe merged commit a90c731 into openucx:master Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants