Skip to content

Commit

Permalink
initial empty project
Browse files Browse the repository at this point in the history
  • Loading branch information
travissluka committed Aug 14, 2020
0 parents commit b5828d9
Show file tree
Hide file tree
Showing 73 changed files with 2,861 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.nc filter=lfs diff=lfs merge=lfs -text
*.nc4 filter=lfs diff=lfs merge=lfs -text
17 changes: 17 additions & 0 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

FROM jcsda/docker-gnu-openmpi-dev:latest

RUN groupadd jcsda -g 9999 \
&& adduser jcsdauser \
&& mkdir -p /jcsda \
&& chown -R jcsdauser:jcsda /jcsda \
&& chmod 6755 /jcsda

USER jcsdauser

COPY default-mca-params.conf /jcsda/mca-params.conf

RUN mkdir -p ~/.openmpi \
&& cp /jcsda/mca-params.conf ~/.openmpi/

CMD ["/bin/bash"]
5 changes: 5 additions & 0 deletions .github/default-mca-params.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
btl=tcp,self
plm_rsh_no_tree_spawn=1
btl_base_warn_component_unused=0
pml=ob1
rmaps_base_oversubscribe = 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*~
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
language: cpp
services:
- docker

branches:
only:
- develop
- master
- "/.*/travisci_.*$/"

before_install:
- |
# prepare build directory
mkdir $HOME/build1
chmod 777 -R $HOME/build1
chmod 777 -R $TRAVIS_BUILD_DIR
- |
# prepare docker image
cd .github
docker build -t jcsda/dockerl2 .
docker images
docker run -d -t -e CI_USER_TOKEN \
-v $HOME/build1:/jcsda/build \
-v $TRAVIS_BUILD_DIR:/jcsda/src \
--name jcsda_container jcsda/dockerl2
docker ps -a
docker exec jcsda_container bash \
-c 'git config --global url.https://${CI_USER_TOKEN}@github.com/.insteadOf https://github.com/'
script:
- |
# build/test code
docker exec jcsda_container bash \
-c 'cd /jcsda/build && ecbuild /jcsda/src/bundle && cd oisst && make -j 4'
docker exec jcsda_container bash \
-c 'cd /jcsda/build/oisst && ctest'
after_success:
125 changes: 125 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# (C) Copyright 2019-2019 UCAR.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.

################################################################################
# OISST
################################################################################

cmake_minimum_required( VERSION 3.8 FATAL_ERROR )

project( oisst C CXX Fortran)

set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH})

set( ENABLE_OS_TESTS OFF CACHE BOOL "Disable OS tests" FORCE )
set( ENABLE_LARGE_FILE_SUPPORT OFF CACHE BOOL "Disable testing of large file support" FORCE )
set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" )

include( ecbuild_system NO_POLICY_SCOPE )

ecbuild_requires_macro_version( 2.5 )


################################################################################
# Project
################################################################################

ecbuild_declare_project()

ecbuild_enable_fortran( REQUIRED )
ecbuild_add_cxx11_flags()

set( OISST_LINKER_LANGUAGE CXX )


################################################################################
# Dependencies
################################################################################
# Boost Headers
set( Boost_MINIMUM_VERSION "1.47" )
include_directories( ${Boost_INCLUDE_DIR} )

# NetCDF
find_package( NetCDF REQUIRED COMPONENTS Fortran )
include_directories( ${NETCDF_INCLUDE_DIRS} )

# eckit
ecbuild_use_package( PROJECT eckit VERSION 1.1.0 REQUIRED )
include_directories( ${ECKIT_INCLUDE_DIRS} )
link_libraries( ${ECKIT_LIBRARIES} )

# fckit
ecbuild_use_package( PROJECT fckit VERSION 0.4.1 REQUIRED )
include_directories( ${FCKIT_INCLUDE_DIRS} )

# atlas
ecbuild_use_package( PROJECT atlas VERSION 0.18.1 REQUIRED )
include_directories( ${ATLAS_INCLUDE_DIRS} )

# oops
ecbuild_use_package( PROJECT oops VERSION 0.1.0 REQUIRED )
include_directories( ${OOPS_INCLUDE_DIRS} )
add_definitions(-DATLASIFIED=1)

# saber
ecbuild_use_package( PROJECT saber VERSION 0.0.1 REQUIRED )
include_directories( ${SABER_INCLUDE_DIRS} )

# ioda
ecbuild_use_package( PROJECT ioda VERSION 0.1.0 REQUIRED )
include_directories( ${IODA_INCLUDE_DIRS} )

# ufo
ecbuild_use_package( PROJECT ufo VERSION 0.1.0 REQUIRED )
include_directories( ${UFO_INCLUDE_DIRS} )

# MPI
ecbuild_find_mpi( COMPONENTS CXX Fortran REQUIRED )
ecbuild_include_mpi()
link_libraries(${MPI_CXX_LIBRARIES} ${MPI_Fortran_LIBRARIES})


################################################################################
# Export package info
################################################################################
list( APPEND OISST_TPLS atlas atlas_f LAPACK MPI NetCDF )

set( OISST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/src
${CMAKE_Fortran_MODULE_DIRECTORY} )
set( OISST_LIBRARIES oisst )

get_directory_property( OISST_DEFINITIONS COMPILE_DEFINITIONS )

foreach( _tpl ${OISST_TPLS} )
string( TOUPPER ${_tpl} TPL )
list( APPEND OISST_EXTRA_DEFINITIONS ${${TPL}_DEFINITIONS} ${${TPL}_TPL_DEFINITIONS} )
list( APPEND OISST_EXTRA_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS} ${${TPL}_TPL_INCLUDE_DIRS} )
list( APPEND OISST_EXTRA_LIBRARIES ${${TPL}_LIBRARIES} ${${TPL}_TPL_LIBRARIES} )
endforeach()


################################################################################
# Sources
################################################################################
include( oisst_compiler_flags )
include_directories( ${OISST_INCLUDE_DIRS} ${OISST_EXTRA_INCLUDE_DIRS} )

add_subdirectory( src )
add_subdirectory( test )

if(ECBUILD_INSTALL_FORTRAN_MODULES)
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR} DESTINATION ${INSTALL_INCLUDE_DIR} )
endif()

################################################################################
# Finalise configuration
################################################################################

# prepares a tar.gz of the sources and/or binaries
ecbuild_install_project( NAME oisst )

# print the summary of the configuration
ecbuild_print_summary()
Loading

0 comments on commit b5828d9

Please sign in to comment.