Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to cime5.3-alpha10 #1490

Merged
merged 296 commits into from
May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
562cf4b
add support for user_mods in compset definition
jedwards4b Apr 13, 2017
efb7125
fix pylint issue
jedwards4b Apr 13, 2017
ea4a759
fix no-match args
jedwards4b Apr 13, 2017
685c3fe
first changes needed for aquaplanet som
Apr 14, 2017
9cc7740
Fix precedence of user_mods application
billsacks Apr 15, 2017
8664933
fixed issue with using new user_mods element in compset definition
Apr 15, 2017
01ad744
Add unit tests for user_mod_support
billsacks Apr 16, 2017
0a38bb5
Force user to always go through case.submit
jgfouca Apr 16, 2017
8e8fd62
fix typo
billsacks Apr 17, 2017
ec95467
Fix timing of applying compset user_mods
billsacks Apr 17, 2017
9903472
Merge pull request #1350 from gold2718/pausePOP
jedwards4b Apr 17, 2017
1335a62
Merge pull request #1357 from ESMCI/jayeshkrishna/rem_cond_pio1_code
jedwards4b Apr 17, 2017
2530c66
Merge pull request #1360 from ESMCI/jgfouca/machine_get_value_type
jedwards4b Apr 17, 2017
8282a8f
Merge pull request #1361 from ESMCI/jgfouca/inform_user_of_machine
jedwards4b Apr 17, 2017
dd5a30b
Merge pull request #1362 from ESMCI/jgfouca/force_resubmit_to_use_submit
jedwards4b Apr 17, 2017
d0e277d
Merge pull request #1363 from ESMCI/jgfouca/big_cs_status_upgrade
jedwards4b Apr 17, 2017
8075121
add comment to README and stdout
jedwards4b Apr 17, 2017
29e0159
add support for user_mods in compset definition
jedwards4b Apr 13, 2017
8c2bd51
fix pylint issue
jedwards4b Apr 13, 2017
a1656f4
fix no-match args
jedwards4b Apr 13, 2017
582e308
first changes needed for aquaplanet som
Apr 14, 2017
28e84b7
Fix precedence of user_mods application
billsacks Apr 15, 2017
4df9f7e
fixed issue with using new user_mods element in compset definition
Apr 15, 2017
4f6bb99
Add unit tests for user_mod_support
billsacks Apr 16, 2017
fc4ac0b
fix typo
billsacks Apr 17, 2017
50e5d7a
Fix timing of applying compset user_mods
billsacks Apr 17, 2017
3075576
add comment to README and stdout
jedwards4b Apr 17, 2017
0266e9d
Print user_mods directory upfront
billsacks Apr 17, 2017
ddd2162
Merge branch 'mvertens/usermods_in_compset' of github.com:ESMCI/cime …
jedwards4b Apr 17, 2017
09190eb
fix typo in cori-knl binding
jedwards4b Apr 17, 2017
aaee38a
Merge pull request #1369 from jedwards4b/cori-knlfix
fischer-ncar Apr 17, 2017
ca289d9
Merge pull request #1366 from ESMCI/mvertens/usermods_in_compset
jedwards4b Apr 17, 2017
a97da52
Fix NODEFAIL test on cheyenne.
jgfouca Apr 17, 2017
1f72a2e
Put explicit dot in paths in some instructions
billsacks Apr 17, 2017
fbcb8e8
fix indentation error
jedwards4b Apr 17, 2017
49bf068
bug fix for dart
bertinia Apr 18, 2017
f4a2804
fixes for test to work on cheyenne
jedwards4b Apr 18, 2017
bec05af
Improve create_test output by dumping case errors directly to screen.
jgfouca Apr 18, 2017
a99eab3
Merge pull request #1373 from jedwards4b/pio_adjust_indentation_fix
jayeshkrishna Apr 18, 2017
cedf8f0
Add better test documentation
jgfouca Apr 18, 2017
9d9f09c
Merge pull request #1370 from ESMCI/jgfouca/minor_fix_for_cheyenne
jedwards4b Apr 18, 2017
81435ac
pio fixes for fortran unit tests
jedwards4b Apr 18, 2017
d79922e
Merge pull request #1377 from ESMCI/jgfouca/improve_create_test_output
jedwards4b Apr 18, 2017
68a0556
Add a stub for seq_timemgr_mod.F90
billsacks Apr 18, 2017
9629886
Merge pull request #1378 from jedwards4b/funit_test_fix
jedwards4b Apr 19, 2017
19f35f7
Get Fortran unit tests running on cheyenne
billsacks Apr 19, 2017
0eb29e8
Generalize logic for when we run N_TestUnitTest
billsacks Apr 19, 2017
085fbfd
move a comment
billsacks Apr 19, 2017
06c5645
Merge pull request #1381 from billsacks/cheyenne_unit_tests
jedwards4b Apr 19, 2017
4c5565c
Change how we determine the compiler
billsacks Apr 19, 2017
046ea22
Get unit test build & run working with either serial or mpi pfunit
billsacks Apr 19, 2017
38e08f3
add illegal char : to check_name test
jedwards4b Apr 19, 2017
5a141f8
Merge pull request #1375 from ESMCI/bertinia/st_archive
fischer-ncar Apr 19, 2017
29c29f3
fix check for PFUNIT_PATH
billsacks Apr 19, 2017
8991d80
Fix PFUNIT_PATH xml variables for new code
billsacks Apr 19, 2017
1c5d0ce
return only aprun args and use executable from xml
jedwards4b Apr 19, 2017
c04a4cc
simplify netcdf lib args on hobart
jedwards4b Apr 19, 2017
40a6017
Merge pull request #1386 from jedwards4b/hobart_netcdf_slib_fix
billsacks Apr 19, 2017
c0ca617
Point to serial pfunit builds on yellowstone and cheyenne
billsacks Apr 19, 2017
ef59e30
Add MPILIB attribute when querying SFC, MPIFC, etc.
billsacks Apr 19, 2017
09a884c
fix retrieval of compilers
billsacks Apr 20, 2017
a6d926b
Try a more robust method for getting the compiler
billsacks Apr 20, 2017
d4351e5
Don't set CMAKE_C_COMPILER or CMAKE_Fortran_COMPILER
billsacks Apr 20, 2017
faf5fe6
Update README: no longer need a caldera session
billsacks Apr 20, 2017
4731fd7
remove unneeded line
billsacks Apr 20, 2017
0e051bf
Get compiler from the Macros.cmake file
billsacks Apr 20, 2017
b1e7e99
Strip whitespace from compiler variables in Macros.cmake
billsacks Apr 20, 2017
4fb16a1
Merge pull request #1383 from jedwards4b/new_illegal_char
jgfouca Apr 20, 2017
7c3da76
added new functionality for DWAV and compsets ADLND and ADWAV to test…
Apr 10, 2017
5e1c49a
updates to datm to remove NLDAS, WRF and NPSxxx
Apr 11, 2017
e7f84b1
Clean up documentation for check_map tool
mnlevy1981 Apr 20, 2017
531ad6d
more updates for cleaning up data models
Apr 11, 2017
8087374
removed AWAV compset and support for DATM%WW3, DOCN%WW3 and DICE%WW3
Apr 12, 2017
1c4563a
fixed bugs
Apr 13, 2017
1f2a389
added new grid for ADWAV testing
Apr 15, 2017
a4bd90a
Move initial compiler setup into a file that can be included
billsacks Apr 20, 2017
6dd85dd
Merge pull request #1385 from jedwards4b/aprun_fix
jgfouca Apr 20, 2017
a1fa5c2
Update install instructions for gen_domain
mnlevy1981 Apr 20, 2017
9031787
Add cheyenne support to ESMF wrappers
mnlevy1981 Apr 20, 2017
02bb5fa
Merge branch 'master' into compiler_from_macros
billsacks Apr 20, 2017
11527f9
Errput may be empty string or None
jgfouca Apr 20, 2017
79acf60
Add Support for += in Namelists
Apr 20, 2017
2742c17
Merge pull request #1390 from ESMCI/jgfouca/fix_bug_in_errput_run_cmd
jedwards4b Apr 20, 2017
9329b15
Fix bug where LockedFiles weren't checked if there was a dot in filepath
sarich Apr 20, 2017
5cda778
Merge pull request #1365 from ESMCI/mvertens/data_wave
jedwards4b Apr 20, 2017
1db632a
Merge pull request #1391 from ESMCI/sarich/fix_bug_in_check_lockedfiles
jedwards4b Apr 20, 2017
1c10581
Steps toward getting unit tests running on hobart
billsacks Apr 20, 2017
7fa83de
Forgot to update map_field in previous commits
mnlevy1981 Apr 20, 2017
a403d2e
Build CMAKE_EXE_LINKER_FLAGS correctly
billsacks Apr 20, 2017
6179301
remove the cprnc.out files prior to running tests
jedwards4b Apr 20, 2017
a01ec18
Fix CMakeLists.txt in examples
billsacks Apr 20, 2017
5b5a2c5
Add Support of true and false in Namelist
Apr 20, 2017
9f5d489
Merge pull request #1394 from jedwards4b/system_test_rerun_improvement
fischer-ncar Apr 20, 2017
dcf6dc9
Added Support for [FfTt] in Namelist.pm
Apr 21, 2017
af32abd
Merge pull request #1395 from ESMCI/erichlf/Build/Namelist.pm
jedwards4b Apr 21, 2017
a5cc0b0
In cmake macros file, always strip leading and trailing whitespace
billsacks Apr 21, 2017
962b20b
Merge pull request #1396 from billsacks/compiler_from_macros
jedwards4b Apr 21, 2017
00ab9ee
Rewrite testreporter into python. The perl version was having
fischer-ncar Mar 31, 2017
01fd3f7
Update indenting for testreporter.py
fischer-ncar Apr 3, 2017
8abef1c
Merge in esmci/master
fischer-ncar Apr 17, 2017
55b660d
Update python version of testreport to apply requested
fischer-ncar Apr 20, 2017
08f53ec
Add testreporter.template. Fix comment in test_reporter.py
fischer-ncar Apr 21, 2017
1e851c2
Added '+=' seperator to string literal parser
Apr 21, 2017
34db2f2
More changes for testreport from code review.
fischer-ncar Apr 21, 2017
5472351
Use ESMF7 on yellowstone and cheyenne
fvitt Apr 21, 2017
2d0fbe5
Add input-dir to create_newcase
jgfouca Apr 23, 2017
9a1d1eb
Print time built per model
jgfouca Apr 23, 2017
dc1a7ce
Merge pull request #1401 from ESMCI/jgfouca/add_input_dir_to_create_n…
jedwards4b Apr 24, 2017
f8f0fec
Merge pull request #1402 from ESMCI/jgfouca/show_build_time_per_compo…
jedwards4b Apr 24, 2017
da9d3b8
Merge pull request #1299 from ESMCI/fischer/testreporter_rewrite_python
jedwards4b Apr 24, 2017
fea3f6b
Merge branch 'master' into billsacks/glc_tavg_v2
billsacks Apr 24, 2017
bbd6955
Minor changes to xmlchange
jgfouca Apr 23, 2017
0aedec3
Fix minor bug in test_scheduler
jgfouca Apr 24, 2017
68ab80b
Merge pull request #1406 from ESMCI/jgfouca/test_sched_bugfix
jedwards4b Apr 24, 2017
7c28d90
Merge pull request #1405 from ESMCI/jgfouca/xmlchange_append_add_space
jedwards4b Apr 24, 2017
cc6d449
Fix merge problem
billsacks Apr 24, 2017
6ccce68
handle case when executable is none (scripts_regression_tests)
jedwards4b Apr 24, 2017
919b770
Fix big mistake in scripts_regression_tests
jgfouca Apr 24, 2017
0fe9e3d
Merge pull request #1412 from ESMCI/jgfouca/fix_scripts_regr_test_rc
jedwards4b Apr 24, 2017
67b1be7
Merge pull request #1410 from jedwards4b/executable_none_fix
billsacks Apr 24, 2017
de5b988
PET must halve TASKS when doubling THRDS
jgfouca Apr 24, 2017
f7f0ff6
Remove glcrun_alarm from seq_infodata
billsacks Apr 25, 2017
0ed54b2
Double nodes instead of halving tasks
jgfouca Apr 25, 2017
07194c7
Fixed Some Issues Brought Up in Discussion
Apr 25, 2017
975958d
Re-initialize key case values upon case.setup
jgfouca Apr 25, 2017
4cb3075
Order of operations was not correct
jgfouca Apr 25, 2017
56aba43
PIO settings need to happen before init_derived_attributes
jgfouca Apr 25, 2017
97450b0
xmlchange now supports file option
jedwards4b Apr 25, 2017
970452c
working with xmlquery
jedwards4b Apr 25, 2017
6401d13
if --file option is used that should be the only file considered
jedwards4b Apr 25, 2017
f59dd4d
Merge pull request #1414 from ESMCI/jgfouca/pet_fix_plus_coverage
jedwards4b Apr 25, 2017
a8d7262
xmlquery works
jedwards4b Apr 26, 2017
1ac37dd
fix pylint issue
jedwards4b Apr 26, 2017
d75641a
Fix mistake
jgfouca Apr 26, 2017
d9d0f66
TOTAL_CORES needs to be set before xml files are locked
jgfouca Apr 26, 2017
b84e255
nag needs a lib pointer
jedwards4b Apr 26, 2017
14eeffb
remove broken pfunit directory
jedwards4b Apr 26, 2017
a5cfd29
Change PET test to fit on desktops
jgfouca Apr 26, 2017
6bd0e4e
Merge branch 'jgfouca/pet_fix_plus_coverage'
jgfouca Apr 26, 2017
e8212b4
fix query function for --file option and iscompvar
jedwards4b Apr 26, 2017
9e01f71
Removed Assignment Override and Fixed Some Logic
Apr 26, 2017
39289cc
Move tools/unit_testing to scripts/fortran_unit_testing
billsacks Apr 26, 2017
203b3b8
Remove README.unit_testing
billsacks Apr 26, 2017
75ff376
Clean up python in fortran_unit_testing directory
billsacks Apr 26, 2017
8924bb3
Merge pull request #1421 from jedwards4b/hobart_nag_fix
fischer-ncar Apr 26, 2017
9e8584d
remove debug print statement, fix netcdf4p support
jedwards4b Apr 26, 2017
3894f11
Update unit testing README file
billsacks Apr 26, 2017
540a9b0
Remove top level README
rljacob Apr 27, 2017
9428673
Add links names to README.md
rljacob Apr 27, 2017
2826d9c
Removed Tabs from create_newcase
Apr 27, 2017
6e5036a
Fixed Some Tabulation
Apr 27, 2017
c726ded
Merge pull request #1435 from ESMCI/erichlf/create_newcase/tabs2spaces
jgfouca Apr 27, 2017
633e73a
Add --component Option to preview_namelist
Apr 27, 2017
5c47982
Use system installed esmf libs on cheyenne
fvitt Apr 27, 2017
845bf15
Changes based on review
jgfouca Apr 27, 2017
670cf97
Merge remote-tracking branch 'origin/master' into jgfouca/new_query_t…
jgfouca Apr 27, 2017
dfa21c3
fix issue with setting comp_classes
jedwards4b Apr 27, 2017
78cf98c
Fix merge problem
jgfouca Apr 27, 2017
99b7c0e
improve error message
jedwards4b Apr 27, 2017
9c5b1aa
Merge pull request #1428 from billsacks/move_unit_tests
jedwards4b Apr 27, 2017
593834c
Add Some Additional Unit Tests for '+=
Apr 27, 2017
dc29942
Merge pull request #1359 from ESMCI/jgfouca/new_query_tools
jgfouca Apr 27, 2017
fe82bd6
Merge pull request #1413 from billsacks/billsacks/glc_tavg_v2
billsacks Apr 27, 2017
dcc8230
Added Description Back into Argparser
Apr 27, 2017
6d8ccb3
Merge pull request #1403 from fvitt/esmf
jedwards4b Apr 27, 2017
7c5fe9d
Untested implementation of specifying the directory to put the cime s…
mfdeakin Apr 28, 2017
5df7269
Update TestCreateNewcase to test setting script-root differently than…
mfdeakin-sandia Apr 28, 2017
ffe5ae0
Added Unit Test for '+=' to _parse_namelist_group
Apr 28, 2017
3038af7
Update ChangeLog
fischer-ncar Apr 28, 2017
50b30d1
_parse_namelist_group was Incorrect
Apr 28, 2017
ea2be88
Added an Additional Test to _preview_namelist_group
Apr 28, 2017
d3cf3f2
Add one more missing unit test
billsacks Apr 28, 2017
c4d4437
Merge pull request #1419 from jedwards4b/xmlcq_fileoption
jgfouca Apr 28, 2017
45af658
Merge pull request #1436 from ESMCI/erichlf/preview_namelists/component
jgfouca Apr 28, 2017
035d372
improve error message when config_files.xml is not found
jedwards4b Apr 28, 2017
84b7bde
Merge pull request #1389 from ESMCI/erichlf/namelist/plusEqual
billsacks Apr 28, 2017
e36efd2
cleanup pio defaults
jedwards4b Apr 28, 2017
c39a54c
add new gx1 degree maps
jtruesdal Apr 28, 2017
6d1aef1
fix pylint issues
jedwards4b Apr 28, 2017
65aa077
Pick up multi-instance cprnc.out files in summarize_cprnc_diffs
billsacks Apr 29, 2017
65d2b11
fix erp test build
jedwards4b Apr 30, 2017
6d8b24b
Merge pull request #1444 from jedwards4b/erp_test_fix
mvertens Apr 30, 2017
8cdfc54
Update ChangeLog
fischer-ncar May 1, 2017
f694dad
set build threaded before shared lib build
jedwards4b May 1, 2017
5dcb9ac
changes needed for nag to use erp test
jedwards4b May 1, 2017
fe9b2ea
fix pylint issues
jedwards4b May 1, 2017
f729c01
Merge branch 'erp_fix_again' of github.com:jedwards4b/cime into erp_f…
jedwards4b May 1, 2017
7692745
Merge pull request #1441 from jedwards4b/pio_default_settings
jayeshkrishna May 1, 2017
8ae6c5a
Fix pylint error
jgfouca May 1, 2017
ae2a5ca
Add Sandia Corporation to CIME LICENSE.TXT
agsalin Apr 12, 2017
dc32aaa
Merge pull request #5 from mnlevy1981/source_file_from_path
billsacks May 1, 2017
be5b347
Merge commit 'esmci/ae2a5ca' into update-to-cime5.3.1
agsalin May 1, 2017
3a498d2
Merge pull request #1371 from billsacks/source_file_from_path
billsacks May 1, 2017
1089e53
Merge pull request #1446 from ESMCI/jgfouca/fix_pylint_err_nml
jgfouca May 1, 2017
aa9018a
Merge pull request #1440 from jedwards4b/better_msg_for_config_files_…
jgfouca May 1, 2017
71cc74e
Merge pull request #1425 from jedwards4b/pio1_fixes
jedwards4b May 1, 2017
f6c05d1
Merge pull request #1442 from billsacks/summarize_cprnc_multiinst
fischer-ncar May 1, 2017
c1e5a38
Merge pull request #1445 from jedwards4b/erp_fix_again
mvertens May 1, 2017
b254a24
update to version pio2.2.1
jedwards4b May 1, 2017
fd8e016
updates example 1
jedwards4b May 1, 2017
f719bac
added :Faxa_nhx:Faxa_noy to Faxa fields if ndep_inparm contained nde…
Apr 17, 2017
ceee272
put in correct units
Apr 29, 2017
b091fb2
Update queue selection to take walltime into account
jgfouca May 1, 2017
1e7a85b
add check of command line args
jedwards4b Apr 19, 2017
cfe46bd
passing scripts_regression_tests
jedwards4b Apr 20, 2017
28f2d4b
remove white space
jedwards4b Apr 21, 2017
42df128
update template files
jedwards4b Apr 21, 2017
6027d32
fix mpirun string issue
jedwards4b Apr 21, 2017
887ca67
update run_tests.py
jedwards4b Apr 21, 2017
b420262
fix query_testlist
jedwards4b Apr 21, 2017
9719388
fix buildnml sub
jedwards4b Apr 21, 2017
d452bf1
fix bug in test_scheduler, allow old handler call format
jedwards4b Apr 24, 2017
a777895
first implementation of cam aquaplanet in docn
Apr 22, 2017
97ccc22
obtained same values for sst_option = 1
Apr 23, 2017
ca8b39f
changes to get input to cam same as cam aquaplanet model
Apr 25, 2017
9bf19d2
updates to have aquaplanet not depend on a new grid definition with a…
Apr 27, 2017
8f25847
fixed comment on new aquaplanet mode
Apr 29, 2017
3461b95
updated config_grids.xml to be the same as master
Apr 29, 2017
efd9f5f
rename function
jedwards4b May 1, 2017
b552281
fix pylint issues
jedwards4b May 1, 2017
0a70675
Minor pylint fix
jgfouca May 1, 2017
0e3cc76
Bug fixes
jgfouca May 1, 2017
505ce67
Merge pull request #1393 from jedwards4b/test_cli
jgfouca May 2, 2017
c10d097
fix typo in parse_args
jedwards4b May 2, 2017
d4dfbf1
Merge pull request #1452 from jedwards4b/acme_run_template_fix
jedwards4b May 2, 2017
ad30925
removed unpack commented region
May 2, 2017
16febe7
Add checks to verify the create_newcase directory was created as expe…
mfdeakin-sandia May 2, 2017
e5f144d
Merge pull request #1451 from ESMCI/mvertens/aquap
jedwards4b May 2, 2017
c76d946
Merge pull request #1448 from ESMCI/mvertens/ndep
jedwards4b May 2, 2017
357ad45
Merge pull request #1432 from ESMCI/rljacob/README-cleanup
jedwards4b May 2, 2017
76df711
nag compiler needs a width
jedwards4b May 2, 2017
0dcd36c
Merge pull request #1447 from jedwards4b/pio2_external_update
jayeshkrishna May 2, 2017
cf12200
Update ChangeLog
fischer-ncar May 2, 2017
a5da759
Merge pull request #1438 from ESMCI/mfdeakin-sandia/script_root_option
jgfouca May 2, 2017
4379cad
Do not override walltime unless test
jgfouca May 2, 2017
5619a82
Merge pull request #1455 from jtruesdal/newmaps
jedwards4b May 2, 2017
dc84643
Add tests
jgfouca May 2, 2017
26f0ffc
Fix single submit
jgfouca May 2, 2017
ce52822
Merge pull request #1450 from ESMCI/jgfouca/upgrade_queue_selection
jgfouca May 2, 2017
15297cd
Merge pull request #1453 from jedwards4b/nag_aquap_fix
mvertens May 2, 2017
eec8992
Merge '15297cd' into agsalin/update-to-cime5.3.1
agsalin May 2, 2017
a2caece
Revert change in pio1 to point into pio2/cmake
agsalin May 2, 2017
00bfdfe
Comment out invalid_args check
agsalin May 3, 2017
89f800a
Update Sandia worksations to gcc5.3.0
agsalin May 3, 2017
c063d81
Fix acme template change for new parser
agsalin May 3, 2017
7616e0e
Make single-dash before multichar arg a warning
agsalin May 3, 2017
8593b23
Merge branch 'master' into agsalin/update-to-cime5.3.1
jgfouca May 15, 2017
d0a1041
Bug fix: Handle failures to get mem usage from baselines
jgfouca May 16, 2017
91c202e
Fix upstream merge resolution mistake
jgfouca May 17, 2017
0540b7f
Add fix to bug in docn that was in this cime version
rljacob May 17, 2017
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
32 changes: 28 additions & 4 deletions cime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ cmake_minimum_required(VERSION 2.8)
include(ExternalProject)
set(CIME_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")

list(APPEND CMAKE_MODULE_PATH ${CIME_CMAKE_MODULE_DIRECTORY})
include(CIME_initial_setup)

project(cime_tests Fortran C)

# We rely on pio for cmake utilities like findnetcdf.cmake, so that we don't
# need to duplicate this cmake code
list(APPEND CMAKE_MODULE_PATH "${CIME_ROOT}/src/externals/pio2/cmake")

list(APPEND CMAKE_MODULE_PATH ${CIME_CMAKE_MODULE_DIRECTORY})
include(CIME_utils)
find_package(NetCDF COMPONENTS C Fortran)
include_directories(${NetCDF_C_INCLUDE_DIRS} ${NetCDF_Fortran_INCLUDE_DIRS})
Expand All @@ -21,14 +23,21 @@ include_directories(${NetCDF_C_INCLUDE_DIRS} ${NetCDF_Fortran_INCLUDE_DIRS})
# ------------------------------------------------------------------------
set(MCT_ROOT "${CIME_ROOT}/src/externals/mct")

if (USE_MPI_SERIAL)
set(ENABLE_MPI_SERIAL "--enable-mpiserial")
else()
set(ENABLE_MPI_SERIAL "")
endif()

ExternalProject_add(mct_project
PREFIX ${CMAKE_CURRENT_BINARY_DIR}
SOURCE_DIR ${MCT_ROOT}
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/mct
CONFIGURE_COMMAND ${MCT_ROOT}/configure --enable-debugging --prefix=${CMAKE_CURRENT_BINARY_DIR} CFLAGS=${CFLAGS} FCFLAGS=${FFLAGS} SRCDIR=${MCT_ROOT} DEBUG="-g"
BUILD_COMMAND $(MAKE)
CONFIGURE_COMMAND ${MCT_ROOT}/configure ${ENABLE_MPI_SERIAL} --enable-debugging --prefix=${CMAKE_CURRENT_BINARY_DIR} CC=${CMAKE_C_COMPILER} FC=${CMAKE_Fortran_COMPILER} CFLAGS=${CFLAGS} FCFLAGS=${FFLAGS} SRCDIR=${MCT_ROOT} DEBUG="-g"
BUILD_COMMAND $(MAKE) SRCDIR=${MCT_ROOT}
# Leave things in <BINARY_DIR> rather than "installing", because we have
# no need to move things around inside of the CMake binary directory.
# no need to move things around inside of the CMake binary directory. Also,
# mpi-serial doesn't install properly in the out-of-source build
INSTALL_COMMAND :
)
# This copy_makefiles step is needed because mct currently doesn't support an
Expand All @@ -43,12 +52,27 @@ ExternalProject_add_step(mct_project copy_makefiles
COMMAND mkdir -p mpeu
COMMAND cp -p <SOURCE_DIR>/mpeu/Makefile mpeu/
)
if (USE_MPI_SERIAL)
ExternalProject_add_step(mct_project copy_mpi_serial_files
DEPENDEES configure
DEPENDERS build
WORKING_DIRECTORY <BINARY_DIR>
COMMAND mkdir -p mpi-serial
COMMAND cp -p <SOURCE_DIR>/mpi-serial/Makefile mpi-serial/
COMMAND cp <SOURCE_DIR>/mpi-serial/mpif.h mpi-serial/
COMMAND cp <SOURCE_DIR>/mpi-serial/mpi.h mpi-serial/
)
endif()

# Tell cmake to look for libraries & mod files here, because this is where we built libraries
include_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mct)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpeu)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mct)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpeu)
if (USE_MPI_SERIAL)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpi-serial)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/mct/mpi-serial)
endif()

# ------------------------------------------------------------------------
# Done MCT build
Expand Down
Loading