Skip to content

Commit b5828d9

Browse files
committed
initial empty project
0 parents  commit b5828d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2861
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.nc filter=lfs diff=lfs merge=lfs -text
2+
*.nc4 filter=lfs diff=lfs merge=lfs -text

.github/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
FROM jcsda/docker-gnu-openmpi-dev:latest
3+
4+
RUN groupadd jcsda -g 9999 \
5+
&& adduser jcsdauser \
6+
&& mkdir -p /jcsda \
7+
&& chown -R jcsdauser:jcsda /jcsda \
8+
&& chmod 6755 /jcsda
9+
10+
USER jcsdauser
11+
12+
COPY default-mca-params.conf /jcsda/mca-params.conf
13+
14+
RUN mkdir -p ~/.openmpi \
15+
&& cp /jcsda/mca-params.conf ~/.openmpi/
16+
17+
CMD ["/bin/bash"]

.github/default-mca-params.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
btl=tcp,self
2+
plm_rsh_no_tree_spawn=1
3+
btl_base_warn_component_unused=0
4+
pml=ob1
5+
rmaps_base_oversubscribe = 1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*~

.travis.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
language: cpp
2+
services:
3+
- docker
4+
5+
branches:
6+
only:
7+
- develop
8+
- master
9+
- "/.*/travisci_.*$/"
10+
11+
before_install:
12+
- |
13+
# prepare build directory
14+
mkdir $HOME/build1
15+
chmod 777 -R $HOME/build1
16+
chmod 777 -R $TRAVIS_BUILD_DIR
17+
18+
- |
19+
# prepare docker image
20+
cd .github
21+
docker build -t jcsda/dockerl2 .
22+
docker images
23+
docker run -d -t -e CI_USER_TOKEN \
24+
-v $HOME/build1:/jcsda/build \
25+
-v $TRAVIS_BUILD_DIR:/jcsda/src \
26+
--name jcsda_container jcsda/dockerl2
27+
docker ps -a
28+
docker exec jcsda_container bash \
29+
-c 'git config --global url.https://${CI_USER_TOKEN}@github.com/.insteadOf https://github.com/'
30+
31+
script:
32+
- |
33+
# build/test code
34+
docker exec jcsda_container bash \
35+
-c 'cd /jcsda/build && ecbuild /jcsda/src/bundle && cd oisst && make -j 4'
36+
docker exec jcsda_container bash \
37+
-c 'cd /jcsda/build/oisst && ctest'
38+
39+
after_success:

CMakeLists.txt

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# (C) Copyright 2019-2019 UCAR.
2+
#
3+
# This software is licensed under the terms of the Apache Licence Version 2.0
4+
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
6+
################################################################################
7+
# OISST
8+
################################################################################
9+
10+
cmake_minimum_required( VERSION 3.8 FATAL_ERROR )
11+
12+
project( oisst C CXX Fortran)
13+
14+
set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH})
15+
16+
set( ENABLE_OS_TESTS OFF CACHE BOOL "Disable OS tests" FORCE )
17+
set( ENABLE_LARGE_FILE_SUPPORT OFF CACHE BOOL "Disable testing of large file support" FORCE )
18+
set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" )
19+
20+
include( ecbuild_system NO_POLICY_SCOPE )
21+
22+
ecbuild_requires_macro_version( 2.5 )
23+
24+
25+
################################################################################
26+
# Project
27+
################################################################################
28+
29+
ecbuild_declare_project()
30+
31+
ecbuild_enable_fortran( REQUIRED )
32+
ecbuild_add_cxx11_flags()
33+
34+
set( OISST_LINKER_LANGUAGE CXX )
35+
36+
37+
################################################################################
38+
# Dependencies
39+
################################################################################
40+
# Boost Headers
41+
set( Boost_MINIMUM_VERSION "1.47" )
42+
include_directories( ${Boost_INCLUDE_DIR} )
43+
44+
# NetCDF
45+
find_package( NetCDF REQUIRED COMPONENTS Fortran )
46+
include_directories( ${NETCDF_INCLUDE_DIRS} )
47+
48+
# eckit
49+
ecbuild_use_package( PROJECT eckit VERSION 1.1.0 REQUIRED )
50+
include_directories( ${ECKIT_INCLUDE_DIRS} )
51+
link_libraries( ${ECKIT_LIBRARIES} )
52+
53+
# fckit
54+
ecbuild_use_package( PROJECT fckit VERSION 0.4.1 REQUIRED )
55+
include_directories( ${FCKIT_INCLUDE_DIRS} )
56+
57+
# atlas
58+
ecbuild_use_package( PROJECT atlas VERSION 0.18.1 REQUIRED )
59+
include_directories( ${ATLAS_INCLUDE_DIRS} )
60+
61+
# oops
62+
ecbuild_use_package( PROJECT oops VERSION 0.1.0 REQUIRED )
63+
include_directories( ${OOPS_INCLUDE_DIRS} )
64+
add_definitions(-DATLASIFIED=1)
65+
66+
# saber
67+
ecbuild_use_package( PROJECT saber VERSION 0.0.1 REQUIRED )
68+
include_directories( ${SABER_INCLUDE_DIRS} )
69+
70+
# ioda
71+
ecbuild_use_package( PROJECT ioda VERSION 0.1.0 REQUIRED )
72+
include_directories( ${IODA_INCLUDE_DIRS} )
73+
74+
# ufo
75+
ecbuild_use_package( PROJECT ufo VERSION 0.1.0 REQUIRED )
76+
include_directories( ${UFO_INCLUDE_DIRS} )
77+
78+
# MPI
79+
ecbuild_find_mpi( COMPONENTS CXX Fortran REQUIRED )
80+
ecbuild_include_mpi()
81+
link_libraries(${MPI_CXX_LIBRARIES} ${MPI_Fortran_LIBRARIES})
82+
83+
84+
################################################################################
85+
# Export package info
86+
################################################################################
87+
list( APPEND OISST_TPLS atlas atlas_f LAPACK MPI NetCDF )
88+
89+
set( OISST_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src
90+
${CMAKE_CURRENT_BINARY_DIR}/src
91+
${CMAKE_Fortran_MODULE_DIRECTORY} )
92+
set( OISST_LIBRARIES oisst )
93+
94+
get_directory_property( OISST_DEFINITIONS COMPILE_DEFINITIONS )
95+
96+
foreach( _tpl ${OISST_TPLS} )
97+
string( TOUPPER ${_tpl} TPL )
98+
list( APPEND OISST_EXTRA_DEFINITIONS ${${TPL}_DEFINITIONS} ${${TPL}_TPL_DEFINITIONS} )
99+
list( APPEND OISST_EXTRA_INCLUDE_DIRS ${${TPL}_INCLUDE_DIRS} ${${TPL}_TPL_INCLUDE_DIRS} )
100+
list( APPEND OISST_EXTRA_LIBRARIES ${${TPL}_LIBRARIES} ${${TPL}_TPL_LIBRARIES} )
101+
endforeach()
102+
103+
104+
################################################################################
105+
# Sources
106+
################################################################################
107+
include( oisst_compiler_flags )
108+
include_directories( ${OISST_INCLUDE_DIRS} ${OISST_EXTRA_INCLUDE_DIRS} )
109+
110+
add_subdirectory( src )
111+
add_subdirectory( test )
112+
113+
if(ECBUILD_INSTALL_FORTRAN_MODULES)
114+
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR} DESTINATION ${INSTALL_INCLUDE_DIR} )
115+
endif()
116+
117+
################################################################################
118+
# Finalise configuration
119+
################################################################################
120+
121+
# prepares a tar.gz of the sources and/or binaries
122+
ecbuild_install_project( NAME oisst )
123+
124+
# print the summary of the configuration
125+
ecbuild_print_summary()

0 commit comments

Comments
 (0)