-
Notifications
You must be signed in to change notification settings - Fork 32
Build nceplibs, use external libraries, and build different configurations in parallel #15
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
edbe6f4
creating a separate script for building libs used by shield build and…
laurenchilutti 89c858d
updates nceplibs to latest version, new build scripts for libfms and …
laurenchilutti 8738984
Adding license header, improving the external_libs option in COMPILE
laurenchilutti 1bf670e
Correcting Error in last commit
laurenchilutti 632c5a3
Removing prebuilt nceplibs. Modifying COMPILE to build libFMS and nc…
laurenchilutti bca743f
moving module load cmake to site specific environment file, adding cm…
laurenchilutti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -5,5 +5,6 @@ old | |
| exec | ||
| bin | ||
| libFMS | ||
| nceplibs | ||
| *.out | ||
| .lib* | ||
This file contains hidden or 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,78 @@ | ||
| #!/bin/bash | ||
| #*********************************************************************** | ||
| #* GNU Lesser General Public License | ||
| #* | ||
| #* This file is part of the SHiELD Build System. | ||
| #* | ||
| #* The SHiELD Build System free software: you can redistribute it | ||
| #* and/or modify it under the terms of the | ||
| #* GNU Lesser General Public License as published by the | ||
| #* Free Software Foundation, either version 3 of the License, or | ||
| #* (at your option) any later version. | ||
| #* | ||
| #* The SHiELD Build System distributed in the hope that it will be | ||
| #* useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
| #* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| #* See the GNU General Public License for more details. | ||
| #* | ||
| #* You should have received a copy of the GNU Lesser General Public | ||
| #* License along with theSHiELD Build System | ||
| #* If not, see <http://www.gnu.org/licenses/>. | ||
| #*********************************************************************** | ||
| # | ||
| # DISCLAIMER: This script is provided as-is and as such is unsupported. | ||
| # | ||
|
|
||
| # | ||
| # set default values | ||
| # configure your build parameters | ||
| compiler="intel" | ||
| # | ||
| # parse arguments | ||
| for arg in "$@" | ||
| do | ||
| case $arg in | ||
| intel|gnu) | ||
| compiler="${arg#*=}" | ||
| shift # Remove "compiler" from processing | ||
| ;; | ||
| *) | ||
| if [ ${arg#} != '--help' ] && [ ${arg#} != '-h' ] ; then | ||
| echo "option "${arg#}" not found" | ||
| fi | ||
| echo -e ' ' | ||
| echo -e "valid options are:" | ||
| echo -e "\t[intel(D) | gnu] \t\t\t compiler" | ||
| echo -e "\n" | ||
| exit | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| # | ||
| # set up some default variables if not called from COMPILE | ||
| # NCEP_DIR is set if this script is called from the COMPILE script | ||
| # EXTERNAL_LIBS is set if using external location for storage of libFMS | ||
| if [ -z ${NCEP_DIR} ] ; then | ||
| export BUILD_ROOT=${PWD%/*} | ||
| export SHiELD_SRC=${PWD%/*/*}/SHiELD_SRC/ | ||
| export PATH="${BUILD_ROOT}/mkmf/bin:${BUILD_ROOT}/Build/mk_scripts:${PATH}" | ||
| export NCEP_DIR=${BUILD_ROOT}/Build | ||
| if [ ! -z ${EXTERNAL_LIBS} ] ; then | ||
| export NCEP_DIR=${EXTERNAL_LIBS} | ||
| fi | ||
| # load the proper environment for your machine | ||
| . ${BUILD_ROOT}/site/environment.${compiler}.sh | ||
| fi | ||
|
|
||
| # | ||
| # build FMS library | ||
| echo " building ${NCEP_DIR}/libFMS/${compiler}" | ||
| MAKE_libFMS ${compiler} >> build_libFMS_${compiler}.out 2>&1 # build 32bit and 64bit versions of libFMS | ||
| # | ||
| # test and report on libFMS build success | ||
| if [ $? -ne 0 ] ; then | ||
| echo ">>> ${NCEPDIR}/libFMS/${compiler} build failed" | ||
| exit 1 | ||
| fi | ||
| echo " libFMS build successful" |
This file contains hidden or 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,101 @@ | ||
| #!/bin/bash | ||
| #*********************************************************************** | ||
| #* GNU Lesser General Public License | ||
| #* | ||
| #* This file is part of the SHiELD Build System. | ||
| #* | ||
| #* The SHiELD Build System free software: you can redistribute it | ||
| #* and/or modify it under the terms of the | ||
| #* GNU Lesser General Public License as published by the | ||
| #* Free Software Foundation, either version 3 of the License, or | ||
| #* (at your option) any later version. | ||
| #* | ||
| #* The SHiELD Build System distributed in the hope that it will be | ||
| #* useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
| #* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| #* See the GNU General Public License for more details. | ||
| #* | ||
| #* You should have received a copy of the GNU Lesser General Public | ||
| #* License along with theSHiELD Build System | ||
| #* If not, see <http://www.gnu.org/licenses/>. | ||
| #*********************************************************************** | ||
| # | ||
| # DISCLAIMER: This script is provided as-is and as such is unsupported. | ||
| # | ||
|
|
||
| #set default compiler | ||
| compiler="intel" | ||
|
|
||
| # parse arguments | ||
| for arg in "$@" | ||
| do | ||
| case $arg in | ||
| intel|gnu) | ||
| compiler="${arg#*=}" | ||
| shift # Remove "compiler" from processing | ||
| ;; | ||
| *) | ||
| if [ ${arg#} != '--help' ] && [ ${arg#} != '-h' ] ; then | ||
| echo "option "${arg#}" not found" | ||
| fi | ||
| echo -e ' ' | ||
| echo -e "valid options are:" | ||
| echo -e "\t[intel(D) | gnu] \t\t\t compiler" | ||
| echo -e "\n" | ||
| exit | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| # set up some default variables if not called from COMPILE | ||
| # NCEP_DIR is set if this script is called from the COMPILE script | ||
| # EXTERNAL_LIBS is set if using external location for storage of nceplibs | ||
| if [ -z ${NCEP_DIR} ] ; then | ||
| BUILD_ROOT=${PWD%/*} | ||
| NCEP_DIR=${BUILD_ROOT}/Build | ||
| if [ ! -z ${EXTERNAL_LIBS} ] ; then | ||
| NCEP_DIR=${EXTERNAL_LIBS} | ||
| fi | ||
| # load the proper environment for your machine | ||
| . ${BUILD_ROOT}/site/environment.${compiler}.sh | ||
| fi | ||
|
|
||
| nceplibs_dir=${NCEP_DIR}/nceplibs/${compiler} | ||
| \rm -rf $nceplibs_dir | ||
|
|
||
|
|
||
| git clone https://github.com/NOAA-EMC/NCEPLIBS-bacio | ||
| pushd NCEPLIBS-bacio | ||
| cmake -DCMAKE_C_STANDARD=99 -DCMAKE_INSTALL_PREFIX=${BUILD_ROOT}/Build/NCEPLIBS-bacio/install . | ||
| make -j8 | ||
| make install | ||
| popd | ||
|
|
||
| git clone https://github.com/NOAA-EMC/NCEPLIBS-sp | ||
| pushd NCEPLIBS-sp | ||
| cmake -DCMAKE_C_STANDARD=99 -DCMAKE_INSTALL_PREFIX=${BUILD_ROOT}/Build/NCEPLIBS-sp/install . | ||
| make -j8 sp_d | ||
| make install | ||
| popd | ||
|
|
||
| git clone https://github.com/NOAA-EMC/NCEPLIBS-w3emc | ||
| pushd NCEPLIBS-w3emc | ||
| cmake -DCMAKE_C_STANDARD=99 -DCMAKE_INSTALL_PREFIX=${BUILD_ROOT}/Build/NCEPLIBS-w3emc/install -DCMAKE_PREFIX_PATH=${BUILD_ROOT}/Build/NCEPLIBS-bacio/install/lib/cmake/bacio/ . | ||
| make -j8 w3emc_d | ||
| make install | ||
| popd | ||
|
|
||
| git clone https://github.com/NOAA-EMC/NCEPLIBS-w3nco | ||
| pushd NCEPLIBS-w3nco | ||
| cmake -DCMAKE_C_STANDARD=99 -DCMAKE_INSTALL_PREFIX=${BUILD_ROOT}/Build/NCEPLIBS-w3nco/install . | ||
| make -j8 w3nco_d | ||
| make install | ||
| popd | ||
|
|
||
| mkdir -p $nceplibs_dir | ||
| mv ${BUILD_ROOT}/Build/NCEPLIBS-bacio/install/lib/libbacio.a $nceplibs_dir/. | ||
| mv ${BUILD_ROOT}/Build/NCEPLIBS-sp/install/lib64/libsp_d.a $nceplibs_dir/. | ||
| mv ${BUILD_ROOT}/Build/NCEPLIBS-w3emc/install/lib64/libw3emc_d.a $nceplibs_dir/. | ||
| mv ${BUILD_ROOT}/Build/NCEPLIBS-w3nco/install/lib/libw3nco_d.a $nceplibs_dir/. | ||
|
|
||
| \rm -rf NCEPLIBS-bacio NCEPLIBS-sp NCEPLIBS-w3emc NCEPLIBS-w3nco |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.