Skip to content

Commit

Permalink
Unify kinds
Browse files Browse the repository at this point in the history
  • Loading branch information
ashao committed Oct 21, 2024
1 parent 02f1d29 commit 73c9f52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions examples/parallel/fortran/smartredis_put_get_3D.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ program main

#include "enum_fortran.inc"

integer, parameter :: dim1 = 10
integer, parameter :: dim2 = 20
integer, parameter :: dim3 = 30
integer, parameter :: dim1 = 2
integer, parameter :: dim2 = 3
integer, parameter :: dim3 = 4

real(kind=8), dimension(dim1, dim2, dim3) :: recv_array_real_64
real(kind=c_double), dimension(dim1, dim2, dim3) :: recv_array_real_64

real(kind=c_double), dimension(dim1, dim2, dim3) :: true_array_real_64

Expand All @@ -65,6 +65,7 @@ program main
if (result .ne. SRNoError) error stop 'client%put_tensor failed'
result = client%unpack_tensor(key_prefix//"true_array_real_64", recv_array_real_64, shape(recv_array_real_64))
if (result .ne. SRNoError) error stop 'client%unpack_tensor failed'
print *, true_array_real_64, recv_array_real_64
if (.not. all(true_array_real_64 == recv_array_real_64)) error stop 'true_array_real_64: FAILED'

! Shut down MPI
Expand Down
3 changes: 2 additions & 1 deletion utils/launch_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def create_db(n_nodes, port, device, rai_ver, udsport):

# Make sure that all servers are up
# Let exceptions propagate to the caller
check_availability(n_nodes, port, udsport)
for proc in procs:
out, err = proc.communicate(timeout=15)
if proc.returncode != 0:
Expand All @@ -206,9 +205,11 @@ def create_db(n_nodes, port, device, rai_ver, udsport):
print("STDOUT:")
print(out)
raise RuntimeError("Failed to launch Redis server!")
check_availability(n_nodes, port, udsport)

# Create cluster for clustered Redis request
if n_nodes > 1:
sleep(5)
cluster_str = " ".join(f"127.0.0.1:{port + i}" for i in range(n_nodes))
cmd = f"{rediscli} --cluster create {cluster_str} --cluster-replicas 0 --cluster-yes"
print(cmd)
Expand Down

0 comments on commit 73c9f52

Please sign in to comment.