Skip to content

Commit

Permalink
cleanup for Windows
Browse files Browse the repository at this point in the history
git-svn-id: https://icl.cs.utk.edu/svn/magma/trunk@8571 02bb5f2a-90ca-11de-bb24-8aedcc835bc8
  • Loading branch information
mgates3 committed Feb 6, 2016
1 parent 70fe26f commit b619782
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
44 changes: 25 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ endif()


# ----------------------------------------
# where to put libmagma
# save magma.lib, magma_sparse.lib, etc. in lib/
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY lib )

Expand Down Expand Up @@ -325,24 +325,6 @@ else()
endif()


# ----------------------------------------
# compile each tester
# skip Fortran testers, which require an extra file from CUDA
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY testing )
foreach( f ${testing_allsrc} )
if ( ${f} MATCHES "\\.(c|cu|cpp)$" )
list( APPEND testing_allsrc_cpp ${f} )
endif()
endforeach()
foreach( TEST ${testing_allsrc_cpp} )
string( REGEX REPLACE "\\.(cpp|f90|F90)" "" EXE ${TEST} )
string( REGEX REPLACE "testing/" "" EXE ${EXE} )
#message( "${TEST} --> ${EXE}" )
add_executable( ${EXE} ${TEST} )
target_link_libraries( ${EXE} ${LIBS} )
endforeach()


# ----------------------------------------
# compile MAGMA sparse library

Expand All @@ -361,6 +343,30 @@ target_link_libraries( magma_sparse
set( LIBS_SPARSE ${LIBS} magma_sparse )


# ----------------------------------------
# compile each tester

# save testers to testing/
# save tester lib files to testing_lib/ to avoid cluttering lib/
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY testing )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY testing_lib )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY testing_lib )

# skip Fortran testers, which require an extra file from CUDA
foreach( f ${testing_allsrc} )
if ( ${f} MATCHES "\\.(c|cu|cpp)$" )
list( APPEND testing_allsrc_cpp ${f} )
endif()
endforeach()
foreach( TEST ${testing_allsrc_cpp} )
string( REGEX REPLACE "\\.(cpp|f90|F90)" "" EXE ${TEST} )
string( REGEX REPLACE "testing/" "" EXE ${EXE} )
#message( "${TEST} --> ${EXE}" )
add_executable( ${EXE} ${TEST} )
target_link_libraries( ${EXE} ${LIBS} )
endforeach()


# ----------------------------------------
# compile each sparse tester
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY sparse-iter/testing )
Expand Down
10 changes: 3 additions & 7 deletions README-Windows
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Click the Configure button.

It will ask to create the build directory; enter Yes.

It will ask what generator to use. We used "Visual Studio 10 Win64",
It will ask what generator to use. We used "Visual Studio 12 2013 Win64",
with the default native compilers. Click Finish.

It should spend a few minutes analyzing your system, then return to the
Expand All @@ -53,7 +53,7 @@ the setup some.

For OpenBLAS, we used (again, no spaces before or after):

c:\openblas-0.2.14\lib\libopenblas.a
c:\openblas-0.2.14\lib\libopenblas.dll.a

* If using Intel MKL, also set MKLROOT. In our case, we used:
C:\Program Files (x86)\Intel\Composer XE\mkl
Expand All @@ -80,13 +80,9 @@ In the Toolbar, select the desired Solution Configuration:

From the Build menu, run Build Solution.
VS does not support parallel builds with nvcc, so it will take a long time
to build -- perhaps an hour.
to build -- perhaps several hours.

Once built, the MAGMA library and testers should be in
build\lib\Debug\
build\testing\Debug\
where "Debug" depends on what solution configuration you chose.

CMake would not compile Fortran and C++ files in the same library, so Fortran
files are compiled into a separate magmaf library. Currently, it is only
required for the non-symmetric eigenvalue problem, though.
2 changes: 1 addition & 1 deletion testing/testing_zunmql_gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int main( int argc, char** argv )
size = ldc*n;
blasf77_zaxpy( &size, &c_neg_one, C, &ione, R, &ione );
Cnorm = lapackf77_zlange( "Fro", &m, &n, C, &ldc, work );
error = lapackf77_zlange( "Fro", &m, &n, R, &ldc, work ) / (sqrt(m*n) * Cnorm);
error = lapackf77_zlange( "Fro", &m, &n, R, &ldc, work ) / (magma_dsqrt(m*n) * Cnorm);

printf( "%5d %5d %5d %4c %5c %7.2f (%7.2f) %7.2f (%7.2f) %8.2e %s\n",
(int) m, (int) n, (int) k,
Expand Down

0 comments on commit b619782

Please sign in to comment.