Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1ce8d44
ta
rhl- Nov 30, 2016
a58a987
typo
rhl- Nov 30, 2016
bc80dce
not sure how to use windows
rhl- Nov 30, 2016
6ea1157
MPI on windows
rhl- Nov 30, 2016
dd07eea
borrow examples from mpi4py
rhl- Nov 30, 2016
2e479da
borrow examples from mpi4py
rhl- Nov 30, 2016
a9e69c6
borrow examples from mpi4py
rhl- Nov 30, 2016
d155b7c
borrow examples from mpi4py
rhl- Nov 30, 2016
0b833ec
borrow examples from mpi4py
rhl- Nov 30, 2016
dc0c818
borrow examples from mpi4py
rhl- Nov 30, 2016
0a14298
borrow examples from mpi4py
rhl- Nov 30, 2016
d1d73ad
borrow examples from mpi4py
rhl- Nov 30, 2016
b0bf4ec
fix scripts.
rhl- Nov 30, 2016
04ee37a
borrow examples from mpi4py
rhl- Nov 30, 2016
bb7ae58
borrow examples from mpi4py
rhl- Nov 30, 2016
85395b2
borrow examples from mpi4py
rhl- Nov 30, 2016
6854ab8
borrow examples from mpi4py
rhl- Nov 30, 2016
2c19686
borrow examples from mpi4py
rhl- Nov 30, 2016
1ddd1da
nuget example openblas
rhl- Nov 30, 2016
0e50d71
math_libs openblas
rhl- Nov 30, 2016
31f9120
math_libs openblas
rhl- Nov 30, 2016
c456d4b
math_libs openblas
rhl- Nov 30, 2016
62dcfb6
make does not exist on windows
rhl- Nov 30, 2016
ba8f09a
make does not exist on windows
rhl- Nov 30, 2016
f24f636
make does not exist on windows
rhl- Nov 30, 2016
3f8f4f4
dont do parmetis
rhl- Nov 30, 2016
f341b6a
actually run make
rhl- Nov 30, 2016
42b48e8
disable metis
rhl- Nov 30, 2016
592a660
disable metis
rhl- Nov 30, 2016
af088ad
remove stupid flags
rhl- Nov 30, 2016
ab1c865
parallel build
rhl- Dec 1, 2016
98da502
add missing file and turn off metis builds
rhl- Dec 1, 2016
ad0c653
allow failures.
rhl- Dec 1, 2016
53e65c8
allow failures
rhl- Dec 1, 2016
176b19c
allow failures
rhl- Dec 2, 2016
1b22098
allow failures
rhl- Dec 2, 2016
99ba4d1
allow failures
rhl- Dec 2, 2016
c09c2b2
allow failures
rhl- Dec 2, 2016
3e8a0c4
Disable PMRRR
rhl- Dec 2, 2016
d0806cf
propagate disablement to code
rhl- Dec 2, 2016
f6ad6a4
fix pmrrr cmake bug.
rhl- Dec 2, 2016
1e725a8
replace variable with macro
rhl- Dec 2, 2016
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
28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,20 @@ endif()

# Elemental's mod's of Parallel Multiple Relatively Robust Representations
# ------------------------------------------------------------------------
add_subdirectory(external/pmrrr)
if(EL_BUILT_SCALAPACK)
add_dependencies(pmrrr project_scalapack)
else()
if(EL_BUILT_BLIS_LAPACK)
add_dependencies(pmrrr project_blis_lapack)
endif()
if(EL_BUILT_OPENBLAS)
add_dependencies(pmrrr project_openblas)
endif()
if(NOT EL_DISABLE_PMRRR)
set(PMRRR "pmrrr")
add_subdirectory(external/pmrrr)
if(EL_BUILT_SCALAPACK)
add_dependencies(pmrrr project_scalapack)
else()
if(EL_BUILT_BLIS_LAPACK)
add_dependencies(pmrrr project_blis_lapack)
endif()
if(EL_BUILT_OPENBLAS)
add_dependencies(pmrrr project_openblas)
endif()
endif()
add_definitions("-DEL_DISABLE_PMRRR")
endif()

# Elemental's modifications of (a subset of) SuiteSparse
Expand Down Expand Up @@ -517,7 +521,7 @@ endif()
if(EL_BUILT_PARMETIS)
add_dependencies(El project_parmetis)
endif()
set(LINK_LIBS pmrrr ElSuiteSparse
set(LINK_LIBS ${PMRRR} ElSuiteSparse
${EXTERNAL_LIBS} ${MATH_LIBS} ${MPI_CXX_LIBRARIES})
if(EL_HAVE_QT5)
set(LINK_LIBS ${LINK_LIBS} ${Qt5Widgets_LIBRARIES})
Expand Down Expand Up @@ -743,7 +747,7 @@ include(CPack)
# =====
# Create ElementalConfig.cmake for find_package.
# Add all targets to the build-tree export set
export(TARGETS El pmrrr ElSuiteSparse
export(TARGETS El ${PMRRR} ElSuiteSparse
FILE "${PROJECT_BINARY_DIR}/ElementalTargets.cmake")

if(NOT CMAKE_EXPORT_NO_PACKAGE_REGISTRY)
Expand Down
59 changes: 59 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# version format
version: 1.0.{build}

# Build worker image (VM template)
image: Visual Studio 2015

configuration: Release
platform: x86

matrix:
fast_finish: true
allow_failures:
- platform: x64
configuration: Release

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input

# clone directory
clone_folder: c:\projects\elemental

environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
WITH_ENV: "cmd /E:ON /V:ON /C .ci\\run_with_env.cmd"

# scripts that run after cloning repository
install:
# Download MPI
# Microsoft MPI
- "powershell ci\\install-msmpi.ps1"
- ps: nuget install OpenBLAS -o "${env:APPVEYOR_BUILD_FOLDER}"

before_build:
- SetEnvMPI.cmd
- mkdir build
- cd build
- cmake -G "Visual Studio 14 2015 Win64" -DEL_DISABLE_PMRRR=ON -DMATH_LIBS="c:\\projects\\elemental\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\x64\\libopenblas.dll.a" -DBUILD_METIS=OFF -DEL_DISABLE_PARMETIS=ON -DEL_TESTS=ON -DEL_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release ..

build:
parallel: true # enable MSBuild parallel builds

build_script:
- cmake --build . -- /m

test_script:
- ps: ctest --output-on-failure

cache:
- C:\Downloads\MSMPI -> ci\\install-msmpi.ps1
30 changes: 30 additions & 0 deletions ci/download.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Author: Lisandro Dalcin
# Contact: [email protected]

function Download ($url, $filename, $destdir) {
if ($destdir) {
$item = New-Item $destdir -ItemType directory -Force
$destdir = $item.FullName
} else {
$destdir = $pwd.Path
}
$filepath = Join-Path $destdir $filename
if (Test-Path $filepath) {
Write-Host "Reusing" $filename "from" $destdir
return $filepath
}
Write-Host "Downloading" $filename "from" $url
$webclient = New-Object System.Net.WebClient
foreach($i in 1..3) {
try {
$webclient.DownloadFile($url, $filepath)
Write-Host "File saved at" $filepath
return $filepath
}
Catch [Exception] {
Start-Sleep 1
}
}
Write-Host "Failed to download" $filename "from" $url
return $null
}
61 changes: 61 additions & 0 deletions ci/install-msmpi.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Author: Lisandro Dalcin
# Contact: [email protected]

$MS_DOWNLOAD_URL = "http://download.microsoft.com/download/"
$MSMPI_HASH_URL_V5 = "3/7/6/3764A48C-5C4E-4E4D-91DA-68CED9032EDE/"
$MSMPI_HASH_URL_V6 = "6/4/A/64A7852A-A8C3-476D-908C-30501F761DF3/"
$MSMPI_HASH_URL_V7 = "D/7/B/D7BBA00F-71B7-436B-80BC-4D22F2EE9862/"
$MSMPI_HASH_URL_V71 = "E/8/A/E8A080AF-040D-43FF-97B4-065D4F220301/"
$MSMPI_BASE_URL = $MS_DOWNLOAD_URL + $MSMPI_HASH_URL_V71

$ScriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent
. "$ScriptDir\download.ps1"
$DOWNLOADS = "C:\Downloads\MSMPI"

function InstallMicrosoftMPISDK ($baseurl, $filename) {
Write-Host "Installing Microsoft MPI SDK"
$url = $baseurl + $filename
$filepath = Download $url $filename $DOWNLOADS
Write-Host "Installing" $filename
$prog = "msiexec.exe"
$args = "/quiet /qn /i $filepath"
Write-Host "Executing:" $prog $args
Start-Process -FilePath $prog -ArgumentList $args -Wait
Write-Host "Microsoft MPI SDK installation complete"
}

function InstallMicrosoftMPIRuntime ($baseurl, $filename) {
Write-Host "Installing Microsoft MPI Runtime"
$url = $baseurl + $filename
$filepath = Download $url $filename $DOWNLOADS
Write-Host "Installing" $filename
$prog = $filepath
$args = "-unattend"
Write-Host "Executing:" $prog $args
Start-Process -FilePath $prog -ArgumentList $args -Wait
Write-Host "Microsoft MPI Runtime installation complete"
}

function SaveMicrosoftMPIEnvironment ($filepath) {
Write-Host "Saving Microsoft MPI environment variables to" $filepath
$envlist = @("MSMPI_BIN", "MSMPI_INC", "MSMPI_LIB32", "MSMPI_LIB64")
$stream = [IO.StreamWriter] $filepath
foreach ($variable in $envlist) {
$value = [Environment]::GetEnvironmentVariable($variable, "Machine")
if ($value) { $stream.WriteLine("SET $variable=$value") }
if ($value) { Write-Host "$variable=$value" }
}
$stream.Close()
}

function InstallMicrosoftMPI () {
InstallMicrosoftMPISDK $MSMPI_BASE_URL "msmpisdk.msi"
InstallMicrosoftMPIRuntime $MSMPI_BASE_URL "MSMpiSetup.exe"
SaveMicrosoftMPIEnvironment "SetEnvMPI.cmd"
}

function main () {
InstallMicrosoftMPI
}

main
32 changes: 32 additions & 0 deletions ci/run_with_env.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:: Author: Lisandro Dalcin
:: Contact: [email protected]
:: Credits: Olivier Grisel and Kyle Kastner
@ECHO OFF

SET COMMAND_TO_RUN=%*

SET PYTHON_VERSION_MAJOR=%PYTHON_VERSION:~0,1%
SET PYTHON_VERSION_MINOR=%PYTHON_VERSION:~2,1%

SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
IF %PYTHON_VERSION_MAJOR% == 2 SET WIN_SDK_VERSION="v7.0"
IF %PYTHON_VERSION_MAJOR% == 3 SET WIN_SDK_VERSION="v7.1"

IF %PYTHON_ARCH% == 64 SET USE_WIN_SDK=1
IF %PYTHON_VERSION_MAJOR% EQU 3 IF %PYTHON_VERSION_MINOR% GEQ 5 SET USE_WIN_SDK=0
IF %PYTHON_VERSION_MAJOR% GTR 3 SET USE_WIN_SDK=0
if %PYTHON_ARCH% == 32 SET USE_WIN_SDK=0

IF %USE_WIN_SDK% == 1 (
ECHO Configuring Windows SDK %WIN_SDK_VERSION% for %PYTHON_ARCH% bit architecture
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"%WIN_SDK_ROOT%\%WIN_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WIN_SDK_VERSION%
"%WIN_SDK_ROOT%\%WIN_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
ECHO Executing: %COMMAND_TO_RUN%
CALL %COMMAND_TO_RUN% || EXIT 1
) ELSE (
ECHO Using default MSVC build environment for %PYTHON_ARCH% bit architecture
ECHO Executing: %COMMAND_TO_RUN%
CALL %COMMAND_TO_RUN% || EXIT 1
)
4 changes: 3 additions & 1 deletion include/El/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ template<typename T> struct IsStdField<Complex<T>>
#include <El/core/imports/flame.hpp>
#include <El/core/imports/mkl.hpp>
#include <El/core/imports/openblas.hpp>
#include <El/core/imports/pmrrr.hpp>
#ifndef EL_DISABLE_PMRRR
#include <El/core/imports/pmrrr.hpp>
#endif
#include <El/core/imports/scalapack.hpp>

#include <El/core/limits.hpp>
Expand Down