Skip to content

Commit 5f605b7

Browse files
authored
Merge pull request #211 from barche/v07-further-fixes
V07 further fixes
2 parents bef6884 + 31c40fd commit 5f605b7

18 files changed

+60
-109
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ libjuliampi.so
77
libjuliampi.dylib
88
*.cov
99
*.mem
10+
Manifest.toml
11+
deps/build.log

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ os:
55
- linux
66
- osx
77
julia:
8-
- 0.6
98
- 0.7
109
- nightly
1110
notifications:
@@ -21,8 +20,6 @@ before_install:
2120
# Work around OpenMPI attempting to create overly long temporary
2221
# file names - and erroring as a result
2322
- export TMPDIR=/tmp
24-
script:
25-
- julia -e 'if VERSION < v"0.7.0-DEV.5183"; Pkg.clone(pwd()) ; else; using Pkg; Pkg.up(); end; Pkg.build("MPI"); Pkg.test("MPI"; coverage=true)'
2623
after_success:
27-
- julia -e 'VERSION < v"0.7.0-DEV.5183" || using Pkg; cd(Pkg.dir("MPI")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
28-
- julia -e 'VERSION < v"0.7.0-DEV.5183" || using Pkg; cd(Pkg.dir("MPI")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
24+
- julia -e 'using Pkg; cd(Pkg.dir("MPI")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
25+
- julia -e 'using Pkg; cd(Pkg.dir("MPI")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'

Project.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
authors = []
21
name = "MPI"
32
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
4-
version = "0.1.0"
3+
authors = []
4+
version = "0.7.0"
55

66
[deps]
77
BinDeps = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
88
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
99
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1010
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
11+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
12+
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
13+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ The julia master process is NOT part of the MPI cluster. The main script should
118118
launched directly, MPIManager internally calls `mpirun` to launch julia/mpi workers.
119119
All the workers started via MPIManager will be part of the MPI cluster.
120120

121-
`MPIManager(;np=Sys.CPU_CORES, mpi_cmd=false, launch_timeout=60.0)`
121+
`MPIManager(;np=Sys.CPU_THREADS, mpi_cmd=false, launch_timeout=60.0)`
122122

123123
If not specified, `mpi_cmd` defaults to `mpirun -np $np`
124-
STDOUT from the launched workers is redirected back to the julia session calling `addprocs` via a TCP connection.
124+
`stdout` from the launched workers is redirected back to the julia session calling `addprocs` via a TCP connection.
125125
Thus the workers must be able to freely connect via TCP to the host session.
126126
The following lines will be typically required on the julia master process to support both julia and mpi
127127

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
julia 0.6
1+
julia 0.7.0-beta
22
BinDeps
33
Compat 0.66

appveyor.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
53
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
64
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
7-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7.0-alpha-win32.exe"
8-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7.0-alpha-win64.exe"
5+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
6+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
97

108
branches:
119
only:
@@ -33,11 +31,7 @@ install:
3331
- set PATH=C:\Program Files\Microsoft MPI\Bin;%PATH%
3432

3533
build_script:
36-
# Need to convert from shallow to complete for Pkg.clone to work
37-
- IF EXIST .git\shallow (git fetch --unshallow)
38-
- C:\projects\julia\bin\julia -e "VERSION < v\"0.7.0-DEV\" || (using InteractiveUtils);
39-
versioninfo(); pkg=\"MPI\";
40-
if VERSION < v\"0.7.0-DEV.5183\"; Pkg.clone(pwd(), pkg); else; using Pkg; Pkg.up(); end; Pkg.build(\"MPI\")"
34+
- C:\projects\julia\bin\julia -e "using Pkg; pkg\"activate .\"; pkg\"build\""
4135

4236
test_script:
43-
- C:\projects\julia\bin\julia --check-bounds=yes -e "VERSION < v\"0.7.0-DEV.5183\" || using Pkg; Pkg.test(\"MPI\")"
37+
- C:\projects\julia\bin\julia --check-bounds=yes -e "using Pkg; pkg\"activate .\"; pkg\"test\""

deps/CMakeLists.txt

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -115,65 +115,14 @@ include_directories(${MPI_Fortran_INCLUDE_PATH})
115115
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAG}")
116116
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAG}")
117117

118-
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
119-
"\#define VERSION \"@VERSION@\"\n"
120-
"\#define INSTALL \"@CMAKE_INSTALL_PREFIX@\"\n"
121-
)
122-
123118
if(GIT_FOUND)
124119
set(USE_GIT 1)
125120
else(GIT_FOUND)
126121
set(USE_GIT 0)
127122
endif(GIT_FOUND)
128-
file(WRITE ${CMAKE_BINARY_DIR}/Version.cmake
129-
"if(${USE_GIT} EQUAL 1)
130-
execute_process(
131-
COMMAND ${GIT_EXECUTABLE} describe --tags --dirty
132-
WORKING_DIRECTORY \${WORKING_DIRECTORY}
133-
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
134-
RESULT_VARIABLE GIT_DESCRIBE_RESULT
135-
ERROR_VARIABLE GIT_DESCRIBE_ERROR
136-
OUTPUT_STRIP_TRAILING_WHITESPACE
137-
)
138-
else(${USE_GIT} EQUAL 1)
139-
set(GIT_DESCRIBE_RESULT -1)
140-
endif(${USE_GIT} EQUAL 1)
141-
142-
if(GIT_DESCRIBE_RESULT EQUAL 0)
143-
file(WRITE ${CMAKE_SOURCE_DIR}/VERSION \"\${GIT_DESCRIBE_VERSION}\")
144-
else(GIT_DESCRIBE_RESULT EQUAL 0)
145-
FILE(READ ${CMAKE_SOURCE_DIR}/VERSION_NO_GIT GIT_DESCRIBE_VERSION)
146-
endif(GIT_DESCRIBE_RESULT EQUAL 0)
147123

148-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
149-
\"\\\\1.\\\\2.\\\\3\" VERSION \"\${GIT_DESCRIBE_VERSION}\" )
150-
151-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
152-
\"\\\\1\" VERSION_MAJOR \"\${GIT_DESCRIBE_VERSION}\")
153-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
154-
\"\\\\2\" VERSION_MINOR \"\${GIT_DESCRIBE_VERSION}\")
155-
string(REGEX REPLACE \"v([0-9]*)\\\\.([0-9]*)\\\\.(.*)\"
156-
\"\\\\3\" VERSION_PATCH \"\${GIT_DESCRIBE_VERSION}\")
157-
")
158-
159-
file(WRITE ${CMAKE_BINARY_DIR}/FillVersion.cmake
160-
"include(Version.cmake)
161-
configure_file(\${SRC} \${DST} @ONLY)
162-
")
163124
include_directories(${CMAKE_BINARY_DIR})
164-
add_custom_target(
165-
version
166-
${CMAKE_COMMAND} -D SRC=${CMAKE_BINARY_DIR}/version.h.in
167-
-D DST=${CMAKE_BINARY_DIR}/version.h
168-
-D WORKING_DIRECTORY=${CMAKE_SOURCE_DIR}
169-
-P ${CMAKE_BINARY_DIR}/FillVersion.cmake
170-
)
171125
set(WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
172-
include(${CMAKE_BINARY_DIR}/Version.cmake)
173-
set(CPACK_PACKAGE_VERSION "${VERSION}")
174-
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
175-
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
176-
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
177126
set(CPACK_SOURCE_IGNORE_FILES
178127
"~$"
179128
".sw[a-z]$"
@@ -200,8 +149,6 @@ EXECUTE_PROCESS(COMMAND cpack -G TGZ --config CPackSourceConfig.cmake
200149
)
201150
endif(UNIX)
202151

203-
add_dependencies(dist version)
204-
205152
add_library(juliampi SHARED juliampi.c test_mpi.f90)
206153

207154
if(MPI_Fortran_LINK_FLAGS)
@@ -221,7 +168,6 @@ else()
221168
endif()
222169

223170
add_executable(gen_functions gen_functions.c)
224-
add_dependencies(gen_functions version)
225171

226172
add_executable(gen_constants gen_constants.f90)
227173

deps/gen_functions.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <stddef.h>
33
#include "jlmpi_f2c.h"
44
#include "mpi.h"
5-
#include "version.h"
65

76
// check that the size of MPI_Aint is consistent
87
typedef int check_sizeof_MPI_Aint[sizeof(MPI_Aint) == sizeof(ptrdiff_t) ? 1 : -1];
@@ -14,7 +13,6 @@ int main(int argc, char *argv[]) {
1413
printf("using Compat\n");
1514
printf("import Compat.String\n");
1615
printf("\n");
17-
printf("const WRAPPER_VERSION = \"%s\"\n", VERSION);
1816
printf("\n");
1917
printf("const _mpi_functions = Dict{Symbol, String}(\n");
2018
printf(" :MPI_ABORT => \"%s\",\n", STRING(MPI_ABORT));

examples/05-juliacman.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ println("Running 01-hello as part of a Julia cluster")
1111
@mpi_do manager (include("01-hello-impl.jl"); do_hello())
1212

1313
# Interspersed julia parallel call
14-
nheads = @parallel (+) for i=1:10^8
14+
nheads = @distributed (+) for i=1:10^8
1515
Int(rand(Bool))
1616
end
17-
println("@parallel nheads $nheads")
17+
println("@distributed nheads $nheads")
1818

1919
println("Running 02-broadcast as part of a Julia cluster")
2020
@mpi_do manager (include("02-broadcast-impl.jl"); do_broadcast())

src/MPI.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function __init__()
3333

3434
# look up all symbols ahead of time
3535
for (jname, fname) in _mpi_functions
36-
eval(:(const $jname = Libdl.dlsym(libmpi_handle, $fname)))
36+
Core.eval(MPI, :(const $jname = Libdl.dlsym(libmpi_handle, $fname)))
3737
end
3838
end
3939

0 commit comments

Comments
 (0)