Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
191 commits
Select commit Hold shift + click to select a range
1136a2b
I propose to empirically find the m_maxSrs (maximum number of send re…
KADichev Aug 20, 2024
219372a
Decrease the number of messages to use for same reason as the decreas…
KADichev Aug 20, 2024
37cd6eb
Trying to modernize LPF to use FindGTest/GoogleTest combination, but …
KADichev Aug 27, 2024
2886606
Make tests compile again
KADichev Aug 28, 2024
c7dbc7d
In a middle of a big mess of changes, which I hope will end well
KADichev Aug 30, 2024
9eab088
Working my way through Gtest-ifying the tests
KADichev Aug 30, 2024
47294a7
Finished porting functional tests to gtest
KADichev Aug 30, 2024
359c512
Added a script converting the source line with P into a process count…
KADichev Aug 30, 2024
7319765
Fixing how the default process count is parsed (some parsing errors) …
KADichev Aug 30, 2024
02b14d8
Fix reading in probe argument, plus use lpfrun now instead of mpirun …
KADichev Sep 4, 2024
e8052c1
Finished with the tests/functional directory, tests passing. Now star…
KADichev Sep 4, 2024
71c1785
Commit current state as I can't deal with this enormous change
KADichev Sep 6, 2024
2c98499
Compiles again, will not run okay because of EXPECT_DEATH + MPI
KADichev Sep 6, 2024
e2a758d
Slow progress, now I need to implement in my Python script the differ…
KADichev Sep 6, 2024
7220e76
Almost got it, now need to fix the debug tests not to issue EXPECT_DE…
KADichev Sep 6, 2024
6f84f8f
Use GoogleTest but without death tests
KADichev Sep 8, 2024
80f0392
Got IB Verbs tests to work again by setting LPF_MPI_AUTO_INITIALIZE=0…
KADichev Sep 10, 2024
758b8de
All tests passing now - omitting the huge runs
KADichev Sep 10, 2024
4021f1f
Rename c99 folder to collectives, as the folder tests collectives, an…
KADichev Sep 10, 2024
703fde7
First step towards making it work for many engines
KADichev Sep 11, 2024
d6eebab
Go back to only ibverbs for now, have to think how to fix this
KADichev Sep 11, 2024
7081c78
This version runs all tests, but fails because I need one more fix --…
KADichev Sep 13, 2024
3cd577a
Oops, missing test
KADichev Sep 13, 2024
8cdfa67
Working on having different aborts for MPI and pthreads. Unfortunatel…
KADichev Sep 14, 2024
4db403d
I think I figured how to tell hybrid engine to call MPI abort without…
KADichev Sep 14, 2024
6efc47e
Request CMake 3.29 if building with tests, and clean up a bit bootstr…
KADichev Sep 16, 2024
2f42d4c
Improve Pthread abort to return exit(6) instead of calling std::abort…
KADichev Sep 16, 2024
afa1043
I am for now removing the gtest_discover_tests call because ultimatel…
KADichev Sep 17, 2024
15aea88
Eliminate remaining DEATH statements in debug folder
KADichev Sep 17, 2024
bfafa5f
A very annoying bug that took ages to find.
KADichev Sep 17, 2024
33c481d
Revert "Decrease the number of messages to use for same reason as the…
KADichev Sep 23, 2024
50cabd1
Revert "I propose to empirically find the m_maxSrs (maximum number of…
KADichev Sep 23, 2024
e3a20c9
Small fix to keep the refactored IBVerbs tests but still revert the t…
KADichev Sep 23, 2024
aba136a
Start with a template provided by Orestis
KADichev Sep 23, 2024
7228e38
Simplify script
KADichev Sep 23, 2024
920a932
Slurm submission script
KADichev Sep 23, 2024
f31ac49
adding '-no-auto-init' option to avoid automatic LPF initialization (…
alberto-scolari Sep 11, 2023
591a0d7
Some initial changes that improve clarity and removes typos (#9)
anyzelman Sep 11, 2023
216a8f5
I propose to empirically find the m_maxSrs (maximum number of send re…
KADichev Aug 20, 2024
a254ea6
Decrease the number of messages to use for same reason as the decreas…
KADichev Aug 20, 2024
9020af0
Trying to modernize LPF to use FindGTest/GoogleTest combination, but …
KADichev Aug 27, 2024
22dd045
Make tests compile again
KADichev Aug 28, 2024
9820b05
In a middle of a big mess of changes, which I hope will end well
KADichev Aug 30, 2024
9a5d625
Working my way through Gtest-ifying the tests
KADichev Aug 30, 2024
6b0dc42
Finished porting functional tests to gtest
KADichev Aug 30, 2024
be0a040
Added a script converting the source line with P into a process count…
KADichev Aug 30, 2024
0e369d6
Fixing how the default process count is parsed (some parsing errors) …
KADichev Aug 30, 2024
8bf284f
Fix reading in probe argument, plus use lpfrun now instead of mpirun …
KADichev Sep 4, 2024
615104b
Finished with the tests/functional directory, tests passing. Now star…
KADichev Sep 4, 2024
6d56168
Commit current state as I can't deal with this enormous change
KADichev Sep 6, 2024
a93a73e
Compiles again, will not run okay because of EXPECT_DEATH + MPI
KADichev Sep 6, 2024
77a3134
Slow progress, now I need to implement in my Python script the differ…
KADichev Sep 6, 2024
c1ddd7d
Almost got it, now need to fix the debug tests not to issue EXPECT_DE…
KADichev Sep 6, 2024
1b75409
Use GoogleTest but without death tests
KADichev Sep 8, 2024
c026fd5
Got IB Verbs tests to work again by setting LPF_MPI_AUTO_INITIALIZE=0…
KADichev Sep 10, 2024
c511551
All tests passing now - omitting the huge runs
KADichev Sep 10, 2024
441ba10
Rename c99 folder to collectives, as the folder tests collectives, an…
KADichev Sep 10, 2024
f87ea26
First step towards making it work for many engines
KADichev Sep 11, 2024
774f20b
Go back to only ibverbs for now, have to think how to fix this
KADichev Sep 11, 2024
f440fb4
This version runs all tests, but fails because I need one more fix --…
KADichev Sep 13, 2024
3dcfb59
Oops, missing test
KADichev Sep 13, 2024
efa80be
Working on having different aborts for MPI and pthreads. Unfortunatel…
KADichev Sep 14, 2024
a3f0cb3
I think I figured how to tell hybrid engine to call MPI abort without…
KADichev Sep 14, 2024
b9ef53b
Request CMake 3.29 if building with tests, and clean up a bit bootstr…
KADichev Sep 16, 2024
89aa7ba
Improve Pthread abort to return exit(6) instead of calling std::abort…
KADichev Sep 16, 2024
98c54df
I am for now removing the gtest_discover_tests call because ultimatel…
KADichev Sep 17, 2024
7793bc7
Eliminate remaining DEATH statements in debug folder
KADichev Sep 17, 2024
2261d28
A very annoying bug that took ages to find.
KADichev Sep 17, 2024
b0f17cc
Revert "Decrease the number of messages to use for same reason as the…
KADichev Sep 23, 2024
2dc2f98
Revert "I propose to empirically find the m_maxSrs (maximum number of…
KADichev Sep 23, 2024
5207a6c
Small fix to keep the refactored IBVerbs tests but still revert the t…
KADichev Sep 23, 2024
bef255e
Typos and cleanup
KADichev Sep 23, 2024
4c0286e
Spack env has different name
KADichev Sep 23, 2024
a639011
Use Reframe sequential (shell) script to launch ctest, and prerun_cmd…
KADichev Sep 23, 2024
3b732d6
Migrate to Gitlab runner space
KADichev Sep 26, 2024
fc13f9c
Migrate to Gitlab runner space
KADichev Sep 26, 2024
59873b9
Use gitlab runner working dirs
KADichev Sep 26, 2024
7160248
Use gitlab runner working dirs
KADichev Sep 26, 2024
6e679ea
Gitlab runner has arm env
KADichev Sep 26, 2024
8a8f622
Update .gitlab-ci.yml file
KADichev Sep 26, 2024
0abb9c6
Reduce some failing tests in size
Sep 26, 2024
ebcdfc6
Try to get N cores and not just N tasks on 1 core
KADichev Sep 26, 2024
bc0350a
Try to get the paths right
KADichev Sep 26, 2024
02ea63a
Try to fetch results
KADichev Sep 27, 2024
d5fa76b
Typo
KADichev Sep 27, 2024
1ae731b
Separate the ibv_post_send and ibv_poll_cq into different functions, …
KADichev Sep 20, 2023
193954a
Extended LPF to expose lpf_get_rcvd_msg_count function. Also halfway …
KADichev Sep 25, 2023
6a5a16a
ibv_post_recv in new version fails at reconnectQPs
KADichev Sep 25, 2023
bcad077
This version completes with HiCR, but still does not register ANY rec…
KADichev Sep 25, 2023
12e113e
Very importantly, remove sleeps in the progress engine, as this leads…
KADichev Sep 28, 2023
7abb9f8
Enable functionality to associate a received message with its memory …
KADichev Oct 2, 2024
02b862a
Change IBVerbs::put to accept an original slot ID and the possibly mo…
KADichev Oct 1, 2023
f6d3075
These changes completely remove the synchronisation of LPF. Now LPF p…
KADichev Oct 4, 2023
658fb63
Clean up a bit
KADichev Oct 4, 2023
921d9f7
Main changes here: 1) Implemented a round-robin put-based allgatherv …
KADichev Oct 13, 2023
a340ae6
Minor cleanup
KADichev Oct 17, 2023
d467a20
For now, bring back the allreduce for a) resize b) abort into sync, a…
KADichev Oct 20, 2023
3a4c26b
This commit removes the check on abort from the sync call altogether,…
KADichev Oct 20, 2023
de2aa6d
This commit removes the exchange of resize memreg/messages via allred…
KADichev Oct 20, 2023
37bc788
Add the lpf_flush function to LPF, which makes sure for IB verbs that…
KADichev Oct 25, 2023
28d542c
Update CMakeLists.txt
KADichev Oct 25, 2023
a151649
Add support for counting sent messages, and for tagged synchronizatio…
KADichev Nov 8, 2023
b391906
Fix bugs in counting slot messages. Now countingSyncPerSlot should wo…
KADichev Nov 15, 2023
0034546
Remove debug msg
KADichev Nov 15, 2023
adf2db0
Start work on compare and swap
KADichev Nov 23, 2023
49e1265
The attributes retry_cnt and rnr_retry were set to 6 and 0 for develo…
KADichev Nov 26, 2023
157bf2d
Make lookup of message counters pure lookup, no polling. This is tric…
KADichev Nov 29, 2023
02d7b57
Some very early documentation of the extensions in lpf/core.h, used i…
KADichev Dec 15, 2023
cfe0067
Minor improvements - use ibv_destroy explicitly in shared_ptr reset c…
KADichev Jan 4, 2024
79c6ddf
Remove debug output
KADichev Jan 5, 2024
8d25334
It seems to me that m_numMsgs was a wrong counter which included init…
KADichev Jan 13, 2024
0bba0af
Add as backup semi-finished compare-and-swap example
KADichev Feb 13, 2024
2226cf8
Compare and swap not passing tests on Docker. Try on host
KADichev Feb 26, 2024
7eefc3e
Compare and swap not passing tests on Docker. Try on host
KADichev Feb 26, 2024
90e867a
Finally, a compare-and-swap based version of a global mutex that work…
KADichev Mar 1, 2024
8a570e5
Improvements for atomic compare-and-swap operation. Among them, now c…
KADichev Mar 5, 2024
d1549b5
Reorganize IBVerbs::get to register an Op::GET event. Sends are now b…
KADichev Mar 11, 2024
e302f35
Separate flushing into two types of flushing -- flush send queues, an…
KADichev Mar 20, 2024
9d06c1b
A very important fix to register correctly messages received from a r…
KADichev Mar 26, 2024
185ad8a
Part 2: Fix to register both receives from put into remote queue, as …
KADichev Mar 26, 2024
0ef93bf
A modification replacing hash tables with arrays for all the counters…
KADichev May 21, 2024
a7833c6
WIP to merge hicr and main branch. Main goal: Have hicr as a new engi…
KADichev Aug 2, 2024
9da9752
This compiles, no idea if it works
KADichev Aug 13, 2024
b209202
Still working on getting LPF IB verbs tests to pass.
KADichev Aug 14, 2024
9a48154
Towards working version
KADichev Aug 14, 2024
ab8fe50
Minor alignment of ibverbs*, but a major fix in src/MPI/CMakeLists.tx…
KADichev Aug 15, 2024
6da0d2f
Minor
KADichev Aug 16, 2024
f802713
Towards merge
KADichev Sep 30, 2024
b626d07
Try to rebase so that both the refactoring of unit tests and the new …
KADichev Aug 28, 2024
9cbdf4d
Rebasing new unit testing on top of new zero engine for LPF
KADichev Aug 30, 2024
d173795
Working on having different aborts for MPI and pthreads. Unfortunatel…
KADichev Sep 14, 2024
0b1f7c3
I think I figured how to tell hybrid engine to call MPI abort without…
KADichev Sep 14, 2024
a0c5f04
Request CMake 3.29 if building with tests, and clean up a bit bootstr…
KADichev Sep 16, 2024
a1a322b
Improve Pthread abort to return exit(6) instead of calling std::abort…
KADichev Sep 16, 2024
f895928
Separate out the zero-backend and the related IBVerbs-backend into se…
KADichev Oct 2, 2024
a665d71
Minor fixes
KADichev Oct 2, 2024
d341c3a
No hicr engine, but zero engine
KADichev Oct 2, 2024
164412b
Fix rebasing
KADichev Oct 2, 2024
538e5b1
Fix incorrect rebase
KADichev Oct 2, 2024
b076959
Don't run Pthread or Hybrid tests for now, they are not essential
KADichev Oct 4, 2024
c05a81f
Try to pass argument with quotes
KADichev Oct 4, 2024
34945c0
Fix two bugs: 1) reconnecte sometimes not being called, now it is alw…
KADichev Oct 4, 2024
9d1e89a
This commit fixes following issues: 1) The getHuge and putHuge exampl…
KADichev Oct 7, 2024
3f463c0
Filter out failing tests for zero engine, and add explanation in the …
KADichev Oct 8, 2024
fbe9e71
Document new zero engine functions in include/lpf/core.h, up the vers…
KADichev Oct 8, 2024
376fef4
Always refer to current branch -- might not work without new token
KADichev Oct 8, 2024
fe10185
Remove debug statement
KADichev Oct 9, 2024
f9d91d6
Bring back the capability of downloading and installing GoogleTest, i…
KADichev Oct 11, 2024
c0d8d28
Bring back GoogleTest download functionality
KADichev Oct 11, 2024
da922d5
Reflect changes to require CMake 3.29 and C++17 standard compatible c…
KADichev Oct 11, 2024
6143340
Resolve some compiler warnings
anyzelman Oct 11, 2024
a8da59e
Remove the cmake/mpi_open_port.c test, because this test passes both …
KADichev Oct 15, 2024
89d7001
Remove the disabling of IB Verbs -- it was only meant to test setup o…
KADichev Oct 15, 2024
d39d2cd
Use the latest IBVerbs test suite, which explicitly asks IBVerbs abou…
KADichev Oct 15, 2024
7fecf7c
Dramatic improvement in test generation time. Do not use anymore bash…
KADichev Oct 16, 2024
ec0a6e9
Do not generate IB Verbs tests if no Infiniband device is found
Oct 19, 2024
125631d
Unfortunately, I need to fix the setting for our cluster, where just …
KADichev Oct 19, 2024
2d7211c
Slightly improve the fix for single-process run to list tests
Oct 19, 2024
a08c0c5
Avoid one compiler warning (narrowing)
anyzelman Oct 21, 2024
4a6c887
Gtest macros implicitly causing ambiguous else-statements, fixed
anyzelman Oct 21, 2024
ca6d8c5
The test directly inspects the return code, rather than storing it in…
anyzelman Oct 21, 2024
99ac217
Suppress an unused-variable warning
anyzelman Oct 21, 2024
810a42a
The dynamic hook test was not fully GoogleTest compliant. Now it is. …
KADichev Oct 21, 2024
7c81328
Reduce to C++11 standard without tests, C++17 with tests
KADichev Oct 21, 2024
0a3c5cd
Albert Jan reported non-deterministic issues with pthread backend. Af…
KADichev Oct 23, 2024
540a91b
Bring back GoogleTest license agreement dialogue
KADichev Oct 23, 2024
eb245e7
Suppress some warnings encountered by GCC 11.5
anyzelman Oct 23, 2024
30cc344
Do some cleanup of gtest building macros in the CMake files. Also, do…
KADichev Oct 23, 2024
a606a1a
Minimal comment for internal abort
KADichev Oct 23, 2024
13ee0e8
Format all tests using clang-formatter in default mode
KADichev Oct 23, 2024
d32bc6b
Accept their changes plus use formatting with Clang
KADichev Oct 23, 2024
516405c
Albert Jan reported non-deterministic issues with pthread backend. Af…
KADichev Oct 23, 2024
a9b7419
Bring back GoogleTest license agreement dialogue
KADichev Oct 23, 2024
ba74e81
Various refactoring of test macros in CMakeLists.txt files for final …
KADichev Oct 26, 2024
5642874
Merge branch 'functional_tests_use_gtest' into fix_formatting_and_exp…
KADichev Oct 28, 2024
b46bf4f
Merge branch 'functional_tests_use_gtest' of github.com:Algebraic-Pro…
KADichev Oct 29, 2024
b746950
Resolving a few more merge issues. Now running and passing all 163/16…
KADichev Oct 29, 2024
67b75ab
Use read_repository token instead of write_repository token
KADichev Oct 29, 2024
32c2654
Functional tests use GoogleTest now (#26)
KADichev Dec 2, 2024
1f37ba1
Update test to include zero engine flag
KADichev Dec 19, 2024
ef56569
Merge remote-tracking branch 'origin/master'
KADichev Dec 20, 2024
a0373b6
Remove test which is a copy of allreduce with no modifications
KADichev Dec 20, 2024
565cc0e
zero engine not added after merte with master - fix that. Also, fix one
KADichev Dec 20, 2024
6e97edb
Replace hard-coded token with PAC read from env of Gitlab runner user
KADichev Dec 20, 2024
d792f5e
This commit fixes a bug in the zero-cost synchronization method count…
KADichev Jan 23, 2025
66ad0c2
This commit fixes https://github.com/Algebraic-Programming/LPF/issues…
KADichev Jan 23, 2025
3e48ec0
Not needed
KADichev Feb 4, 2025
3dfd153
Remove site-specific scripts and flows
anyzelman Feb 6, 2025
945ac55
The norm (somehow) is to retain the original copyright year in copyri…
anyzelman Feb 6, 2025
520c12a
Fix inconsistent spacing (already present in master, not due to this MR)
anyzelman Feb 6, 2025
df95e1d
Fix formatting issue
anyzelman Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ if ( LIB_MATH AND LIB_DL AND MPI_FOUND )
endif()

if (ENABLE_IBVERBS)
list(APPEND ENGINES "ibverbs")
list(APPEND ENGINES "ibverbs" "zero")
endif()

endif()
Expand Down
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Implementation
1) BSMP
2) Collectives
3) Pthread implementation
- 2022 - 2024, Kiril Dichev
1) Develop zero engine for LPF

- 2018, Pierre Leca
1) Usability improvements of compiler frontends and CMake integration
Expand All @@ -50,6 +52,8 @@ Quality Assurance

- 2015 - 2017, Albert-Jan Yzelman
1) Performance test suite
- 2022 - 2024, Kiril Dichev
1) Rewrite all functional tests to use CTest/Gtest


Miscellaneous / Acknowledgments
Expand Down
10 changes: 5 additions & 5 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ echo "--------------------------------------------------"
echo
${CMAKE_EXE} -Wno-dev \
-DCMAKE_INSTALL_PREFIX="$installdir" \
-DCMAKE_BUILD_TYPE=$config \
-DLPFLIB_MAKE_DOC=$doc \
-DLPFLIB_MAKE_TEST_DOC=$doc \
-DCMAKE_BUILD_TYPE=$config \
-DLPFLIB_MAKE_DOC=$doc \
-DLPFLIB_MAKE_TEST_DOC=$doc \
-DLPF_ENABLE_TESTS=$functests \
-DGTEST_AGREE_TO_LICENSE=$googletest_license_agreement \
-DLPFLIB_PERFTESTS=$perftests \
-DLPFLIB_CONFIG_NAME=${config_name:-${config}}\
-DLPFLIB_PERFTESTS=$perftests \
-DLPFLIB_CONFIG_NAME=${config_name:-${config}} \
-DLPF_HWLOC="${hwloc}" \
$hwloc_found_flag \
$mpi_cmake_flags \
Expand Down
9 changes: 9 additions & 0 deletions include/debug/lpf/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ extern "C" {
#define lpf_sync( ctx, attrs ) \
lpf_debug_sync( __FILE__, __LINE__, (ctx), (attrs) )

#define lpf_counting_sync_per_tag( ctx, attrs, slot, expected_sends, expected_rcvs ) \
lpf_debug_counting_sync_per_tag( __FILE__, __LINE__, (ctx), (attrs), (slot), (expected_sends), (expected_rcvs) )

#define lpf_sync_per_tag( ctx, attrs, slot) \
lpf_debug_sync_per_tag( __FILE__, __LINE__, (ctx), (attrs), (slot))

#define lpf_resize_memory_register( ctx, size ) \
lpf_debug_resize_memory_register( __FILE__, __LINE__, (ctx), (size) )

Expand Down Expand Up @@ -128,6 +134,9 @@ extern _LPFLIB_API
lpf_err_t lpf_debug_sync( const char * file, int line,
lpf_t ctx, lpf_sync_attr_t attr );

lpf_err_t lpf_debug_counting_sync_per_tag( const char * file, int line,
lpf_t ctx, lpf_sync_attr_t attr, lpf_memslot_t slot, size_t expected_sends, size_t expected_rcvs);

extern _LPFLIB_API
lpf_err_t lpf_debug_resize_memory_register( const char * file, int line,
lpf_t ctx, size_t max_regs );
Expand Down
10 changes: 10 additions & 0 deletions include/lpf/collectives.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ typedef void (*lpf_combiner_t) (size_t n, const void * combine, void * into );
*/
extern _LPFLIB_API const lpf_coll_t LPF_INVALID_COLL;

/**
* ToDo: document allgatherv
*/
lpf_err_t lpf_allgatherv(
lpf_coll_t coll,
lpf_memslot_t src,
lpf_memslot_t dst,
size_t *sizes,
bool exclude_myself
);
/**
* Initialises a collectives struct, which allows the scheduling of collective
* calls. The initialised struct is only valid after a next call to lpf_sync().
Expand Down
139 changes: 137 additions & 2 deletions include/lpf/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ extern "C" {
* released, and NN the number of the specifications released before this one in
* the same year.
*/
#define _LPF_VERSION 202000L
#define _LPF_VERSION 202400L

/**
* An implementation that has defined this macro may never define the
Expand Down Expand Up @@ -984,7 +984,7 @@ typedef struct lpf_machine {
* byte. This value may depend on the actual number of processes \a p used,
* the minimum message size \a min_msg_size the user aims to send and
* receive, and the type of synchronisation requested via \a attr. The
* value is bitwise equivalent across all processes.
* value is bitwise equivalent across all processes.
*
* \param[in] p A value between 1 and #lpf_machine_t.p, where
* both bounds are inclusive.
Expand Down Expand Up @@ -2060,6 +2060,25 @@ lpf_err_t lpf_get(
extern _LPFLIB_API
lpf_err_t lpf_sync( lpf_t ctx, lpf_sync_attr_t attr );

/**
* This synchronisation waits on memory slot #slot to complete sending
* and receiving @expected_sent and @expected_rcvd messages. The counts are
* checked in the ibv_poll_cq calls and associated to certain LPF slots.
* This call is only implemented for IB verbs at the moment.
*/
extern _LPFLIB_API
lpf_err_t lpf_counting_sync_per_slot( lpf_t ctx, lpf_sync_attr_t attr, lpf_memslot_t slot, size_t expected_sent, size_t expected_rcvd);

/**
* This synchronisation waits on memory slot #slot to complete sending
* or receiving all outstanding messages. For the current implementation
* in IB verbs, this means all scheduled sends via ibv_post_send are
* checked for completion via ibv_poll_cq. Currently, there is no logic
* scheduling receives, but only sends -- for either get or put.
*/
extern _LPFLIB_API
lpf_err_t lpf_sync_per_slot( lpf_t ctx, lpf_sync_attr_t attr, lpf_memslot_t slot);

/**
* This primitive allows a user to inspect the machine that this LPF program
* has been assigned. All resources reported in the #lpf_machine_t struct are
Expand Down Expand Up @@ -2317,6 +2336,122 @@ lpf_err_t lpf_resize_memory_register( lpf_t ctx, size_t max_regs );
extern _LPFLIB_API
lpf_err_t lpf_resize_message_queue( lpf_t ctx, size_t max_msgs );

/**
* This call blockingly locks a destination slot #dst_slot, relying
* on IBVerbs Compare-and-Swap atomics.
* For an example, check tests/functional/func_lpf_compare_and_swap.ibverbs.c
* It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
* \param[in] src_slot Local slot used as source for the
* operation to lock the destination slot, registered via lpf_register_local()
* \param[in] src_offset Source offset to use (0 in most cases)
* \param[in] dst_pid The process ID of the destination process
* \param[in] dst_slot The memory slot of the remote destination memory area
* registered via lpf_register_global().
* \param[in] dst_offset Destinaton offset (0 in most cases)
* \param[in] size The number of bytes to copy from the source memory area to
* the destination memory area (#lpf_memslot_t in most cases)
* \param[in] attr A #lpf_sync_attr_t value (use #LPF_MSG_DEFAULT)
* \returns #LPF_SUCCESS
* When this process successfully locks the slot
*/
extern _LPFLIB_API
lpf_err_t lpf_lock_slot(
lpf_t ctx,
lpf_memslot_t src_slot,
size_t src_offset,
lpf_pid_t dst_pid,
lpf_memslot_t dst_slot,
size_t dst_offset,
size_t size,
lpf_msg_attr_t attr
);

/**
* This call blockingly unlocks a destination slot #dst_slot, relying
* on IBVerbs Compare-and-Swap atomics.
* For an example, check tests/functional/func_lpf_compare_and_swap.ibverbs.c
* It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
* \param[in] src_slot Local slot used as source for the
* operation to lock the destination slot, registered via lpf_register_local()
* \param[in] src_offset Source offset to use (0 in most cases)
* \param[in] dst_pid The process ID of the destination process
* \param[in] dst_slot The memory slot of the remote destination memory area
* registered via lpf_register_global().
* \param[in] dst_offset Destinaton offset (0 in most cases)
* \param[in] size The number of bytes to copy from the source memory area to
* the destination memory area (#lpf_memslot_t in most cases)
* \param[in] attr A #lpf_sync_attr_t value (use #LPF_MSG_DEFAULT)
* \returns #LPF_SUCCESS
* When this process successfully locks the slot
*/
extern _LPFLIB_API
lpf_err_t lpf_unlock_slot(
lpf_t ctx,
lpf_memslot_t src_slot,
size_t src_offset,
lpf_pid_t dst_pid,
lpf_memslot_t dst_slot,
size_t dst_offset,
size_t size,
lpf_msg_attr_t attr
);

/**
* This function returns in @rcvd_msgs the received message count on
* LPF slot #slot. It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
* \param[out] rcvd_msgs Received message count
* \param[in] slot LPF slot to check received messages for
*/
extern _LPFLIB_API
lpf_err_t lpf_get_rcvd_msg_count_per_slot( lpf_t ctx, size_t *rcvd_msgs, lpf_memslot_t slot);

/**
* This function returns in @rcvd_msgs the total received message count.
* It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
* \param[out] rcvd_msgs Received message count
*/
extern _LPFLIB_API
lpf_err_t lpf_get_rcvd_msg_count( lpf_t ctx, size_t *rcvd_msgs);

/**
* This function returns in @sent_msgs the sent message count on LPF
* slot #slot. It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
* \param[out] sent_msgs Total messages sent on #slot
* \param[in] slot
*/
extern _LPFLIB_API
lpf_err_t lpf_get_sent_msg_count_per_slot( lpf_t ctx, size_t *sent_msgs, lpf_memslot_t slot);

/**
* This function blocks until all the scheduled messages via
* ibv_post_send are completed (via ibv_poll_cq). This includes
* both put and get calls on the local process.
* No concept of slots is used here.
* This allows to reuse the send buffers e.g. in higher-level channel
* libraries.
* It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
*/
extern _LPFLIB_API
lpf_err_t lpf_flush_sent( lpf_t ctx);

/**
* This function blocks until all the incoming received messages
* waiting on the receive completion queue are handled (via ibv_poll_cq).
* No concept of slots is used here.
* This allows to reuse the send buffers e.g. in higher-level channel
* libraries.
* It is only implemented for the zero backend (on Infiniband)
* \param[in] ctx The LPF context
*/
extern _LPFLIB_API
lpf_err_t lpf_flush_received( lpf_t ctx);

#ifdef __cplusplus
}
#endif
Expand Down
14 changes: 14 additions & 0 deletions include/lpf/static_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@
#undef lpf_get
#undef lpf_put
#undef lpf_sync
#undef lpf_counting_sync_per_slot
#undef lpf_sync_per_slot
#undef lpf_register_local
#undef lpf_get_rcvd_msg_count
#undef lpf_get_rcvd_msg_count_per_slot
#undef lpf_get_sent_msg_count_per_slot
#undef lpf_register_global
#undef lpf_flush_sent
#undef lpf_flush_received
#undef lpf_deregister
#undef lpf_probe
#undef lpf_resize_memory_register
Expand Down Expand Up @@ -85,7 +92,14 @@
#define lpf_get LPF_FUNC(get)
#define lpf_put LPF_FUNC(put)
#define lpf_sync LPF_FUNC(sync)
#define lpf_counting_sync_per_slot LPF_FUNC(counting_sync_per_slot)
#define lpf_sync_per_slot LPF_FUNC(sync_per_slot)
#define lpf_register_local LPF_FUNC(register_local)
#define lpf_get_rcvd_msg_count LPF_FUNC(get_rcvd_msg_count)
#define lpf_get_rcvd_msg_count_per_slot LPF_FUNC(get_rcvd_msg_count_per_slot)
#define lpf_get_sent_msg_count_per_slot LPF_FUNC(get_sent_msg_count_per_slot)
#define lpf_flush_sent LPF_FUNC(flush_sent)
#define lpf_flush_received LPF_FUNC(flush_received)
#define lpf_register_global LPF_FUNC(register_global)
#define lpf_deregister LPF_FUNC(deregister)
#define lpf_probe LPF_FUNC(probe)
Expand Down
8 changes: 4 additions & 4 deletions lpfrun.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function printhelp()
echo
echo " -engine <engine>"
echo " Allow you to choose the engine. Currently supported"
echo " are: pthread, mpirma, mpimsg, ibverbs, hybrid"
echo " are: pthread, mpirma, mpimsg, ibverbs, zero, hybrid"
echo
echo " -probe <seconds>"
echo " Set the number of seconds to probe the system for BSP"
Expand Down Expand Up @@ -846,7 +846,7 @@ case $engine in
exit_status=$?
;;

mpirma|mpimsg|ibverbs)
mpirma|mpimsg|ibverbs|zero)

mpi_impl=$(mpi_detect)
proc_args=
Expand Down Expand Up @@ -1128,8 +1128,8 @@ case $engine in
;;

*)
echo "Engine '$engine' is not supported. Please choose 'pthread',"
echo "'mpirma', or 'hybrid'"
echo "Engine '$engine' is not supported. Please choose "
echo "'pthread', 'mpirma', 'mpimsg', 'ibverbs, 'zero', 'hybrid'"
exit_status=1
;;
esac
Expand Down
3 changes: 3 additions & 0 deletions post-install/post-install-test.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ endif()
###### CMake integration using generated CMake module file ############

foreach(engine @ENGINES@)
if ("${engine}" STREQUAL "zero")
continue()
endif()
message("Testing generated CMake module files for engine ${engine}")

set(test_dir @builddir@/cmake-module-test-${engine})
Expand Down
2 changes: 2 additions & 0 deletions post-install/test-lpf-nprocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ void spmd( lpf_t lpf, lpf_pid_t pid, lpf_pid_t nprocs, lpf_args_t args )
lpf_memslot_t mem_slot = LPF_INVALID_MEMSLOT;
lpf_register_global( lpf, mem, nprocs, &mem_slot );

lpf_sync(lpf, LPF_SYNC_DEFAULT);

if (pid != 0)
lpf_get( lpf, 0, params_slot, 0, params_slot, 0, sizeof(params), LPF_MSG_DEFAULT );

Expand Down
16 changes: 12 additions & 4 deletions src/MPI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if (MPI_FOUND)
endif()

if (ENABLE_IBVERBS)
list(APPEND MPI_ENGINES ibverbs)
list(APPEND MPI_ENGINES ibverbs zero)
endif()

if (MPI_IBARRIER)
Expand Down Expand Up @@ -52,6 +52,10 @@ if (MPI_FOUND)
set(ibverbs_sources ibverbs.cpp)
endif()

if (LPF_IMPL_ID STREQUAL zero)
set(ibverbs_sources ibverbsZero.cpp)
endif()

add_library(raw_${libname} OBJECT
memorytable.cpp
mesgqueue.cpp
Expand Down Expand Up @@ -127,9 +131,9 @@ if (MPI_FOUND)
${LIB_POSIX_THREADS}
)

if (engine STREQUAL ibverbs)
target_link_libraries(${target} ${LIB_IBVERBS})
endif()
if (engine STREQUAL ibverbs OR engine STREQUAL zero)
target_link_libraries(${target} ${LIB_IBVERBS})
endif()
endfunction()


Expand Down Expand Up @@ -176,6 +180,10 @@ if (MPI_FOUND)
add_gtest( ibverbs_test "ibverbs" ON ${CMAKE_CURRENT_SOURCE_DIR}/ibverbs.t.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ibverbs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mpilib.cpp)

add_gtest( zero_test "zero" ON ${CMAKE_CURRENT_SOURCE_DIR}/ibverbs.t.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ibverbsZero.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mpilib.cpp)
endif()

foreach (engine ${MPI_ENGINES})
Expand Down
Loading