Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit b9c6dea

Browse files
Revert "[move] Cleaning up move API (#175)" (#176)
This reverts commit b7b1118.
1 parent b7b1118 commit b9c6dea

37 files changed

+845
-540
lines changed

.devcontainer/devcontainer.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"build": {
3-
"dockerfile": "Dockerfile"
4-
},
5-
"runArgs": [
6-
"--cap-add=SYS_PTRACE",
7-
"--security-opt",
8-
"seccomp=unconfined"
9-
],
10-
"postCreateCommand": "bash .devcontainer/install_spack.sh",
11-
"userEnvProbe": "loginShell",
12-
"extensions": [
13-
"ms-vscode.cpptools-extension-pack"
14-
]
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"runArgs": [
6+
"--cap-add=SYS_PTRACE",
7+
"--security-opt",
8+
"seccomp=unconfined"
9+
],
10+
"postCreateCommand": "bash .devcontainer/install_spack.sh",
11+
"userEnvProbe": "loginShell",
12+
"extensions": [
13+
"ms-vscode.cpptools-extension-pack"
14+
]
1515
}

.github/workflows/ifpen_devenv_2021b.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ env:
4646
CT_OPTS: "--timeout 300 --output-on-failure"
4747

4848
jobs:
49-
build:
49+
build :
5050
name: ${{matrix.config.name}}
5151
runs-on: ubuntu-latest
5252
timeout-minutes: 120

CHANGELOG.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ All notable changes to this project will be documented in this file.
1818

1919
- \[move\]: add a `clone()` method to `MatrixData` and `VectorData`
2020
- \[core\]: dramatic improvement of `DoK` performance
21-
- \[core\]: `Redistributor` object must be built from an
22-
allocated `MessagePassingMng`
21+
- \[core\]: `Redistributor` object must be built from an allocated `MessagePassingMng`
2322
- \[trilinos\]: new wrapper for trilinos library (belos + ifpack2 + tpetra)
2423
- \[hypre\]: GPU support.
2524

@@ -39,16 +38,14 @@ All notable changes to this project will be documented in this file.
3938

4039
**Changes:**
4140

42-
- plugins are now part of Alien distribution. That means that
43-
only `find_package(Alien)` is necessary.
41+
- plugins are now part of Alien distribution. That means that only `find_package(Alien)` is necessary.
4442

4543
## 1.1.1
4644

4745
**Fixed bugs:**
4846

4947
- \[core, hypre, petsc\]: fix CMake export files
50-
- \[petsc\]: internal call to PetscInitialize (
51-
fixes [issue#14](https://github.com/arcaneframework/alien/issues/14))
48+
- \[petsc\]: internal call to PetscInitialize (fixes [issue#14](https://github.com/arcaneframework/alien/issues/14))
5249

5350
**Changes:**
5451

@@ -66,5 +63,4 @@ All notable changes to this project will be documented in this file.
6663

6764
- switch to mono-repo for all Alien related projects
6865
- `move` api is now in `Alien::Move` namespace
69-
- Setting CMake parameter `ALIEN_DEFAULT_OPTIONS` to `OFF` disable all optional
70-
external dependencies
66+
- Setting CMake parameter `ALIEN_DEFAULT_OPTIONS` to `OFF` disable all optional external dependencies

CMake/syclcc-launcher

+33-33
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,40 @@ CXX_COMPILER_ARG = '--launcher-cxx-compiler='
3737
SYCLCC_ARG = '--launcher-syclcc='
3838

3939
if __name__ == '__main__':
40-
syclcc_specific_args = []
41-
command_offset = None
42-
cxx_compiler_exe = None
43-
syclcc_exe = None
44-
for command_offset, arg in enumerate(sys.argv[1:], 1):
45-
if arg.startswith(CXX_COMPILER_ARG):
46-
cxx_compiler_exe = arg[len(CXX_COMPILER_ARG):]
47-
elif arg.startswith(SYCLCC_ARG):
48-
# Split by non-path char, as on Windows it is required to run python path/to/syclcc,
49-
# instead of just syclcc. As we need "python" and "syclcc" two different array elements
50-
# in the config, a '*' is used to seperate those two elements.
51-
syclcc_exe = arg[len(SYCLCC_ARG):].split("*")
52-
elif arg == '--':
53-
command_offset += 1
54-
break
55-
elif arg.startswith('-'):
56-
syclcc_specific_args.append(arg)
57-
else:
58-
break
40+
syclcc_specific_args = []
41+
command_offset = None
42+
cxx_compiler_exe = None
43+
syclcc_exe = None
44+
for command_offset, arg in enumerate(sys.argv[1:], 1):
45+
if arg.startswith(CXX_COMPILER_ARG):
46+
cxx_compiler_exe = arg[len(CXX_COMPILER_ARG):]
47+
elif arg.startswith(SYCLCC_ARG):
48+
# Split by non-path char, as on Windows it is required to run python path/to/syclcc,
49+
# instead of just syclcc. As we need "python" and "syclcc" two different array elements
50+
# in the config, a '*' is used to seperate those two elements.
51+
syclcc_exe = arg[len(SYCLCC_ARG):].split("*")
52+
elif arg == '--':
53+
command_offset += 1
54+
break
55+
elif arg.startswith('-'):
56+
syclcc_specific_args.append(arg)
57+
else:
58+
break
5959

60-
if cxx_compiler_exe is None or syclcc_exe is None or command_offset is None or command_offset + 1 >= len(sys.argv) \
61-
or '--help' in syclcc_specific_args:
62-
print('Usage: {} {}<path> {}<path> [syclcc-specific-args...] '
63-
'command [command-args...]'.format(sys.argv[0], CXX_COMPILER_ARG, SYCLCC_ARG), file=sys.stderr)
64-
sys.exit(1)
60+
if cxx_compiler_exe is None or syclcc_exe is None or command_offset is None or command_offset + 1 >= len(sys.argv) \
61+
or '--help' in syclcc_specific_args:
62+
print('Usage: {} {}<path> {}<path> [syclcc-specific-args...] '
63+
'command [command-args...]'.format(sys.argv[0], CXX_COMPILER_ARG, SYCLCC_ARG), file=sys.stderr)
64+
sys.exit(1)
6565

66-
command_in = sys.argv[command_offset]
67-
command_in_args = sys.argv[command_offset + 1:]
66+
command_in = sys.argv[command_offset]
67+
command_in_args = sys.argv[command_offset + 1:]
6868

69-
# When invoked with a command line for expected compiler (e.g. clang++), replace with a syclcc invocation.
70-
# Otherwise, e.g. for invocations of `ar` for linking static libraries, just continue with the command as-is.
71-
if os.path.samefile(cxx_compiler_exe, command_in):
72-
command_line = [*syclcc_exe, *syclcc_specific_args, *command_in_args]
73-
else:
74-
command_line = [command_in, *command_in_args]
69+
# When invoked with a command line for expected compiler (e.g. clang++), replace with a syclcc invocation.
70+
# Otherwise, e.g. for invocations of `ar` for linking static libraries, just continue with the command as-is.
71+
if os.path.samefile(cxx_compiler_exe, command_in):
72+
command_line = [*syclcc_exe, *syclcc_specific_args, *command_in_args]
73+
else:
74+
command_line = [command_in, *command_in_args]
7575

76-
sys.exit(subprocess.run(command_line).returncode)
76+
sys.exit(subprocess.run(command_line).returncode)

CMakePresets.json

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
{
2424
"name": "full",
2525
"generator": "Ninja",
26+
"binaryDir": "${sourceDir}/build/full",
2627
"cacheVariables": {
2728
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
2829
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
@@ -55,6 +56,7 @@
5556
{
5657
"name": "dev-debug",
5758
"inherits": "dev-full",
59+
"binaryDir": "${sourceDir}/build/debug",
5860
"cacheVariables": {
5961
"CMAKE_BUILD_TYPE": "Debug",
6062
"ALIEN_EXPAND_TESTS": "ON"

benchmark/src/alien/benchmark/MatrixMarketProblem.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ MatrixMarketProblem::MatrixMarketProblem(Arccore::MessagePassing::IMessagePassin
3939
, m_rhs(m_matrix.distribution().rowDistribution())
4040
{
4141
Alien::Move::LocalVectorWriter v_builder = std::move(m_rhs);
42-
for (int i = 0; i < v_builder.size(); i++) {
42+
for (int i = 0 ; i < v_builder.size() ; i++) {
4343
v_builder[i] = 1.0;
4444
}
4545
m_rhs = v_builder.release();
@@ -55,6 +55,7 @@ Alien::Move::VectorData MatrixMarketProblem::vector() const
5555
return m_rhs.clone();
5656
}
5757

58+
5859
std::unique_ptr<ILinearProblem> buildFromMatrixMarket(Arccore::MessagePassing::IMessagePassingMng* pm, const std::string& matrix_name, const std::string& rhs_name)
5960
{
6061
if (rhs_name == "") {

0 commit comments

Comments
 (0)