Changeset 211 for palm/trunk/SCRIPTS/mrun
- Timestamp:
- Nov 11, 2008 4:46:24 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/mrun
r210 r211 157 157 # 21/10/08 - Siggi - bugfix for the case that -K has more than one 158 158 # argument 159 # 08/11/08 - Siggi - bugfix for depository path settings in configuration 160 # file 161 # 11/11/08 - Siggi - rules for using user code files changed: user 162 # code splitted into one file per subroutine, 163 # user can provide his/her own makefile, only 164 # default source-code filenames are allowed 165 166 159 167 160 168 # VARIABLENVEREINBARUNGEN + DEFAULTWERTE … … 1622 1630 1623 1631 1632 # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN 1633 # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN... 1634 if [[ "$restart_run" != true ]] 1635 then 1636 [[ "$makefile" = "" ]] && makefile=$source_path/Makefile 1637 if [[ ! -f $makefile ]] 1638 then 1639 printf "\n +++ file \"$makefile\" does not exist" 1640 locat=make; exit 1641 else 1642 cp $makefile SOURCES_FOR_RUN_$fname/Makefile 1643 fi 1644 fi 1645 1646 1624 1647 # DATEIEN AUS ZUSAETZLICHEM QUELLVERZEICHNIS HINZUFUEGEN 1625 1648 if [[ $restart_run != true && "$add_source_path" != "" ]] … … 1638 1661 1639 1662 cd $add_source_path 1663 found=false 1640 1664 1641 1665 Names=$(ls -1 *.f90 2>&1) … … 1653 1677 cd SOURCES_FOR_RUN_$fname 1654 1678 1679 # COPY MAKEFILE IF EXISTING 1680 if [[ -f $add_source_path/Makefile ]] 1681 then 1682 printf "\n\n *** user Makefile from directory" 1683 printf "\n \"$add_source_path\" is used \n" 1684 sleep 1 1685 cp $add_source_path/Makefile . 1686 fi 1687 1655 1688 for dateiname in $AddFilenames 1656 1689 do … … 1659 1692 printf "\n +++ source code file \"$dateiname\" found in additional" 1660 1693 printf "\n source code directory \"$add_source_path\" " 1661 printf "\n as well as in directory \"$source_path\"." 1694 printf "\n but was also given with option \"-s\" which means that it should be taken" 1695 printf "\n from directory \"$source_path\"." 1662 1696 locat=source; exit 1663 1697 fi … … 1666 1700 source_list="$source_list $dateiname" 1667 1701 1702 # CHECK IF FILE IS CONTAINED IN MAKEFILE 1703 if [[ $(grep -c $dateiname Makefile) = 0 ]] 1704 then 1705 printf "\n\n +++ user file \"$dateiname\" " 1706 printf "\n is not listed in Makefile \n" 1707 locat=source; exit 1708 else 1709 1668 1710 # Default User-Interface von der Liste entfernen, falls Datei 1669 1711 # ein User-Interface enthaelt 1670 if [[ $( cat $dateiname | grep -c "END SUBROUTINE user_parin" ) != 0 ]] 1671 then 1672 if [[ $dateiname != user_interface.f90 && -f user_interface.f90 ]] 1712 # if [[ $( cat $dateiname | grep -c "END SUBROUTINE user_parin" ) != 0 ]] 1713 # then 1714 # if [[ $dateiname != user_interface.f90 && -f user_interface.f90 ]] 1715 # then 1716 # rm -rf user_interface.f90 1717 # source_list=`echo $source_list | sed -e 's/user_interface.f90//'` 1718 # printf "\n\n *** default \"user_interface.f90\" removed from the files to be translated" 1719 # printf "\n since a user-interface is found in file" 1720 # printf "\n \"$add_source_path/$dateiname\" \n" 1721 # sleep 3 1722 # else 1723 if [[ $found = false ]] 1673 1724 then 1674 rm -rf user_interface.f90 1675 source_list=`echo $source_list | sed -e 's/user_interface.f90//'` 1676 printf "\n\n *** default \"user_interface.f90\" removed from the files to be translated" 1677 printf "\n since a user-interface is found in file" 1678 printf "\n \"$add_source_path/$dateiname\" \n" 1679 sleep 3 1680 else 1681 printf "\n\n *** user-interface file \"$dateiname\" " 1682 printf "\n added to the files to be translated \n" 1683 sleep 3 1725 found=true 1726 printf "\n\n *** following user file(s) added to the" 1727 printf " files to be translated:\n " 1684 1728 fi 1729 printf "$dateiname " 1730 sleep 0.5 1685 1731 fi 1686 1732 done 1687 1733 [[ $found = true ]] && printf "\n" 1688 1734 cd - > /dev/null 1689 1735 fi … … 1733 1779 # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN 1734 1780 # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN... 1735 if [[ "$restart_run" != true ]]1736 then1737 [[ "$makefile" = "" ]] && makefile=$source_path/Makefile1738 if [[ ! -f $makefile ]]1739 then1740 printf "\n +++ file \"$makefile\" does not exist"1741 locat=make; exit1742 else1743 cp $makefile SOURCES_FOR_RUN_$fname/Makefile1744 fi1745 fi1781 # if [[ "$restart_run" != true ]] 1782 # then 1783 # [[ "$makefile" = "" ]] && makefile=$source_path/Makefile 1784 # if [[ ! -f $makefile ]] 1785 # then 1786 # printf "\n +++ file \"$makefile\" does not exist" 1787 # locat=make; exit 1788 # else 1789 # cp $makefile SOURCES_FOR_RUN_$fname/Makefile 1790 # fi 1791 # fi 1746 1792 1747 1793 fi # do_compile=true … … 2220 2266 if [[ "$line" != "" && $(echo $line | cut -c1) != "#" ]] 2221 2267 then 2222 local_depository_path=`echo $line | cut -d" " -s -f2` 2268 if [[ "$(echo $line | cut -d" " -s -f4)" = "$cond1" && "$(echo $line | cut -d" " -s -f5)" = "$cond2" ]] 2269 then 2270 local_depository_path=`echo $line | cut -d" " -s -f2` 2271 fi 2223 2272 fi 2224 2273 done < tmp_mrun … … 2257 2306 # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS 2258 2307 # MAKEFILE EINTRAGEN 2259 cd $TEMPDIR_COMPILE2260 interface_file=`grep -l "END SUBROUTINE user_parin" $source_list`2261 if [[ "$interface_file" != "" ]]2262 then2263 interface_file=`echo $interface_file | cut -d"." -f1`2264 mv Makefile Makefile_old2265 sed "s/user_interface/$interface_file/g" Makefile_old > Makefile2266 fi2267 cd - > /dev/null2308 # cd $TEMPDIR_COMPILE 2309 # interface_file=`grep -l "END SUBROUTINE user_parin" $source_list` 2310 # if [[ "$interface_file" != "" ]] 2311 # then 2312 # interface_file=`echo $interface_file | cut -d"." -f1` 2313 # mv Makefile Makefile_old 2314 # sed "s/user_interface/$interface_file/g" Makefile_old > Makefile 2315 # fi 2316 # cd - > /dev/null 2268 2317 else 2269 2318 cp $executable ${TEMPDIR}/a.out … … 2301 2350 printf "\n\n\n *** compilation starts \n$striche\n" 2302 2351 printf " *** compilation with make using following options:\n" 2352 printf " make depository: $make_depository" 2303 2353 printf " compilername: $compiler_name\n" 2304 2354 printf " options: $fopts\n" … … 2715 2765 if [[ "$ENVIRONMENT" = BATCH ]] 2716 2766 then 2717 printf "\n +++ debug is allowed in interactive mode only" 2718 locat=debug 2719 exit 2767 if [[ $(echo $localhost | cut -c1-5) != lcsgi ]] 2768 then 2769 printf "\n +++ debug is allowed in interactive mode only" 2770 locat=debug 2771 exit 2772 fi 2720 2773 fi 2721 2774 if [[ $localhost = decalpha ]] … … 2756 2809 totalview poe -a a.out -procs $numprocs -rmpool 0 -nodes 1 $ROPTS 2757 2810 fi 2811 elif [[ $(echo $localhost | cut -c1-5) = lcsgi ]] 2812 then 2813 # CURRENTLY NO DEBUGGER ON LCSGI 2814 if [[ $run_coupled_model = true ]] 2815 then 2816 printf "\n +++ no debug in coupled mode available on \"$localhost\" " 2817 locat=debug 2818 exit 2819 fi 2820 (( ii = $numprocs / $threads_per_task )) 2821 export OMP_NUM_THREADS=$threads_per_task 2822 echo "OMP_NUM_THREADS=$OMP_NUM_THREADS" 2823 if [[ $threads_per_task != 1 ]] 2824 then 2825 printf "\n threads per task: $threads_per_task" 2826 fi 2827 printf "\n\n" 2828 # ulimit -s 300000 # A too large stack size causes problems 2829 # export MV2_NUM_PORTS=2 2830 # export MV2_CPU_MAPPING=0:1:2:3 2831 # mpiexec ./a.out $ROPTS 2832 # export MPI_LAUNCH_TIMEOUT=360 2833 echo "no_coupling" > runfile_atmos 2834 mpiexec_mpt -np $ii ./a.out $ROPTS 2758 2835 else 2759 2836 printf "\n +++ no debug available on \"$localhost\" "
Note: See TracChangeset
for help on using the changeset viewer.