Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
J Todd
committed
Aug 23, 2018
1 parent
ba45bb0
commit 1754b30
Showing
7 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmake_minimum_required (VERSION 2.8) | ||
project (HiDEM Fortran C) | ||
|
||
add_subdirectory (libs/metis-5.1.0) | ||
add_subdirectory (src) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
#!/bin/bash | ||
module swap PrgEnv-gnu PrgEnv-cray | ||
module load metis | ||
cd ./src/ | ||
ftn -o ../HiDEM -O3 -lmetis typedefs.f90 utils.f90 io.f90 octree.F90 glas.f90 dist.f90 effload.f90 amat.f tmat.f ttmat.f kmat.f ranmar.f wave2.f90 | ||
#ftn -o ../HiDEM -g -R bcp -lmetis typedefs.f90 utils.f90 io.f90 octree.F90 glas.f90 dist.f90 effload.f90 amat.f tmat.f ttmat.f kmat.f ranmar.f wave2.f90 | ||
cd .. | ||
rm INOUT.mod | ||
rm TYPEDEFS.mod | ||
rm LATTICE.mod | ||
rm UTILS.mod | ||
rm OCTREE.mod | ||
rm EFFL.mod | ||
module swap PrgEnv-cray PrgEnv-gnu | ||
mkdir -p build #make dir if first build | ||
cd build | ||
|
||
cmake ../ -DCMAKE_INSTALL_PREFIX="." -DCMAKE_TOOLCHAIN_FILE=./scripts/toolchains/HiDEM-cray.cmake | ||
make | ||
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
#!/bin/bash | ||
cd ./src/ | ||
mpif90 -g -fcheck=bounds typedefs.f90 utils.f90 io.f90 octree.F90 glas.f90 dist.f90 effload.f90 amat.f tmat.f ttmat.f kmat.f ranmar.f wave2.f90 -I/usr/include/mpi/ -I/usr/include/ -L/usr/lib/x86_64-linux-gnu/ -lmetis -o ../HiDEM | ||
rm inout.mod | ||
rm typedefs.mod | ||
rm lattice.mod | ||
rm utils.mod | ||
rm octree.mod | ||
rm effl.mod | ||
cd .. | ||
module swap PrgEnv-gnu PrgEnv-cray | ||
mkdir -p build #make dir if first build | ||
cd build | ||
|
||
cmake ../ -DCMAKE_INSTALL_PREFIX="." -DCMAKE_TOOLCHAIN_FILE=./scripts/toolchains/HiDEM-ubuntu.cmake | ||
make | ||
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
SET(CMAKE_SYSTEM_NAME Linux) | ||
SET(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
SET(CMAKE_SYSTEM_VERSION 1) | ||
|
||
# Specify the cross compilers (serial) | ||
SET(CMAKE_C_COMPILER cc) | ||
SET(CMAKE_Fortran_COMPILER ftn) | ||
SET(CMAKE_CXX_COMPILER CC) | ||
|
||
# Specify the cross compilers (parallel) | ||
SET(MPI_C_COMPILER cc) | ||
SET(MPI_CXX_COMPILER CC) | ||
SET(MPI_Fortran_COMPILER ftn) | ||
|
||
# Compilation flags (i.e. with optimization) | ||
SET(CMAKE_C_FLAGS "-O3 -fPIC" CACHE STRING "") | ||
SET(CMAKE_CXX_FLAGS "-O3 -fPIC" CACHE STRING "") | ||
SET(CMAKE_Fortran_FLAGS "-O3 -fPIC" CACHE STRING "") | ||
|
||
SET ( MPIEXEC "aprun" CACHE STRING "") | ||
SET ( MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
SET(CMAKE_SYSTEM_NAME Linux) | ||
SET(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
SET(CMAKE_SYSTEM_VERSION 1) | ||
|
||
# Specify the cross compilers (serial) | ||
SET(CMAKE_C_COMPILER gcc) | ||
SET(CMAKE_Fortran_COMPILER gfortran) | ||
SET(CMAKE_CXX_COMPILER g++) | ||
|
||
# Specify the cross compilers (parallel) - don't think these are used | ||
SET(MPI_C_COMPILER mpicc) | ||
SET(MPI_CXX_COMPILER mpic++) | ||
SET(MPI_Fortran_COMPILER mpif90) | ||
|
||
# Compilation flags (i.e. with optimization) | ||
SET(CMAKE_C_FLAGS "-O3 -fPIC" CACHE STRING "") | ||
SET(CMAKE_CXX_FLAGS "-O3 -fPIC" CACHE STRING "") | ||
SET(CMAKE_Fortran_FLAGS "-O3 -fPIC" CACHE STRING "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#Define the source code which makes up HiDEM | ||
add_executable (HiDEM typedefs.f90 utils.f90 io.f90 octree.F90 glas.f90 effload.f90 amat.f tmat.f ttmat.f kmat.f ranmar.f wave2.f90) | ||
|
||
#Locate MPI and add relevant flags, links | ||
find_package(MPI REQUIRED) | ||
|
||
if(MPI_Fortran_COMPILE_FLAGS) | ||
set_target_properties(HiDEM PROPERTIES | ||
COMPILE_FLAGS "${MPI_Fortran_COMPILE_FLAGS}") | ||
endif() | ||
|
||
if(MPI_Fortran_LINK_FLAGS) | ||
set_target_properties(HiDEM PROPERTIES | ||
LINK_FLAGS "${MPI_Fortran_LINK_FLAGS}") | ||
endif() | ||
|
||
if(MPI_Fortran_INCLUDE_PATH) | ||
include_directories(${MPI_Fortran_INCLUDE_PATH}) | ||
endif() | ||
|
||
target_link_libraries(HiDEM ${MPI_Fortran_LIBRARIES}) | ||
|
||
#Link to previously compiled metis library | ||
target_link_libraries(HiDEM metis) | ||
|
||
INSTALL(TARGETS HiDEM RUNTIME DESTINATION ".") |