Repository navigation
Conversation
| nl = get_arkouda_numlocales() | ||
| (ArkoudaTest.server, ArkoudaTest.port, ArkoudaTest.ak_server) = start_arkouda_server(nl) | ||
| nl = int(get_arkouda_numlocales()) | ||
| start_arkouda_server(numlocales=nl, host=ArkoudaTest.server, port=ArkoudaTest.port) |
There was a problem hiding this comment.
FYI this breaks our nightly XC and CS testing. The original motivation for start_arkouda_server is to launch the server, and once the server is up and running have it report the hostname and port back via a file, since on clusters/supercomputers you don't know the host ahead of time. e.g. if I'm running on cori, you'll only know the server hostname once you've made it through the slurm queue and been given your nodes.
I think you could just stop passing the server to start_arkouda_server -- I'm not sure when you would need that in full stack mode.
There was a problem hiding this comment.
@ronawho oh wow, okay, I can take this out or set server to None. I put it in there because I am pretty sure that specifying the server was being added to Chapel and I wanted to enable configuration of the host (hostname or IP address) for situations where the are multiple NICs for the host.
There was a problem hiding this comment.
@ronawho okay, made it so the host can be none. Is passing in the ServerPort param okay:
`cmd = [get_arkouda_server(),
'--logging={}'.format('true' if log else 'false'),
'--v={}'.format('true' if verbose else 'false'),
'--serverConnectionInfo={}'.format(connection_file),
'-nl {}'.format(numlocales), '--ServerPort={}'.format(port)]`
Please confirm and I'll wrap up these updates and submit a pull request.
There was a problem hiding this comment.
Think I'm missing something -- looks like that's the same code that's on master
There was a problem hiding this comment.
@ronawho yes, it was merged into the master yesterday.
There was a problem hiding this comment.
ooh, sorry -- I misread, I thought you were asking me if this new code snippet looked ok, but you were just asking if the code on master that passes the port is ok.
Yeah, we don't do anything with the port, that change is good.
| try: | ||
| nl = get_arkouda_numlocales() | ||
| (ArkoudaTest.server, ArkoudaTest.port, ArkoudaTest.ak_server) = start_arkouda_server(nl) | ||
| nl = int(get_arkouda_numlocales()) |
There was a problem hiding this comment.
Nit but get_arkouda_numlocales() should already return an int
There was a problem hiding this comment.
Good point, will clean this up.
| import subprocess, os, signal | ||
| from context import arkouda as ak | ||
| from util.test.util import start_arkouda_server, stop_arkouda_server, get_arkouda_numlocales | ||
| from util.test.util import get_arkouda_server, get_arkouda_numlocales,\ |
There was a problem hiding this comment.
Unused get_arkouda_server import
| ARKOUDA_SERVER_HOST=localhost | ||
| ARKOUDA_SERVER_PORT=5555 | ||
| ARKOUDA_FULL_STACK_TEST=True | ||
| ARKOUDA_NUMLOCALES=2 |
There was a problem hiding this comment.
In our nightly XC/CS testing we export ARKOUDA_NUMLOCALES=16 -- does the env var take priority, or does the value in the .ini file? (Based on a quick test it seems like the value in the ini file)
There was a problem hiding this comment.
Deferring to you for pytest expertise, but maybe we can prefix these with D: to not override command line settings?
There was a problem hiding this comment.
@ronawho You are correct and it sounds like it's dorking up your nightly test so I will take that out of pytest.ini.
There was a problem hiding this comment.
I'm fine leaving it in if the .ini style is what python programmers will be used to. I think it'd just need to be D:ARKOUDA_NUMLOCALES=2 so that command line settings won't be overwritten
| (ArkoudaTest.server, ArkoudaTest.port, ArkoudaTest.ak_server) = start_arkouda_server(nl) | ||
| nl = int(get_arkouda_numlocales()) | ||
| start_arkouda_server(numlocales=nl, host=ArkoudaTest.server, port=ArkoudaTest.port) | ||
| print('Started arkouda_server in full stack test mode') |
There was a problem hiding this comment.
If you're making changes, would you mind adding the number of locales to this print statement just so it's easy to see how many are being used?
Fix a bug that prevents `tests/optioned-server/conftest.py` added in #4391 from connecting to the server that's not on "localhost". While there, clarify the handling of the server host and port in the test suites: * "Host" that comes from a command-line argument or environment variable and defaults to `localhost` is used only in the CLIENT running mode. * "Host" is obtained from `start_arkouda_server()`, which reads it from `ak-server-info` that's created by the server, in GLOBAL_SERVER and CLASS_SERVER modes. * "Port" comes from a command-line argument or environment variable and defaults to 5555; the port produced by `start_arkouda_server()` is expected to be the same. The testing frameworks store the host and the port for use in `ak.connect()` as follows: | suite | tests/ | benchmarks/ | benchmark_v2/ | | :-- | :-- | :-- | :-- | | host | `pytest.server` | `get_server_info()` | `pytest.host` | | port | `pytest.port` | `get_server_info()` | `pytest.port` | | file | conftest.py | run_benchmarks.py | conftest.py | The `host` argument of `start_arkouda_server()` has not been used for its [intended purpose](https://github.com/Bears-R-Us/arkouda/pull/374/files#r427210331) since it was added in #374. I propose to remove it, which will increase the clarity of code. --------- Signed-off-by: Vassily Litvinov <[email protected]>
No description provided.