Changeset 3628 for palm/trunk
- Timestamp:
- Dec 12, 2018 6:24:13 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/INSTALL/palm_installer_components
r3506 r3628 25 25 palm_installer_build() { 26 26 printf "%s\n" "${program_name} installer is configuring using cmake..." 27 if [[ "$palm_installer_build_rrtmg" == "true" ]]; then 28 if [[ "$RRTMG_ROOT" == "" ]]; then 29 RRTMG_ROOT=${install_prefix}/rrtmg 30 fi 31 fi 27 32 palm_installer_create_files 28 33 rm -rf ${build_dir} … … 33 38 ${NETCDF_C_ROOT:+-DNETCDF_C_ROOT=}${NETCDF_C_ROOT} \ 34 39 ${NETCDF_FORTRAN_ROOT:+-DNETCDF_FORTRAN_ROOT=}${NETCDF_FORTRAN_ROOT} \ 40 ${RRTMG_ROOT:+-DRRTMG_ROOT=}${RRTMG_ROOT} \ 35 41 -DPALM_CORES=$NUM_PROC_BUILD \ 36 42 -DCMAKE_BUILD_TYPE=Release \ … … 53 59 palm_installer_abort_message 54 60 fi 61 if [[ "$palm_installer_build_rrtmg" == "true" ]]; then 62 palm_installer_build_rrtmg 63 fi 55 64 cd ${install_prefix} 56 65 rm -rf ${source_dir} 57 66 rm -rf MAKE_DEPOSITORY_parallel 58 67 bash ${trunk_dir}/SCRIPTS/palmbuild -v -c "default" 68 } 69 70 palm_installer_build_rrtmg() { 71 printf "%s\n" "${program_name} installer is building the RRTMG library..." 72 local version="1.0" 73 local prog="librrtmg" 74 build_dir_rrtmg=${source_dir}/rrtmg 75 mkdir -p ${build_dir_rrtmg} 76 cp ${trunk_dir}/LIB/rrtmg/*.f90 ${build_dir_rrtmg}/ 77 cp ${trunk_dir}/LIB/rrtmg/Makefile ${build_dir_rrtmg}/ 78 cd ${build_dir_rrtmg} 79 bash ${build_dir_rrtmg}/build_rrtmg 80 mkdir -p ${build_dir_rrtmg}/lib 81 mkdir -p ${build_dir_rrtmg}/include 82 cp ${build_dir_rrtmg}/$prog.so ${build_dir_rrtmg}/lib/$prog.so.$version 83 cp ${build_dir_rrtmg}/*.mod ${build_dir_rrtmg}/include/ 84 mkdir -p ${RRTMG_ROOT}/lib 85 mkdir -p ${RRTMG_ROOT}/include 86 cp ${build_dir_rrtmg}/lib/$prog.so.$version ${RRTMG_ROOT}/lib/ 87 cp ${build_dir_rrtmg}/include/*.mod ${RRTMG_ROOT}/include/ 88 if [ -f ${RRTMG_ROOT}/lib/$prog.so.1 ] 89 then 90 rm ${RRTMG_ROOT}/lib/$prog.so.1 91 fi 92 ln -s ${RRTMG_ROOT}/lib/$prog.so.$version ${RRTMG_ROOT}/lib/$prog.so.1 93 if [ -f ${RRTMG_ROOT}/lib/$prog.so ] 94 then 95 rm ${RRTMG_ROOT}/lib/$prog.so 96 fi 97 ln -s ${RRTMG_ROOT}/lib/$prog.so.1 ${RRTMG_ROOT}/lib/$prog.so 59 98 } 60 99 … … 186 225 set(config \${CMAKE_INSTALL_PREFIX}/.palm.config.default) 187 226 227 # palmtest.yml locations 228 set(palmtest_in \${CMAKE_CURRENT_SOURCE_DIR}/.palmtest.yml.in) 229 set(palmtest \${CMAKE_INSTALL_PREFIX}/palmtest.yml) 230 231 # build_rrtmg locations 232 set(build_rrtmg_in \${CMAKE_CURRENT_SOURCE_DIR}/build_rrtmg.in) 233 set(build_rrtmg \${CMAKE_CURRENT_SOURCE_DIR}/rrtmg/build_rrtmg) 234 188 235 # include local cmake files 189 236 set(PALM_CMAKE_FILES \${CMAKE_CURRENT_SOURCE_DIR}) … … 254 301 set(PALM_COMPILER_OPTIONS "\${PALM_COMPILER_OPTIONS} -I \${NETCDF_INCLUDES}") 255 302 set(PALM_LINKER_OPTIONS "\${PALM_LINKER_OPTIONS} \${NETCDF_LIBRARIES}") 303 set(PALMTEST_NETCDF_INCLUDES "netcdf: \"-I \${NETCDF_INCLUDES}\"") 304 set(PALMTEST_NETCDF_LIBRARIES "netcdf: \"\${NETCDF_LIBRARIES}\"") 256 305 endif() 257 306 … … 259 308 set(PALM_COMPILER_OPTIONS "\${PALM_COMPILER_OPTIONS} -I \${FFTW_INCLUDES}") 260 309 set(PALM_LINKER_OPTIONS "\${PALM_LINKER_OPTIONS} \${FFTW_LIBRARIES}") 310 set(PALMTEST_FFTW_INCLUDES "fftw: \"-I \${FFTW_INCLUDES}\"") 311 set(PALMTEST_FFTW_LIBRARIES "fftw: \"\${FFTW_LIBRARIES}\"") 312 endif() 313 314 if(RRTMG_ROOT) 315 set(PALMTEST_RRTMG_INCLUDES "rrtmg: \"-I \${RRTMG_ROOT}/include\"") 316 set(PALMTEST_RRTMG_LIBRARIES "rrtmg: \"\${RRTMG_ROOT}/lib/librrtmg.so\"") 261 317 endif() 262 318 … … 267 323 configure_file(\${config_in} \${config} @ONLY) 268 324 325 # configuring the palmtest.yml 326 configure_file(\${palmtest_in} \${palmtest} @ONLY) 327 328 if(RRTMG_ROOT) 329 # configuring the build_rrtmg 330 configure_file(\${build_rrtmg_in} \${build_rrtmg} @ONLY) 331 endif() 269 332 270 333 EOF … … 532 595 533 596 EOF 597 598 cat > ${source_dir}/.palmtest.yml.in << EOF 599 --- 600 # this is a palmtest environments file 601 602 palm_config_template: 603 604 environments: 605 606 @CMAKE_Fortran_COMPILER_ID@: 607 executable: @CMAKE_Fortran_COMPILER@ 608 mpi_wrapper: @MPI_Fortran_COMPILER@ 609 include: 610 @PALMTEST_NETCDF_INCLUDES@ 611 @PALMTEST_FFTW_INCLUDES@ 612 @PALMTEST_RRTMG_INCLUDES@ 613 lib: 614 @PALMTEST_NETCDF_LIBRARIES@ 615 @PALMTEST_FFTW_LIBRARIES@ 616 @PALMTEST_RRTMG_LIBRARIES@ 617 618 EOF 619 620 cat > ${source_dir}/build_rrtmg.in << EOF 621 #!/usr/bin/env bash 622 623 make -f Makefile F90=@MPI_Fortran_COMPILER@ PROG=librrtmg F90FLAGS="@PALM_COMPILER_OPTIONS@" 624 625 EOF 626 627 534 628 } 535 629
Note: See TracChangeset
for help on using the changeset viewer.