From 90e9b98584f6c6e1860c10a77e4f3d1a7e01c2a7 Mon Sep 17 00:00:00 2001 From: Arka Lahiri Date: Wed, 9 May 2018 16:35:09 +0200 Subject: [PATCH 01/54] performance profiling should not be part of the source code --- src/constitutive.f90 | 20 +-- src/crystallite.f90 | 78 +++++------ src/debug.f90 | 290 ++++++++++++++++++++--------------------- src/homogenization.f90 | 14 +- 4 files changed, 201 insertions(+), 201 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index a62245f99..27e81e03e 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -838,8 +838,8 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra pReal, & pLongInt use debug, only: & - debug_cumDotStateCalls, & - debug_cumDotStateTicks, & + !debug_cumDotStateCalls, & + !debug_cumDotStateTicks, & debug_level, & debug_constitutive, & debug_levelBasic @@ -951,10 +951,10 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) !$OMP CRITICAL (debugTimingDotState) - debug_cumDotStateCalls = debug_cumDotStateCalls + 1_pInt - debug_cumDotStateTicks = debug_cumDotStateTicks + tock-tick + !debug_cumDotStateCalls = debug_cumDotStateCalls + 1_pInt + !debug_cumDotStateTicks = debug_cumDotStateTicks + tock-tick !$OMP FLUSH (debug_cumDotStateTicks) - if (tock < tick) debug_cumDotStateTicks = debug_cumDotStateTicks + maxticks + !if (tock < tick) debug_cumDotStateTicks = debug_cumDotStateTicks + maxticks !$OMP END CRITICAL (debugTimingDotState) endif end subroutine constitutive_collectDotState @@ -968,8 +968,8 @@ subroutine constitutive_collectDeltaState(Tstar_v, Fe, ipc, ip, el) pReal, & pLongInt use debug, only: & - debug_cumDeltaStateCalls, & - debug_cumDeltaStateTicks, & + !debug_cumDeltaStateCalls, & + !debug_cumDeltaStateTicks, & debug_level, & debug_constitutive, & debug_levelBasic @@ -1035,10 +1035,10 @@ subroutine constitutive_collectDeltaState(Tstar_v, Fe, ipc, ip, el) if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) !$OMP CRITICAL (debugTimingDeltaState) - debug_cumDeltaStateCalls = debug_cumDeltaStateCalls + 1_pInt - debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + tock-tick + !debug_cumDeltaStateCalls = debug_cumDeltaStateCalls + 1_pInt + !debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + tock-tick !$OMP FLUSH (debug_cumDeltaStateTicks) - if (tock < tick) debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + maxticks + !if (tock < tick) debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + maxticks !$OMP END CRITICAL (debugTimingDeltaState) endif diff --git a/src/crystallite.f90 b/src/crystallite.f90 index 12bf19871..a28c8f208 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -529,8 +529,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco) debug_levelSelective, & debug_e, & debug_i, & - debug_g, & - debug_CrystalliteLoopDistribution + debug_g!, & + !debug_CrystalliteLoopDistribution use IO, only: & IO_warning, & IO_error @@ -949,8 +949,8 @@ subroutine crystallite_stressAndItsTangent(updateJaco) if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt & .and. formerSubStep > 0.0_pReal) then !$OMP CRITICAL (distributionCrystallite) - debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = & - debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt + !debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = & + !debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt !$OMP END CRITICAL (distributionCrystallite) endif endif @@ -1259,8 +1259,8 @@ subroutine crystallite_integrateStateRK4() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective, & - debug_StateLoopDistribution + debug_levelSelective !, & + !debug_StateLoopDistribution use FEsolving, only: & FEsolving_execElem, & FEsolving_execIP @@ -1519,8 +1519,8 @@ subroutine crystallite_integrateStateRK4() crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - debug_StateLoopDistribution(4,numerics_integrationMode) = & - debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt + !debug_StateLoopDistribution(4,numerics_integrationMode) = & + !debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -1555,8 +1555,8 @@ subroutine crystallite_integrateStateRKCK45() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective, & - debug_StateLoopDistribution + debug_levelSelective!, & + !debug_StateLoopDistribution use numerics, only: & rTol_crystalliteState, & numerics_integrationMode @@ -2023,8 +2023,8 @@ subroutine crystallite_integrateStateRKCK45() crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definition if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - debug_StateLoopDistribution(6,numerics_integrationMode) = & - debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt + !debug_StateLoopDistribution(6,numerics_integrationMode) = & + !debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2060,8 +2060,8 @@ subroutine crystallite_integrateStateAdaptiveEuler() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective, & - debug_StateLoopDistribution + debug_levelSelective!, & + !debug_StateLoopDistribution use numerics, only: & rTol_crystalliteState, & numerics_integrationMode @@ -2365,8 +2365,8 @@ subroutine crystallite_integrateStateAdaptiveEuler() crystallite_converged(g,i,e) = .true. ! ... converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - debug_StateLoopDistribution(2,numerics_integrationMode) = & - debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt + !debug_StateLoopDistribution(2,numerics_integrationMode) = & + !debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2383,8 +2383,8 @@ subroutine crystallite_integrateStateAdaptiveEuler() crystallite_converged(g,i,e) = .true. ! ... converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - debug_StateLoopDistribution(2,numerics_integrationMode) = & - debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt + !debug_StateLoopDistribution(2,numerics_integrationMode) = & + !debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2422,8 +2422,8 @@ subroutine crystallite_integrateStateEuler() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective, & - debug_StateLoopDistribution + debug_levelSelective!, & + !debug_StateLoopDistribution use numerics, only: & numerics_integrationMode, & numerics_timeSyncing @@ -2608,8 +2608,8 @@ eIter = FEsolving_execElem(1:2) crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - debug_StateLoopDistribution(1,numerics_integrationMode) = & - debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt + !debug_StateLoopDistribution(1,numerics_integrationMode) = & + !debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2647,8 +2647,8 @@ subroutine crystallite_integrateStateFPI() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective, & - debug_StateLoopDistribution + debug_levelSelective!, & + !debug_StateLoopDistribution use numerics, only: & nState, & numerics_integrationMode, & @@ -3025,8 +3025,8 @@ subroutine crystallite_integrateStateFPI() if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = & - debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt + !debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = & + !debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -3246,12 +3246,12 @@ logical function crystallite_integrateStress(& #ifdef DEBUG debug_e, & debug_i, & - debug_g, & + debug_g!, & #endif - debug_cumLpCalls, & - debug_cumLpTicks, & - debug_StressLoopLpDistribution, & - debug_StressLoopLiDistribution + !debug_cumLpCalls, & + !debug_cumLpTicks, & + !debug_StressLoopLpDistribution, & + !debug_StressLoopLiDistribution use constitutive, only: constitutive_LpAndItsTangent, & constitutive_LiAndItsTangent, & constitutive_TandItsTangent @@ -3353,7 +3353,7 @@ logical function crystallite_integrateStress(& if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt & .and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) & .or. .not. iand(debug_level(debug_crystallite), debug_levelSelective) /= 0_pInt)) & - write(6,'(a,i8,1x,i2,1x,i3)') '<< CRYST >> integrateStress at el ip ipc ',el,ip,ipc + write(6,'(a,i8,1x,i2,1x,i3)') '<< CRYST >> integrateStress at el ip ipc ',el,ip,ipc #endif !* only integrate over fraction of timestep? @@ -3477,10 +3477,10 @@ logical function crystallite_integrateStress(& if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) !$OMP CRITICAL (debugTimingLpTangent) - debug_cumLpCalls = debug_cumLpCalls + 1_pInt - debug_cumLpTicks = debug_cumLpTicks + tock-tick + !debug_cumLpCalls = debug_cumLpCalls + 1_pInt + !debug_cumLpTicks = debug_cumLpTicks + tock-tick !$OMP FLUSH (debug_cumLpTicks) - if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks + !if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks !$OMP END CRITICAL (debugTimingLpTangent) endif @@ -3583,8 +3583,8 @@ logical function crystallite_integrateStress(& if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionStress) - debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = & - debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt + !debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = & + !debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionStress) endif @@ -3670,8 +3670,8 @@ logical function crystallite_integrateStress(& if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionStress) - debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = & - debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt + !debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = & + !debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionStress) endif diff --git a/src/debug.f90 b/src/debug.f90 index feb1c9fe4..e07a2e12a 100644 --- a/src/debug.f90 +++ b/src/debug.f90 @@ -46,20 +46,20 @@ module debug integer(pInt),protected, dimension(debug_maxNtype+2_pInt), public :: & ! specific ones, and 2 for "all" and "other" debug_level = 0_pInt - integer(pLongInt), public :: & - debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent - debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState - debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState + !integer(pLongInt), public :: & + !debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent + !debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState + !debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState integer(pInt), protected, public :: & debug_e = 1_pInt, & debug_i = 1_pInt, & debug_g = 1_pInt - integer(pLongInt), public :: & - debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent - debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState - debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState + !integer(pLongInt), public :: & + !debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent + !debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState + !debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState integer(pInt), dimension(2), public :: & debug_stressMaxLocation = 0_pInt, & @@ -68,15 +68,15 @@ module debug debug_jacobianMinLocation = 0_pInt - integer(pInt), dimension(:), allocatable, public :: & - debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks - debug_MaterialpointStateLoopDistribution, & - debug_MaterialpointLoopDistribution + !integer(pInt), dimension(:), allocatable, public :: & + !debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks + !debug_MaterialpointStateLoopDistribution, & + !debug_MaterialpointLoopDistribution - integer(pInt), dimension(:,:), allocatable, public :: & - debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence - debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence - debug_StateLoopDistribution !< distribution of state iterations until convergence + !integer(pInt), dimension(:,:), allocatable, public :: & + !debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence + !debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence + !debug_StateLoopDistribution !< distribution of state iterations until convergence real(pReal), public :: & debug_stressMax = -huge(1.0_pReal), & @@ -107,12 +107,12 @@ subroutine debug_init compiler_version, & compiler_options #endif - use numerics, only: & - nStress, & - nState, & - nCryst, & - nMPstate, & - nHomog +! use numerics, only: & +! nStress, & +! nState, & +! nCryst, & +! nMPstate, & +! nHomog use IO, only: & IO_read, & IO_error, & @@ -137,12 +137,12 @@ subroutine debug_init write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" - allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt) - allocate(debug_StressLoopLiDistribution(nStress+1,2), source=0_pInt) - allocate(debug_StateLoopDistribution(nState+1,2), source=0_pInt) - allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt) - allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt) - allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt) + !allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt) + !allocate(debug_StressLoopLiDistribution(nStress+1,2), source=0_pInt) + !allocate(debug_StateLoopDistribution(nState+1,2), source=0_pInt) + !allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt) + !allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt) + !allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt) !-------------------------------------------------------------------------------------------------- ! try to open the config file @@ -297,18 +297,18 @@ subroutine debug_reset implicit none - debug_StressLoopLpDistribution = 0_pInt - debug_StressLoopLiDistribution = 0_pInt - debug_StateLoopDistribution = 0_pInt - debug_CrystalliteLoopDistribution = 0_pInt - debug_MaterialpointStateLoopDistribution = 0_pInt - debug_MaterialpointLoopDistribution = 0_pInt - debug_cumLpTicks = 0_pLongInt - debug_cumDeltaStateTicks = 0_pLongInt - debug_cumDotStateTicks = 0_pLongInt - debug_cumLpCalls = 0_pInt - debug_cumDeltaStateCalls = 0_pInt - debug_cumDotStateCalls = 0_pInt + !debug_StressLoopLpDistribution = 0_pInt + !debug_StressLoopLiDistribution = 0_pInt + !debug_StateLoopDistribution = 0_pInt + !debug_CrystalliteLoopDistribution = 0_pInt + !debug_MaterialpointStateLoopDistribution = 0_pInt + !debug_MaterialpointLoopDistribution = 0_pInt + !debug_cumLpTicks = 0_pLongInt + !debug_cumDeltaStateTicks = 0_pLongInt + !debug_cumDotStateTicks = 0_pLongInt + !debug_cumLpCalls = 0_pInt + !debug_cumDeltaStateCalls = 0_pInt + !debug_cumDotStateCalls = 0_pInt debug_stressMaxLocation = 0_pInt debug_stressMinLocation = 0_pInt debug_jacobianMaxLocation = 0_pInt @@ -325,123 +325,123 @@ end subroutine debug_reset !> @brief writes debug statements to standard out !-------------------------------------------------------------------------------------------------- subroutine debug_info - use numerics, only: & - nStress, & - nState, & - nCryst, & - nMPstate, & - nHomog +! use numerics, only: & +! nStress, & +! nState, & +! nCryst, & +! nMPstate, & +! nHomog implicit none - integer(pInt) :: j,integral - integer(pLongInt) :: tickrate + !integer(pInt) :: j,integral + !integer(pLongInt) :: tickrate character(len=1) :: exceed - call system_clock(count_rate=tickrate) + !call system_clock(count_rate=tickrate) !$OMP CRITICAL (write2out) - debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then - write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)' - write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls - if (debug_cumLpCalls > 0_pInt) then - write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& - real(debug_cumLpTicks,pReal)/real(tickrate,pReal) - write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& - real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal) - endif - write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls - if (debug_cumdotStateCalls > 0_pInt) then - write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& - real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal) - write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& - real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal) - endif - write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls - if (debug_cumDeltaStateCalls > 0_pInt) then - write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& - real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal) - write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& - real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal) - endif + !debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then + !write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)' + !write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls + !if (debug_cumLpCalls > 0_pInt) then + !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& + !real(debug_cumLpTicks,pReal)/real(tickrate,pReal) + !!write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& + !real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal) + !endif + !write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls + !if (debug_cumdotStateCalls > 0_pInt) then + !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& + !real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal) + !write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& + !real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal) + !endif + !write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls + !if (debug_cumDeltaStateCalls > 0_pInt) then + !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& + !real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal) + !write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& + !real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal) + !endif - integral = 0_pInt - write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness' - do j=1_pInt,nStress+1_pInt - if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then - integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2)) - exceed = ' ' - if (j > nStress) exceed = '+' ! last entry gets "+" - write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),& - debug_StressLoopLpDistribution(j,2) - endif - enddo - write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), & - sum(debug_StressLoopLpDistribution(:,2)) + !integral = 0_pInt + !write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness' + !do j=1_pInt,nStress+1_pInt + !if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then + !integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2)) + !exceed = ' ' + !if (j > nStress) exceed = '+' ! last entry gets "+" + !write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),& + !debug_StressLoopLpDistribution(j,2) + !endif + !enddo + !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), & + !sum(debug_StressLoopLpDistribution(:,2)) - integral = 0_pInt - write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness' - do j=1_pInt,nStress+1_pInt - if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then - integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2)) - exceed = ' ' - if (j > nStress) exceed = '+' ! last entry gets "+" - write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),& - debug_StressLoopLiDistribution(j,2) - endif - enddo - write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), & - sum(debug_StressLoopLiDistribution(:,2)) + !integral = 0_pInt + !write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness' + !do j=1_pInt,nStress+1_pInt + !if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then + !integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2)) + !exceed = ' ' + !if (j > nStress) exceed = '+' ! last entry gets "+" + !write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),& + ! debug_StressLoopLiDistribution(j,2) + !endif + !enddo + !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), & + ! sum(debug_StressLoopLiDistribution(:,2)) - integral = 0_pInt - write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :' - do j=1_pInt,nState+1_pInt - if (any(debug_StateLoopDistribution(j,:) /= 0)) then - integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2)) - exceed = ' ' - if (j > nState) exceed = '+' ! last entry gets "+" - write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),& - debug_StateLoopDistribution(j,2) - endif - enddo - write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), & - sum(debug_StateLoopDistribution(:,2)) + !integral = 0_pInt + !write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :' + !do j=1_pInt,nState+1_pInt + !if (any(debug_StateLoopDistribution(j,:) /= 0)) then + !integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2)) + !exceed = ' ' + !if (j > nState) exceed = '+' ! last entry gets "+" + !write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),& + ! debug_StateLoopDistribution(j,2) + !endif + !enddo + !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), & + ! sum(debug_StateLoopDistribution(:,2)) - integral = 0_pInt - write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :' - do j=1_pInt,nCryst+1_pInt - if (debug_CrystalliteLoopDistribution(j) /= 0) then - integral = integral + j*debug_CrystalliteLoopDistribution(j) - exceed = ' ' - if (j > nCryst) exceed = '+' - write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j) - endif - enddo - write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution) - endif debugOutputCryst + !integral = 0_pInt + !write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :' + !do j=1_pInt,nCryst+1_pInt + !if (debug_CrystalliteLoopDistribution(j) /= 0) then + !integral = integral + j*debug_CrystalliteLoopDistribution(j) + !exceed = ' ' + !if (j > nCryst) exceed = '+' + !write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j) + !endif + !enddo + !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution) + !endif debugOutputCryst - debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then - integral = 0_pInt - write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :' - do j=1_pInt,nMPstate - if (debug_MaterialpointStateLoopDistribution(j) /= 0) then - integral = integral + j*debug_MaterialpointStateLoopDistribution(j) - write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j) - endif - enddo - write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution) + !debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then + !integral = 0_pInt + !write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :' + !do j=1_pInt,nMPstate + !if (debug_MaterialpointStateLoopDistribution(j) /= 0) then + !integral = integral + j*debug_MaterialpointStateLoopDistribution(j) + !!write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j) + !endif + !enddo + !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution) - integral = 0_pInt - write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :' - do j=1_pInt,nHomog+1_pInt - if (debug_MaterialpointLoopDistribution(j) /= 0) then - integral = integral + j*debug_MaterialpointLoopDistribution(j) - exceed = ' ' - if (j > nHomog) exceed = '+' - write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j) - endif - enddo - write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution) - endif debugOutputHomog + !integral = 0_pInt + !write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :' + !do j=1_pInt,nHomog+1_pInt + !if (debug_MaterialpointLoopDistribution(j) /= 0) then + ! integral = integral + j*debug_MaterialpointLoopDistribution(j) + !exceed = ' ' + !if (j > nHomog) exceed = '+' + !write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j) + !endif + !enddo + !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution) + !endif debugOutputHomog debugOutputCPFEM: if (iand(debug_level(debug_CPFEM),debug_LEVELBASIC) /= 0 & .and. any(debug_stressMinLocation /= 0_pInt) & diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 7dbea41d5..b1595b9dd 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -545,9 +545,9 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) debug_levelExtensive, & debug_levelSelective, & debug_e, & - debug_i, & - debug_MaterialpointLoopDistribution, & - debug_MaterialpointStateLoopDistribution + debug_i!, & + !debug_MaterialpointLoopDistribution, & + !debug_MaterialpointStateLoopDistribution implicit none real(pReal), intent(in) :: dt !< time increment @@ -719,8 +719,8 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) elseif (materialpoint_requested(i,e)) then steppingNeeded ! already at final time (??) if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionHomog) - debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = & - debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1 + !debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = & + !debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1 !$OMP END CRITICAL (distributionHomog) endif endif steppingNeeded @@ -865,8 +865,8 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) if (materialpoint_converged(i,e)) then if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionMPState) - debug_MaterialpointStateLoopdistribution(NiterationMPstate) = & - debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1_pInt + !debug_MaterialpointStateLoopdistribution(NiterationMPstate) = & + !debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1_pInt !$OMP END CRITICAL (distributionMPState) endif endif From 4d393518ac180ed35210038c0abcb08eb846a379 Mon Sep 17 00:00:00 2001 From: Arka Lahiri Date: Wed, 9 May 2018 16:54:06 +0200 Subject: [PATCH 02/54] did only compile with BUILD_TYPE=DEBUG --- src/constitutive.f90 | 19 ------------------- src/crystallite.f90 | 28 ++++++---------------------- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 27e81e03e..bcb895a71 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -948,15 +948,6 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra end select sourceType enddo SourceLoop - if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then - call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) - !$OMP CRITICAL (debugTimingDotState) - !debug_cumDotStateCalls = debug_cumDotStateCalls + 1_pInt - !debug_cumDotStateTicks = debug_cumDotStateTicks + tock-tick - !$OMP FLUSH (debug_cumDotStateTicks) - !if (tock < tick) debug_cumDotStateTicks = debug_cumDotStateTicks + maxticks - !$OMP END CRITICAL (debugTimingDotState) - endif end subroutine constitutive_collectDotState !-------------------------------------------------------------------------------------------------- @@ -1032,16 +1023,6 @@ subroutine constitutive_collectDeltaState(Tstar_v, Fe, ipc, ip, el) end select sourceType enddo SourceLoop - if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then - call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) - !$OMP CRITICAL (debugTimingDeltaState) - !debug_cumDeltaStateCalls = debug_cumDeltaStateCalls + 1_pInt - !debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + tock-tick - !$OMP FLUSH (debug_cumDeltaStateTicks) - !if (tock < tick) debug_cumDeltaStateTicks = debug_cumDeltaStateTicks + maxticks - !$OMP END CRITICAL (debugTimingDeltaState) - endif - end subroutine constitutive_collectDeltaState diff --git a/src/crystallite.f90 b/src/crystallite.f90 index a28c8f208..b73d11b17 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -3239,19 +3239,16 @@ logical function crystallite_integrateStress(& subStepSizeLp, & subStepSizeLi use debug, only: debug_level, & - debug_crystallite, & - debug_levelBasic, & - debug_levelExtensive, & - debug_levelSelective, & #ifdef DEBUG debug_e, & debug_i, & - debug_g!, & + debug_g, & #endif - !debug_cumLpCalls, & - !debug_cumLpTicks, & - !debug_StressLoopLpDistribution, & - !debug_StressLoopLiDistribution + debug_crystallite, & + debug_levelBasic, & + debug_levelExtensive, & + debug_levelSelective + use constitutive, only: constitutive_LpAndItsTangent, & constitutive_LiAndItsTangent, & constitutive_TandItsTangent @@ -3457,9 +3454,6 @@ logical function crystallite_integrateStress(& !* calculate plastic velocity gradient and its tangent from constitutive law - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) & - call system_clock(count=tick,count_rate=tickrate,count_max=maxticks) - #ifdef DEBUG if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt & .and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) & @@ -3474,16 +3468,6 @@ logical function crystallite_integrateStress(& call constitutive_LpAndItsTangent(Lp_constitutive, dLp_dT3333, dLp_dFi3333, & Tstar_v, Fi_new, ipc, ip, el) - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - call system_clock(count=tock,count_rate=tickrate,count_max=maxticks) - !$OMP CRITICAL (debugTimingLpTangent) - !debug_cumLpCalls = debug_cumLpCalls + 1_pInt - !debug_cumLpTicks = debug_cumLpTicks + tock-tick - !$OMP FLUSH (debug_cumLpTicks) - !if (tock < tick) debug_cumLpTicks = debug_cumLpTicks + maxticks - !$OMP END CRITICAL (debugTimingLpTangent) - endif - #ifdef DEBUG if (iand(debug_level(debug_crystallite), debug_levelExtensive) /= 0_pInt & .and. ((el == debug_e .and. ip == debug_i .and. ipc == debug_g) & From c45d9f9ee9f7ae710b17cf21ea6211a6265168c9 Mon Sep 17 00:00:00 2001 From: Arka Lahiri Date: Thu, 17 May 2018 16:33:35 +0200 Subject: [PATCH 03/54] Deleted performance profiling code --- src/constitutive.f90 | 4 -- src/crystallite.f90 | 36 ++-------- src/debug.f90 | 159 +---------------------------------------- src/homogenization.f90 | 8 +-- 4 files changed, 9 insertions(+), 198 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index bcb895a71..7f1bff89e 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -838,8 +838,6 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, subdt, subfra pReal, & pLongInt use debug, only: & - !debug_cumDotStateCalls, & - !debug_cumDotStateTicks, & debug_level, & debug_constitutive, & debug_levelBasic @@ -959,8 +957,6 @@ subroutine constitutive_collectDeltaState(Tstar_v, Fe, ipc, ip, el) pReal, & pLongInt use debug, only: & - !debug_cumDeltaStateCalls, & - !debug_cumDeltaStateTicks, & debug_level, & debug_constitutive, & debug_levelBasic diff --git a/src/crystallite.f90 b/src/crystallite.f90 index b73d11b17..dd497ad17 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -529,8 +529,7 @@ subroutine crystallite_stressAndItsTangent(updateJaco) debug_levelSelective, & debug_e, & debug_i, & - debug_g!, & - !debug_CrystalliteLoopDistribution + debug_g use IO, only: & IO_warning, & IO_error @@ -949,8 +948,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco) if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt & .and. formerSubStep > 0.0_pReal) then !$OMP CRITICAL (distributionCrystallite) - !debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) = & - !debug_CrystalliteLoopDistribution(min(nCryst+1_pInt,NiterationCrystallite)) + 1_pInt !$OMP END CRITICAL (distributionCrystallite) endif endif @@ -1259,8 +1256,7 @@ subroutine crystallite_integrateStateRK4() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective !, & - !debug_StateLoopDistribution + debug_levelSelective use FEsolving, only: & FEsolving_execElem, & FEsolving_execIP @@ -1519,8 +1515,6 @@ subroutine crystallite_integrateStateRK4() crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - !debug_StateLoopDistribution(4,numerics_integrationMode) = & - !debug_StateLoopDistribution(4,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -1555,8 +1549,7 @@ subroutine crystallite_integrateStateRKCK45() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective!, & - !debug_StateLoopDistribution + debug_levelSelective use numerics, only: & rTol_crystalliteState, & numerics_integrationMode @@ -2023,8 +2016,6 @@ subroutine crystallite_integrateStateRKCK45() crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definition if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - !debug_StateLoopDistribution(6,numerics_integrationMode) = & - !debug_StateLoopDistribution(6,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2060,8 +2051,7 @@ subroutine crystallite_integrateStateAdaptiveEuler() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective!, & - !debug_StateLoopDistribution + debug_levelSelective use numerics, only: & rTol_crystalliteState, & numerics_integrationMode @@ -2365,8 +2355,6 @@ subroutine crystallite_integrateStateAdaptiveEuler() crystallite_converged(g,i,e) = .true. ! ... converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - !debug_StateLoopDistribution(2,numerics_integrationMode) = & - !debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2383,8 +2371,6 @@ subroutine crystallite_integrateStateAdaptiveEuler() crystallite_converged(g,i,e) = .true. ! ... converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - !debug_StateLoopDistribution(2,numerics_integrationMode) = & - !debug_StateLoopDistribution(2,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2422,8 +2408,7 @@ subroutine crystallite_integrateStateEuler() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective!, & - !debug_StateLoopDistribution + debug_levelSelective use numerics, only: & numerics_integrationMode, & numerics_timeSyncing @@ -2608,8 +2593,6 @@ eIter = FEsolving_execElem(1:2) crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - !debug_StateLoopDistribution(1,numerics_integrationMode) = & - !debug_StateLoopDistribution(1,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -2647,8 +2630,7 @@ subroutine crystallite_integrateStateFPI() debug_crystallite, & debug_levelBasic, & debug_levelExtensive, & - debug_levelSelective!, & - !debug_StateLoopDistribution + debug_levelSelective use numerics, only: & nState, & numerics_integrationMode, & @@ -3025,8 +3007,6 @@ subroutine crystallite_integrateStateFPI() if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionState) - !debug_StateLoopDistribution(NiterationState,numerics_integrationMode) = & - !debug_StateLoopDistribution(NiterationState,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionState) endif endif @@ -3567,8 +3547,6 @@ logical function crystallite_integrateStress(& if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionStress) - !debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) = & - !debug_StressLoopLpDistribution(NiterationStressLp,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionStress) endif @@ -3654,8 +3632,6 @@ logical function crystallite_integrateStress(& if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionStress) - !debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) = & - !debug_StressLoopLiDistribution(NiterationStressLi,numerics_integrationMode) + 1_pInt !$OMP END CRITICAL (distributionStress) endif diff --git a/src/debug.f90 b/src/debug.f90 index e07a2e12a..ea2b659a1 100644 --- a/src/debug.f90 +++ b/src/debug.f90 @@ -46,21 +46,11 @@ module debug integer(pInt),protected, dimension(debug_maxNtype+2_pInt), public :: & ! specific ones, and 2 for "all" and "other" debug_level = 0_pInt - !integer(pLongInt), public :: & - !debug_cumLpCalls = 0_pLongInt, & !< total number of calls to LpAndItsTangent - !debug_cumDeltaStateCalls = 0_pLongInt, & !< total number of calls to deltaState - !debug_cumDotStateCalls = 0_pLongInt !< total number of calls to dotState - integer(pInt), protected, public :: & debug_e = 1_pInt, & debug_i = 1_pInt, & debug_g = 1_pInt - !integer(pLongInt), public :: & - !debug_cumLpTicks = 0_pLongInt, & !< total cpu ticks spent in LpAndItsTangent - !debug_cumDeltaStateTicks = 0_pLongInt, & !< total cpu ticks spent in deltaState - !debug_cumDotStateTicks = 0_pLongInt !< total cpu ticks spent in dotState - integer(pInt), dimension(2), public :: & debug_stressMaxLocation = 0_pInt, & debug_stressMinLocation = 0_pInt, & @@ -68,16 +58,6 @@ module debug debug_jacobianMinLocation = 0_pInt - !integer(pInt), dimension(:), allocatable, public :: & - !debug_CrystalliteLoopDistribution, & !< distribution of crystallite cutbacks - !debug_MaterialpointStateLoopDistribution, & - !debug_MaterialpointLoopDistribution - - !integer(pInt), dimension(:,:), allocatable, public :: & - !debug_StressLoopLiDistribution, & !< distribution of stress iterations until convergence - !debug_StressLoopLpDistribution, & !< distribution of stress iterations until convergence - !debug_StateLoopDistribution !< distribution of state iterations until convergence - real(pReal), public :: & debug_stressMax = -huge(1.0_pReal), & debug_stressMin = huge(1.0_pReal), & @@ -107,12 +87,7 @@ subroutine debug_init compiler_version, & compiler_options #endif -! use numerics, only: & -! nStress, & -! nState, & -! nCryst, & -! nMPstate, & -! nHomog + use IO, only: & IO_read, & IO_error, & @@ -137,13 +112,6 @@ subroutine debug_init write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" - !allocate(debug_StressLoopLpDistribution(nStress+1,2), source=0_pInt) - !allocate(debug_StressLoopLiDistribution(nStress+1,2), source=0_pInt) - !allocate(debug_StateLoopDistribution(nState+1,2), source=0_pInt) - !allocate(debug_CrystalliteLoopDistribution(nCryst+1), source=0_pInt) - !allocate(debug_MaterialpointStateLoopDistribution(nMPstate), source=0_pInt) - !allocate(debug_MaterialpointLoopDistribution(nHomog+1), source=0_pInt) - !-------------------------------------------------------------------------------------------------- ! try to open the config file @@ -297,18 +265,6 @@ subroutine debug_reset implicit none - !debug_StressLoopLpDistribution = 0_pInt - !debug_StressLoopLiDistribution = 0_pInt - !debug_StateLoopDistribution = 0_pInt - !debug_CrystalliteLoopDistribution = 0_pInt - !debug_MaterialpointStateLoopDistribution = 0_pInt - !debug_MaterialpointLoopDistribution = 0_pInt - !debug_cumLpTicks = 0_pLongInt - !debug_cumDeltaStateTicks = 0_pLongInt - !debug_cumDotStateTicks = 0_pLongInt - !debug_cumLpCalls = 0_pInt - !debug_cumDeltaStateCalls = 0_pInt - !debug_cumDotStateCalls = 0_pInt debug_stressMaxLocation = 0_pInt debug_stressMinLocation = 0_pInt debug_jacobianMaxLocation = 0_pInt @@ -325,123 +281,12 @@ end subroutine debug_reset !> @brief writes debug statements to standard out !-------------------------------------------------------------------------------------------------- subroutine debug_info -! use numerics, only: & -! nStress, & -! nState, & -! nCryst, & -! nMPstate, & -! nHomog implicit none - !integer(pInt) :: j,integral - !integer(pLongInt) :: tickrate character(len=1) :: exceed - !call system_clock(count_rate=tickrate) - + !$OMP CRITICAL (write2out) - !debugOutputCryst: if (iand(debug_level(debug_CRYSTALLITE),debug_LEVELBASIC) /= 0) then - !write(6,'(/,a,/)') ' DEBUG Info (from previous cycle)' - !write(6,'(a33,1x,i12)') 'total calls to LpAndItsTangent :',debug_cumLpCalls - !if (debug_cumLpCalls > 0_pInt) then - !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& - !real(debug_cumLpTicks,pReal)/real(tickrate,pReal) - !!write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& - !real(debug_cumLpTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumLpCalls,pReal) - !endif - !write(6,'(/,a33,1x,i12)') 'total calls to collectDotState :',debug_cumDotStateCalls - !if (debug_cumdotStateCalls > 0_pInt) then - !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& - !real(debug_cumDotStateTicks,pReal)/real(tickrate,pReal) - !write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& - !real(debug_cumDotStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDotStateCalls,pReal) - !endif - !write(6,'(/,a33,1x,i12)') 'total calls to collectDeltaState:',debug_cumDeltaStateCalls - !if (debug_cumDeltaStateCalls > 0_pInt) then - !write(6,'(a33,1x,f12.3)') 'total CPU time/s :',& - !real(debug_cumDeltaStateTicks,pReal)/real(tickrate,pReal) - !write(6,'(a33,1x,f12.6)') 'avg CPU time/microsecs per call :',& - !real(debug_cumDeltaStateTicks,pReal)*1.0e6_pReal/real(tickrate*debug_cumDeltaStateCalls,pReal) - !endif - - !integral = 0_pInt - !write(6,'(3/,a)') 'distribution_StressLoopLp : stress stiffness' - !do j=1_pInt,nStress+1_pInt - !if (any(debug_StressLoopLpDistribution(j,:) /= 0_pInt )) then - !integral = integral + j*(debug_StressLoopLpDistribution(j,1) + debug_StressLoopLpDistribution(j,2)) - !exceed = ' ' - !if (j > nStress) exceed = '+' ! last entry gets "+" - !write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLpDistribution(j,1),& - !debug_StressLoopLpDistribution(j,2) - !endif - !enddo - !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLpDistribution(:,1)), & - !sum(debug_StressLoopLpDistribution(:,2)) - - !integral = 0_pInt - !write(6,'(3/,a)') 'distribution_StressLoopLi : stress stiffness' - !do j=1_pInt,nStress+1_pInt - !if (any(debug_StressLoopLiDistribution(j,:) /= 0_pInt )) then - !integral = integral + j*(debug_StressLoopLiDistribution(j,1) + debug_StressLoopLiDistribution(j,2)) - !exceed = ' ' - !if (j > nStress) exceed = '+' ! last entry gets "+" - !write(6,'(i25,a1,i10,1x,i10)') min(nStress,j),exceed,debug_StressLoopLiDistribution(j,1),& - ! debug_StressLoopLiDistribution(j,2) - !endif - !enddo - !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StressLoopLiDistribution(:,1)), & - ! sum(debug_StressLoopLiDistribution(:,2)) - - !integral = 0_pInt - !write(6,'(2/,a)') 'distribution_CrystalliteStateLoop :' - !do j=1_pInt,nState+1_pInt - !if (any(debug_StateLoopDistribution(j,:) /= 0)) then - !integral = integral + j*(debug_StateLoopDistribution(j,1) + debug_StateLoopDistribution(j,2)) - !exceed = ' ' - !if (j > nState) exceed = '+' ! last entry gets "+" - !write(6,'(i25,a1,i10,1x,i10)') min(nState,j),exceed,debug_StateLoopDistribution(j,1),& - ! debug_StateLoopDistribution(j,2) - !endif - !enddo - !write(6,'(a15,i10,2(1x,i10))') ' total',integral,sum(debug_StateLoopDistribution(:,1)), & - ! sum(debug_StateLoopDistribution(:,2)) - - !integral = 0_pInt - !write(6,'(2/,a)') 'distribution_CrystalliteCutbackLoop :' - !do j=1_pInt,nCryst+1_pInt - !if (debug_CrystalliteLoopDistribution(j) /= 0) then - !integral = integral + j*debug_CrystalliteLoopDistribution(j) - !exceed = ' ' - !if (j > nCryst) exceed = '+' - !write(6,'(i25,a1,i10)') min(nCryst,j),exceed,debug_CrystalliteLoopDistribution(j) - !endif - !enddo - !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_CrystalliteLoopDistribution) - !endif debugOutputCryst - - !debugOutputHomog: if (iand(debug_level(debug_HOMOGENIZATION),debug_LEVELBASIC) /= 0) then - !integral = 0_pInt - !write(6,'(2/,a)') 'distribution_MaterialpointStateLoop :' - !do j=1_pInt,nMPstate - !if (debug_MaterialpointStateLoopDistribution(j) /= 0) then - !integral = integral + j*debug_MaterialpointStateLoopDistribution(j) - !!write(6,'(i25,1x,i10)') j,debug_MaterialpointStateLoopDistribution(j) - !endif - !enddo - !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointStateLoopDistribution) - - !integral = 0_pInt - !write(6,'(2/,a)') 'distribution_MaterialpointCutbackLoop :' - !do j=1_pInt,nHomog+1_pInt - !if (debug_MaterialpointLoopDistribution(j) /= 0) then - ! integral = integral + j*debug_MaterialpointLoopDistribution(j) - !exceed = ' ' - !if (j > nHomog) exceed = '+' - !write(6,'(i25,a1,i10)') min(nHomog,j),exceed,debug_MaterialpointLoopDistribution(j) - !endif - !enddo - !write(6,'(a15,i10,1x,i10)') ' total',integral,sum(debug_MaterialpointLoopDistribution) - !endif debugOutputHomog debugOutputCPFEM: if (iand(debug_level(debug_CPFEM),debug_LEVELBASIC) /= 0 & .and. any(debug_stressMinLocation /= 0_pInt) & diff --git a/src/homogenization.f90 b/src/homogenization.f90 index b1595b9dd..6db264989 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -545,9 +545,7 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) debug_levelExtensive, & debug_levelSelective, & debug_e, & - debug_i!, & - !debug_MaterialpointLoopDistribution, & - !debug_MaterialpointStateLoopDistribution + debug_i implicit none real(pReal), intent(in) :: dt !< time increment @@ -719,8 +717,6 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) elseif (materialpoint_requested(i,e)) then steppingNeeded ! already at final time (??) if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionHomog) - !debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) = & - !debug_MaterialpointLoopDistribution(min(nHomog+1,NiterationHomog)) + 1 !$OMP END CRITICAL (distributionHomog) endif endif steppingNeeded @@ -865,8 +861,6 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) if (materialpoint_converged(i,e)) then if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then !$OMP CRITICAL (distributionMPState) - !debug_MaterialpointStateLoopdistribution(NiterationMPstate) = & - !debug_MaterialpointStateLoopdistribution(NiterationMPstate) + 1_pInt !$OMP END CRITICAL (distributionMPState) endif endif From 54bccbe08464957a7e2261d7e7d73cba6b120eca Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Fri, 25 May 2018 11:16:56 +0200 Subject: [PATCH 04/54] more pythonic way --- lib/damask/config/material.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index a56c5d976..b59cb702f 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -172,9 +172,8 @@ class Material(): self.data[part][name_section][items[0]] = items[1:] def read(self,file=None): - f=open(file,'r') - c=f.readlines() - f.close() + with open(file,'r') as f: + c=f.readlines() for p in self.parts: self.parse_data(part=p, content=c) From e1c5168040317a4049aaaf8884bc03f066b6d3f1 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Wed, 6 Jun 2018 15:28:40 +0200 Subject: [PATCH 05/54] regex for include statement --- lib/damask/config/material.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index b59cb702f..41f69fd09 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -172,8 +172,9 @@ class Material(): self.data[part][name_section][items[0]] = items[1:] def read(self,file=None): + #re_include = re.compile(r'^{(.+)}$') # pattern for file include with open(file,'r') as f: - c=f.readlines() + c = f.readlines() for p in self.parts: self.parse_data(part=p, content=c) From bedc17b1c67c99ad33de2367e65188dcabf0ad84 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 12 Jun 2018 14:33:08 -0400 Subject: [PATCH 06/54] nicer formatting --- src/plastic_kinematichardening.f90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plastic_kinematichardening.f90 b/src/plastic_kinematichardening.f90 index c33a14db6..434495043 100644 --- a/src/plastic_kinematichardening.f90 +++ b/src/plastic_kinematichardening.f90 @@ -360,11 +360,11 @@ subroutine plastic_kinehardening_init(fileUnit) !-------------------------------------------------------------------------------------------------- ! sanity checks - if (any(plastic_kinehardening_Nslip(1:nSlipFamilies,instance) > 0_pInt & - .and. param(instance)%crss0(1:nSlipFamilies) < 0.0_pReal)) extmsg = trim(extmsg)//' crss0' - if (any(plastic_kinehardening_Nslip(1:nSlipFamilies,instance) > 0_pInt & - .and. param(instance)%tau1(1:nSlipFamilies) <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1' - if (any(plastic_kinehardening_Nslip(1:nSlipFamilies,instance) > 0_pInt & + if (any(plastic_kinehardening_Nslip (1:nSlipFamilies,instance) > 0_pInt & + .and. param(instance)%crss0 (1:nSlipFamilies) < 0.0_pReal)) extmsg = trim(extmsg)//' crss0' + if (any(plastic_kinehardening_Nslip (1:nSlipFamilies,instance) > 0_pInt & + .and. param(instance)%tau1 (1:nSlipFamilies) <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1' + if (any(plastic_kinehardening_Nslip (1:nSlipFamilies,instance) > 0_pInt & .and. param(instance)%tau1_b(1:nSlipFamilies) < 0.0_pReal)) extmsg = trim(extmsg)//' tau1_b' if (param(instance)%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0' if (param(instance)%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip' From 9c3539ee92c35ff298ba989164e5e917a43212e0 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 14 Jun 2018 15:14:30 +0200 Subject: [PATCH 07/54] Added a code that detects '{' and opens file inside to read --- lib/damask/config/material.py | 36 +++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) mode change 100644 => 100755 lib/damask/config/material.py diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py old mode 100644 new mode 100755 index 41f69fd09..e046610ad --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -1,6 +1,7 @@ # -*- coding: UTF-8 no BOM -*- import re +import os, sys class Section(): def __init__(self,data = {'__order__':[]},part = ''): @@ -14,7 +15,7 @@ class Section(): self.parameters = {} for key in data: if type(data[key]) is not list: - self.parameters[key] = [data[key]] + self.parameters[key] = [data[key]] #this is creating a dictionary. So this is a way to create elements in a dictionary else: self.parameters[key] = data[key] @@ -139,6 +140,7 @@ class Material(): re_part = re.compile(r'^<(.+)>$') # pattern for part re_sec = re.compile(r'^\[(.+)\]$') # pattern for section + re_include = re.compile(r'^{(.+)}$') # pattern for include name_section = '' active = False @@ -160,7 +162,34 @@ class Material(): self.data[part]['__order__'].append(name_section) # ... and position self.data[part][name_section] = {'__order__':[]} continue - + # This part accesses the data in the files mentioned in the curly brackets. For now the file should be present in the working folder + #trying to generalize the file and its location. + if line: + match_include = re_include.match(line.split()[0]) + if match_include: + sub_file = match_include.group(1).split('/')[1] #get the file name which has to be opened to get the data + #code to search for file when it is located anywhere + path_file = os.environ['PATH'] + path_file = path_file[:(path_file.find("DAMASK") + len("DAMASK"))] + for root, dirs, files in os.walk(path_file): + if sub_file in files: + target_path = os.path.join(root, sub_file) #this would give the path for the sub_file + with open(target_path,'r') as f1: #using the target_path to open the file + subdata = f1.readlines() + subdata = [a for a in subdata if a != '\n'] #removes '\n' elements from the list + if subdata: + for entry in subdata: + if sections == [] or name_section in sections: # respect subset + items = entry.split() + if items[0] not in self.data[part][name_section]: # first encounter of key? + self.data[part][name_section][items[0]] = [] # create item + self.data[part][name_section]['__order__'].append(items[0]) + if items[0].startswith('(') and items[0].endswith(')'): # multiple "(key)" + self.data[part][name_section][items[0]].append(items[1:]) + else: # plain key + self.data[part][name_section][items[0]] = items[1:] + continue + if sections == [] or name_section in sections: # respect subset items = line.split() if items[0] not in self.data[part][name_section]: # first encounter of key? @@ -172,12 +201,11 @@ class Material(): self.data[part][name_section][items[0]] = items[1:] def read(self,file=None): - #re_include = re.compile(r'^{(.+)}$') # pattern for file include with open(file,'r') as f: c = f.readlines() for p in self.parts: self.parse_data(part=p, content=c) - + def write(self,file='material.config', overwrite=False): import os i = 0 From 09ade8b6c48d73900e91335955fa42357632404b Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 14 Jun 2018 15:29:47 +0200 Subject: [PATCH 08/54] sys not required in material.py file --- lib/damask/config/material.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index e046610ad..3109052e9 100755 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -1,7 +1,7 @@ # -*- coding: UTF-8 no BOM -*- import re -import os, sys +import os class Section(): def __init__(self,data = {'__order__':[]},part = ''): From f65bba1c5cd6a7fea2c7605f69969f8aa0803b80 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Thu, 14 Jun 2018 15:36:57 +0200 Subject: [PATCH 09/54] material.py is not an executable. Rectified it --- lib/damask/config/material.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 lib/damask/config/material.py diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py old mode 100755 new mode 100644 From 196b0ef22f9e3d6041ad928abb3143ac660d5f5b Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Tue, 19 Jun 2018 09:57:50 +0200 Subject: [PATCH 10/54] adding new include in file reading --- lib/damask/config/material.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index 3109052e9..e4d33f95f 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -201,8 +201,24 @@ class Material(): self.data[part][name_section][items[0]] = items[1:] def read(self,file=None): + re_include = re.compile(r'^{(.+)}$') # pattern for include + c = [] with open(file,'r') as f: - c = f.readlines() + for entry in f: + match_include = re_include.match(entry.split()[0]) + if match_include: + sub_file = match_include.group(1).split('/')[-1] #get the file name which has to be opened to get the data, + #code to search for file when it is located anywhere + path_file = os.environ['PATH'] + path_file = path_file[:(path_file.find("DAMASK") + len("DAMASK"))] + for root, dirs, files in os.walk(path_file): + if sub_file in files: + target_path = os.path.join(root, sub_file) #this would give the path for the sub_file + with open(target_path,'r') as f1: #using the target_path to open the file + for data in f1: + c = c.append(data) + else: + c = c.append(entry) for p in self.parts: self.parse_data(part=p, content=c) From ba8d9b7062c63eb2d57a7fb57e0a7de2cef771b8 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 19 Jun 2018 10:41:44 +0200 Subject: [PATCH 11/54] simplifying parsing of absolute path --- lib/damask/config/material.py | 60 +++++++++++------------------------ 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index e4d33f95f..a639642a6 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -149,46 +149,20 @@ class Material(): line = line.split('#')[0].strip() # kill comments and extra whitespace line = line.split('/echo/')[0].strip() # remove '/echo/' tags line = line.lower() # be case insensitive + print(line) if line: # content survives... - match_part = re_part.match(line.split()[0]) + match_part = re_part.match(line) if match_part: # found separator active = (match_part.group(1) == part) # only active in continue if active: - match_sec = re_sec.match(line.split()[0]) + match_sec = re_sec.match(line) if match_sec: # found [section] name_section = match_sec.group(1) # remember name ... if '__order__' not in self.data[part]: self.data[part]['__order__'] = [] self.data[part]['__order__'].append(name_section) # ... and position self.data[part][name_section] = {'__order__':[]} continue - # This part accesses the data in the files mentioned in the curly brackets. For now the file should be present in the working folder - #trying to generalize the file and its location. - if line: - match_include = re_include.match(line.split()[0]) - if match_include: - sub_file = match_include.group(1).split('/')[1] #get the file name which has to be opened to get the data - #code to search for file when it is located anywhere - path_file = os.environ['PATH'] - path_file = path_file[:(path_file.find("DAMASK") + len("DAMASK"))] - for root, dirs, files in os.walk(path_file): - if sub_file in files: - target_path = os.path.join(root, sub_file) #this would give the path for the sub_file - with open(target_path,'r') as f1: #using the target_path to open the file - subdata = f1.readlines() - subdata = [a for a in subdata if a != '\n'] #removes '\n' elements from the list - if subdata: - for entry in subdata: - if sections == [] or name_section in sections: # respect subset - items = entry.split() - if items[0] not in self.data[part][name_section]: # first encounter of key? - self.data[part][name_section][items[0]] = [] # create item - self.data[part][name_section]['__order__'].append(items[0]) - if items[0].startswith('(') and items[0].endswith(')'): # multiple "(key)" - self.data[part][name_section][items[0]].append(items[1:]) - else: # plain key - self.data[part][name_section][items[0]] = items[1:] - continue if sections == [] or name_section in sections: # respect subset items = line.split() @@ -201,24 +175,26 @@ class Material(): self.data[part][name_section][items[0]] = items[1:] def read(self,file=None): + fileNames = [None] * 10 + fileNames[0] = file re_include = re.compile(r'^{(.+)}$') # pattern for include c = [] with open(file,'r') as f: for entry in f: - match_include = re_include.match(entry.split()[0]) - if match_include: - sub_file = match_include.group(1).split('/')[-1] #get the file name which has to be opened to get the data, - #code to search for file when it is located anywhere - path_file = os.environ['PATH'] - path_file = path_file[:(path_file.find("DAMASK") + len("DAMASK"))] - for root, dirs, files in os.walk(path_file): - if sub_file in files: - target_path = os.path.join(root, sub_file) #this would give the path for the sub_file - with open(target_path,'r') as f1: #using the target_path to open the file - for data in f1: - c = c.append(data) + if not entry.strip(): continue + match = re_include.match(entry.split()[0]) + if match: + if match.group(1).startswith('/'): + sub_file = match.group(1) + else: + pass + with open(sub_file,'r') as f1: #using the target_path to open the file + for l in f1.readlines(): c.append(l) else: - c = c.append(entry) + c.append(entry) + + for l in c: + print(l) for p in self.parts: self.parse_data(part=p, content=c) From 25fa68ca2e79f6fdbed67cc8535cc68df4fe73e7 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 19 Jun 2018 10:45:45 +0200 Subject: [PATCH 12/54] relative paths are also supported --- lib/damask/config/material.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index a639642a6..b786e087a 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -140,7 +140,6 @@ class Material(): re_part = re.compile(r'^<(.+)>$') # pattern for part re_sec = re.compile(r'^\[(.+)\]$') # pattern for section - re_include = re.compile(r'^{(.+)}$') # pattern for include name_section = '' active = False @@ -187,7 +186,7 @@ class Material(): if match.group(1).startswith('/'): sub_file = match.group(1) else: - pass + sub_file = os.path.normpath(os.path.dirname(file).join(match.group(1))) with open(sub_file,'r') as f1: #using the target_path to open the file for l in f1.readlines(): c.append(l) else: From f225591ccc1c624c800c8bdb230c26056a869d8f Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 19 Jun 2018 12:54:43 +0200 Subject: [PATCH 13/54] transition compatibility not needed anymore, more verbose --- env/DAMASK.sh | 8 ++------ env/DAMASK.zsh | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/env/DAMASK.sh b/env/DAMASK.sh index 021603b57..509f5f1b7 100644 --- a/env/DAMASK.sh +++ b/env/DAMASK.sh @@ -2,7 +2,7 @@ # usage: source DAMASK.sh function canonicalPath { - python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1 + python -c "import os,sys; print(os.path.normpath(os.path.realpath(os.path.expanduser(sys.argv[1]))))" $1 } function blink { @@ -17,12 +17,8 @@ else DAMASK_ROOT=${STAT##* } fi -# transition compatibility (renamed $DAMASK_ROOT/DAMASK_env.sh to $DAMASK_ROOT/env/DAMASK.sh) -if [ ${BASH_SOURCE##*/} == "DAMASK.sh" ]; then - DAMASK_ROOT="$DAMASK_ROOT/.." -fi +DAMASK_ROOT=$(canonicalPath "$DAMASK_ROOT/../") -DAMASK_ROOT=$(canonicalPath $DAMASK_ROOT) # shorthand command to change to DAMASK_ROOT directory eval "function DAMASK_root() { cd $DAMASK_ROOT; }" diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 2d2bc9aa0..4638ae734 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -2,15 +2,14 @@ # usage: source DAMASK.zsh function canonicalPath { - python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $1 + python -c "import os,sys; print(os.path.normpath(os.path.realpath(os.path.expanduser(sys.argv[1]))))" $1 } -# transition compatibility (renamed $DAMASK_ROOT/DAMASK_env.zsh to $DAMASK_ROOT/env/DAMASK.zsh) -if [ ${0:t:r} = 'DAMASK' ]; then - DAMASK_ROOT=${0:a:h}'/..' -else - DAMASK_ROOT=${0:a:h} -fi +function blink { + echo -e "\033[2;5m$1\033[0m" +} + +DAMASK_ROOT=$(canonicalPath "${0:a:h}'/..") # shorthand command to change to DAMASK_ROOT directory eval "function DAMASK_root() { cd $DAMASK_ROOT; }" @@ -26,10 +25,10 @@ unset -f set [ "x$DAMASK_BIN != x" ] && PATH=$DAMASK_BIN:$PATH SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) -[ "x$SOLVER == x" ] && SOLVER='Not found!' +[ "x$SOLVER == x" ] && SOLVER=$(blink 'Not found!') PROCESSING=$(type -p postResults || true 2>/dev/null) -[ "x$PROCESSING == x" ] && PROCESSING='Not found!' +[ "x$PROCESSING == x" ] && PROCESSING=$(blink 'Not found!') [ "x$DAMASK_NUM_THREADS == x" ] && DAMASK_NUM_THREADS=1 @@ -52,16 +51,18 @@ if [ ! -z "$PS1" ]; then echo "DAMASK $DAMASK_ROOT" echo "Spectral Solver $SOLVER" echo "Post Processing $PROCESSING" - echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS" if [ "x$PETSC_DIR" != "x" ]; then - echo "PETSc location $PETSC_DIR" + echo -n "PETSc location " + [ -d $PETSC_DIR ] && echo $PETSC_DIR || blink $PETSC_DIR [[ $(canonicalPath "$PETSC_DIR") == $PETSC_DIR ]] \ || echo " ~~> "$(canonicalPath "$PETSC_DIR") fi [[ "x$PETSC_ARCH" == "x" ]] \ || echo "PETSc architecture $PETSC_ARCH" - echo "MSC.Marc/Mentat $MSC_ROOT" + echo -n "MSC.Marc/Mentat " + [ -d $MSC_ROOT ] && echo $MSC_ROOT || blink $MSC_ROOT echo + echo "Multithreading DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS" echo -n "heap size " [[ "$(ulimit -d)" == "unlimited" ]] \ && echo "unlimited" \ From 28b82fe511a0c9a21ca2ee9a2b42066725386d3b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 21 Jun 2018 21:50:11 +0200 Subject: [PATCH 14/54] bugfixes type on zsh gives information in prefix, = comparison operator should not be in in string --- env/DAMASK.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/env/DAMASK.zsh b/env/DAMASK.zsh index 4638ae734..3ceeb116a 100644 --- a/env/DAMASK.zsh +++ b/env/DAMASK.zsh @@ -24,13 +24,13 @@ unset -f set # add DAMASK_BIN if present [ "x$DAMASK_BIN != x" ] && PATH=$DAMASK_BIN:$PATH -SOLVER=$(type -p DAMASK_spectral || true 2>/dev/null) -[ "x$SOLVER == x" ] && SOLVER=$(blink 'Not found!') +SOLVER=$(which DAMASK_spectral || true 2>/dev/null) +[ "x$SOLVER" = "x" ] && SOLVER=$(blink 'Not found!') -PROCESSING=$(type -p postResults || true 2>/dev/null) -[ "x$PROCESSING == x" ] && PROCESSING=$(blink 'Not found!') +PROCESSING=$(which postResults || true 2>/dev/null) +[ "x$PROCESSING" = "x" ] && PROCESSING=$(blink 'Not found!') -[ "x$DAMASK_NUM_THREADS == x" ] && DAMASK_NUM_THREADS=1 +[ "x$DAMASK_NUM_THREADS" = "x" ] && DAMASK_NUM_THREADS=1 # currently, there is no information that unlimited causes problems # still, http://software.intel.com/en-us/forums/topic/501500 suggest to fix it From 910aad1094e23ceba41bc6dbddfd456479ac83ea Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 21 Jun 2018 21:54:07 +0200 Subject: [PATCH 15/54] Marc 2014 requires old compiler not supported any more --- .gitlab-ci.yml | 20 -------------------- src/DAMASK_marc2014.2.f90 | 1 - src/DAMASK_marc2014.f90 | 1 - 3 files changed, 22 deletions(-) delete mode 120000 src/DAMASK_marc2014.2.f90 delete mode 120000 src/DAMASK_marc2014.f90 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 169deca26..9a80c5e34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -331,26 +331,6 @@ TextureComponents: - master - release -################################################################################################### -Marc_compileIfort2014: - stage: compileMarc2014 - script: - - module load $IntelCompiler16_0 $MSC2014 - - Marc_compileIfort/test.py -m 2014 - except: - - master - - release - -################################################################################################### -Marc_compileIfort2014.2: - stage: compileMarc2014.2 - script: - - module load $IntelCompiler16_0 $MSC2014_2 - - Marc_compileIfort/test.py -m 2014.2 - except: - - master - - release - ################################################################################################### Marc_compileIfort2015: stage: compileMarc2015 diff --git a/src/DAMASK_marc2014.2.f90 b/src/DAMASK_marc2014.2.f90 deleted file mode 120000 index 2c5bec706..000000000 --- a/src/DAMASK_marc2014.2.f90 +++ /dev/null @@ -1 +0,0 @@ -DAMASK_marc.f90 \ No newline at end of file diff --git a/src/DAMASK_marc2014.f90 b/src/DAMASK_marc2014.f90 deleted file mode 120000 index 2c5bec706..000000000 --- a/src/DAMASK_marc2014.f90 +++ /dev/null @@ -1 +0,0 @@ -DAMASK_marc.f90 \ No newline at end of file From 47a6e6b292c9b426b9279ec8173def15d175d4b4 Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Fri, 22 Jun 2018 08:51:31 +0200 Subject: [PATCH 16/54] Added functionality to read include statements on the go --- lib/damask/config/material.py | 60 ++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 12 deletions(-) mode change 100644 => 100755 lib/damask/config/material.py diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py old mode 100644 new mode 100755 index b786e087a..9132ea91b --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -3,6 +3,7 @@ import re import os + class Section(): def __init__(self,data = {'__order__':[]},part = ''): classes = { @@ -172,25 +173,60 @@ class Material(): self.data[part][name_section][items[0]].append(items[1:]) else: # plain key self.data[part][name_section][items[0]] = items[1:] - - def read(self,file=None): - fileNames = [None] * 10 - fileNames[0] = file + + c = [] + def myRead(c,sub_file): re_include = re.compile(r'^{(.+)}$') # pattern for include - c = [] - with open(file,'r') as f: + with open(sub_file,'r') as f: for entry in f: - if not entry.strip(): continue + if not entry.strip(): + continue match = re_include.match(entry.split()[0]) if match: if match.group(1).startswith('/'): sub_file = match.group(1) else: - sub_file = os.path.normpath(os.path.dirname(file).join(match.group(1))) - with open(sub_file,'r') as f1: #using the target_path to open the file - for l in f1.readlines(): c.append(l) - else: - c.append(entry) + sub_file = os.path.normpath(os.path.dirname(sub_file).join(match.group(1))) + with open(sub_file,'r') as f1: + for l in f1.readlines(): + if l not in c: + c.append(l) + else: + continue + myRead(c,sub_file) + else: + if entry not in c: + c.append(entry) + else: + continue + return c,sub_file + + def read(self,file=None): + fileNames = [None] * 10 + fileNames[0] = file + re_include = re.compile(r'^{(.+)}$') # pattern for include + c = [] + i = 0 + for files in fileNames: + if files is not None: + with open(file,'r') as f: + for entry in f: + if not entry.strip(): + continue + match = re_include.match(entry.split()[0]) + if match: + if match.group(1).startswith('/'): + sub_file = match.group(1) + else: + sub_file = os.path.normpath(os.path.dirname(file).join(match.group(1))) + i = i + 1 + fileNames[i] = sub_file + myRead(c,sub_file) + else: + if entry not in c: + c.append(entry) + else: + continue for l in c: print(l) From aad3611bb43a8e53159ac6ff115d2460ec0a444b Mon Sep 17 00:00:00 2001 From: Vitesh Shah Date: Mon, 25 Jun 2018 15:10:54 +0200 Subject: [PATCH 17/54] Defined a new function to handle recursive file includes --- lib/damask/config/material.py | 71 ++++++++--------------------------- 1 file changed, 16 insertions(+), 55 deletions(-) mode change 100755 => 100644 lib/damask/config/material.py diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py old mode 100755 new mode 100644 index 9132ea91b..d18bf203e --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -174,67 +174,28 @@ class Material(): else: # plain key self.data[part][name_section][items[0]] = items[1:] - c = [] - def myRead(c,sub_file): - re_include = re.compile(r'^{(.+)}$') # pattern for include - with open(sub_file,'r') as f: - for entry in f: - if not entry.strip(): - continue - match = re_include.match(entry.split()[0]) - if match: - if match.group(1).startswith('/'): - sub_file = match.group(1) - else: - sub_file = os.path.normpath(os.path.dirname(sub_file).join(match.group(1))) - with open(sub_file,'r') as f1: - for l in f1.readlines(): - if l not in c: - c.append(l) - else: - continue - myRead(c,sub_file) - else: - if entry not in c: - c.append(entry) - else: - continue - return c,sub_file + def read(self,file=None): - fileNames = [None] * 10 - fileNames[0] = file - re_include = re.compile(r'^{(.+)}$') # pattern for include - c = [] - i = 0 - for files in fileNames: - if files is not None: - with open(file,'r') as f: - for entry in f: - if not entry.strip(): - continue - match = re_include.match(entry.split()[0]) - if match: - if match.group(1).startswith('/'): - sub_file = match.group(1) - else: - sub_file = os.path.normpath(os.path.dirname(file).join(match.group(1))) - i = i + 1 - fileNames[i] = sub_file - myRead(c,sub_file) - else: - if entry not in c: - c.append(entry) - else: - continue - - for l in c: - print(l) + + def readInclude(filename): + result = [] + re_include = re.compile(r'^{(.+)}$') + with open(filename) as f: myData = f.readlines() + for line in myData: + match = re_include.match(line.split()[0]) if line.strip() else False + if match: + result += readInclude(match.group(1) if match.group(1).startswith('/') else + os.path.normpath(os.path.join(os.path.dirname(filename),match.group(1)))) + else: + result.append(line) + return result + + c = readInclude(file) for p in self.parts: self.parse_data(part=p, content=c) def write(self,file='material.config', overwrite=False): - import os i = 0 saveFile = file while not overwrite and os.path.exists(saveFile): From 2bee95bfee00d48615462b2aa2d76954a2055adf Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 27 Jun 2018 18:04:06 +0200 Subject: [PATCH 18/54] argument for checking expected shape in the future --- src/config.f90 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/config.f90 b/src/config.f90 index d87bb754d..9d2ddde4c 100644 --- a/src/config.f90 +++ b/src/config.f90 @@ -531,7 +531,7 @@ end function getString !> @details for cumulative keys, "()", values from all occurrences are return. Otherwise only all !! values from the last occurrence. If key is not found exits with error unless default is given. !-------------------------------------------------------------------------------------------------- -function getFloats(this,key,defaultVal) +function getFloats(this,key,defaultVal,requiredShape) use IO, only: & IO_error, & IO_stringValue, & @@ -542,6 +542,7 @@ function getFloats(this,key,defaultVal) class(tPartitionedStringList), intent(in) :: this character(len=*), intent(in) :: key real(pReal), dimension(:), intent(in), optional :: defaultVal + integer(pInt), dimension(:), intent(in), optional :: requiredShape type(tPartitionedStringList), pointer :: item integer(pInt) :: i logical :: found, & @@ -577,7 +578,7 @@ end function getFloats !> @details for cumulative keys, "()", values from all occurrences are return. Otherwise only all !! values from the last occurrence. If key is not found exits with error unless default is given. !-------------------------------------------------------------------------------------------------- -function getInts(this,key,defaultVal) +function getInts(this,key,defaultVal,requiredShape) use IO, only: & IO_error, & IO_stringValue, & @@ -587,7 +588,8 @@ function getInts(this,key,defaultVal) integer(pInt), dimension(:), allocatable :: getInts class(tPartitionedStringList), intent(in) :: this character(len=*), intent(in) :: key - integer(pInt), dimension(:), intent(in), optional :: defaultVal + integer(pInt), dimension(:), intent(in), optional :: defaultVal, & + requiredShape type(tPartitionedStringList), pointer :: item integer(pInt) :: i logical :: found, & @@ -624,7 +626,7 @@ end function getInts !! values from the last occurrence. If key is not found exits with error unless default is given. !! If raw is true, the the complete string is returned, otherwise the individual chunks are returned !-------------------------------------------------------------------------------------------------- -function getStrings(this,key,defaultVal,raw) +function getStrings(this,key,defaultVal,requiredShape,raw) use IO, only: & IO_error, & IO_StringValue @@ -634,6 +636,7 @@ function getStrings(this,key,defaultVal,raw) class(tPartitionedStringList), intent(in) :: this character(len=*), intent(in) :: key character(len=65536),dimension(:), intent(in), optional :: defaultVal + integer(pInt), dimension(:), intent(in), optional :: requiredShape logical, intent(in), optional :: raw type(tPartitionedStringList), pointer :: item character(len=65536) :: str From 7e0aca6a459ff5acb6c380479f50fb0c9bb0ea17 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 27 Jun 2018 21:42:12 +0200 Subject: [PATCH 19/54] Don't know which compiler is needed for Marc 2015 --- .gitlab-ci.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a80c5e34..5907ee672 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,8 +7,6 @@ stages: - compileSpectralGNU - prepareSpectral - spectral - - compileMarc2014 - - compileMarc2014.2 - compileMarc2015 - compileMarc2016 - marc @@ -331,15 +329,6 @@ TextureComponents: - master - release -################################################################################################### -Marc_compileIfort2015: - stage: compileMarc2015 - script: - - module load $IntelCompiler16_0 $MSC2015 - - Marc_compileIfort/test.py -m 2015 - except: - - master - - release ################################################################################################### Marc_compileIfort2016: From 1ae9f79ab411d53cbc4035c0b675a33ff8af7828 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 27 Jun 2018 21:45:29 +0200 Subject: [PATCH 20/54] forgot to remove stage --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5907ee672..d0c1f7100 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,6 @@ stages: - compileSpectralGNU - prepareSpectral - spectral - - compileMarc2015 - compileMarc2016 - marc - compileAbaqus2016 From 9101af84c66944d001d4b8733f24da4854c79291 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 28 Jun 2018 06:47:22 +0200 Subject: [PATCH 21/54] only testing Marc 2017 Using Intel 17 Compiler even though recommended Compiler is 16.0.2 We only have 16.0.0 and that gives random segmenation faults --- .gitlab-ci.yml | 25 +++++++++++-------------- CONFIG | 2 +- lib/damask/solver/marc.py | 4 +--- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0c1f7100..829020e0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ stages: - compileSpectralGNU - prepareSpectral - spectral - - compileMarc2016 + - compileMarc2017 - marc - compileAbaqus2016 - compileAbaqus2017 @@ -69,13 +69,10 @@ variables: # ++++++++++++ FEM +++++++++++++++++++++++++++++++++++++++++++++++++++ Abaqus2016: "FEM/Abaqus/2016" Abaqus2017: "FEM/Abaqus/2017" - MSC2014: "FEM/MSC/2014" - MSC2014_2: "FEM/MSC/2014.2" - MSC2015: "FEM/MSC/2015" - MSC2016: "FEM/MSC/2016" + MSC2017: "FEM/MSC/2017" # ------------ Defaults ---------------------------------------------- Abaqus: "$Abaqus2017" - MSC: "$MSC2016" + MSC: "$MSC2017" # ++++++++++++ Documentation +++++++++++++++++++++++++++++++++++++++++ Doxygen1_8_13: "Documentation/Doxygen/1.8.13" # ------------ Defaults ---------------------------------------------- @@ -330,11 +327,11 @@ TextureComponents: ################################################################################################### -Marc_compileIfort2016: - stage: compileMarc2016 +Marc_compileIfort2017: + stage: compileMarc2017 script: - - module load $IntelCompiler16_0 $MSC2016 - - Marc_compileIfort/test.py -m 2016 + - module load $IntelCompiler17_0 $MSC2017 + - Marc_compileIfort/test.py -m 2017 except: - master - release @@ -343,7 +340,7 @@ Marc_compileIfort2016: Hex_elastic: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - Hex_elastic/test.py except: - master @@ -352,7 +349,7 @@ Hex_elastic: CubicFCC_elastic: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - CubicFCC_elastic/test.py except: - master @@ -361,7 +358,7 @@ CubicFCC_elastic: CubicBCC_elastic: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - CubicBCC_elastic/test.py except: - master @@ -370,7 +367,7 @@ CubicBCC_elastic: J2_plasticBehavior: stage: marc script: - - module load $IntelCompiler16_0 $MSC + - module load $IntelCompiler17_0 $MSC - J2_plasticBehavior/test.py except: - master diff --git a/CONFIG b/CONFIG index db75fa811..459216375 100644 --- a/CONFIG +++ b/CONFIG @@ -6,6 +6,6 @@ set DAMASK_BIN = ${DAMASK_ROOT}/bin set DAMASK_NUM_THREADS = 4 set MSC_ROOT = /opt/msc -set MARC_VERSION = 2016 +set MARC_VERSION = 2017 set ABAQUS_VERSION = 2017 diff --git a/lib/damask/solver/marc.py b/lib/damask/solver/marc.py index 16f3c8451..59feb3325 100644 --- a/lib/damask/solver/marc.py +++ b/lib/damask/solver/marc.py @@ -9,10 +9,8 @@ class Marc(Solver): def __init__(self): self.solver = 'Marc' self.releases = { \ + '2017': ['linux64',''], '2016': ['linux64',''], - '2015': ['linux64',''], - '2014.2':['linux64',''], - '2014' :['linux64',''], } From b3862ef800ba300bf872f817118330ce9092d51e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 28 Jun 2018 07:22:32 +0200 Subject: [PATCH 22/54] enough to support 3 versions (2018 should be out already/soon) --- src/DAMASK_marc2015.f90 | 1 - 1 file changed, 1 deletion(-) delete mode 120000 src/DAMASK_marc2015.f90 diff --git a/src/DAMASK_marc2015.f90 b/src/DAMASK_marc2015.f90 deleted file mode 120000 index 2c5bec706..000000000 --- a/src/DAMASK_marc2015.f90 +++ /dev/null @@ -1 +0,0 @@ -DAMASK_marc.f90 \ No newline at end of file From c9b2614c340c6dbee67d2c19eaee3c559f52c1ff Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 28 Jun 2018 18:04:25 +0200 Subject: [PATCH 23/54] [skip ci] updated version information after successful test of v2.0.2-156-g5e5f975b --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 6c338b298..591bc9f15 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-48-gaebb06e +v2.0.2-156-g5e5f975b From a38a3ef83edaf0bacd5945359c202c48ad9fb292 Mon Sep 17 00:00:00 2001 From: Yang Su Date: Fri, 29 Jun 2018 18:45:04 -0400 Subject: [PATCH 24/54] changed state assignment to b=a;c=b from b=a;c=a --- caused memory fault in ifort15 --- src/constitutive.f90 | 59 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index e6f0c07ff..dabd3c7d1 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -141,7 +141,7 @@ subroutine constitutive_init() integer(pInt), parameter :: FILEUNIT = 200_pInt integer(pInt) :: & o, & !< counter in output loop - p, & !< counter in phase loop + ph, & !< counter in phase loop s, & !< counter in source loop ins !< instance of plasticity/source @@ -202,11 +202,11 @@ subroutine constitutive_init() !-------------------------------------------------------------------------------------------------- ! write description file for constitutive output call IO_write_jobFile(FILEUNIT,'outputConstitutive') - PhaseLoop: do p = 1_pInt,material_Nphase - activePhase: if (any(material_phase == p)) then - ins = phase_plasticityInstance(p) + PhaseLoop: do ph = 1_pInt,material_Nphase + activePhase: if (any(material_phase == ph)) then + ins = phase_plasticityInstance(ph) knownPlasticity = .true. ! assume valid - plasticityType: select case(phase_plasticity(p)) + plasticityType: select case(phase_plasticity(ph)) case (PLASTICITY_NONE_ID) plasticityType outputName = PLASTICITY_NONE_label thisOutput => null() @@ -238,62 +238,62 @@ subroutine constitutive_init() case default plasticityType knownPlasticity = .false. end select plasticityType - write(FILEUNIT,'(/,a,/)') '['//trim(phase_name(p))//']' + write(FILEUNIT,'(/,a,/)') '['//trim(phase_name(ph))//']' if (knownPlasticity) then - write(FILEUNIT,'(a)') '(plasticity)'//char(9)//trim(outputName) - if (phase_plasticity(p) /= PLASTICITY_NONE_ID) then + if (phase_plasticity(ph) /= PLASTICITY_NONE_ID) then OutputPlasticityLoop: do o = 1_pInt,size(thisOutput(:,ins)) if(len(trim(thisOutput(o,ins))) > 0_pInt) & write(FILEUNIT,'(a,i4)') trim(thisOutput(o,ins))//char(9),thisSize(o,ins) enddo OutputPlasticityLoop endif endif - SourceLoop: do s = 1_pInt, phase_Nsources(p) + + SourceLoop: do s = 1_pInt, phase_Nsources(ph) knownSource = .true. ! assume valid - sourceType: select case (phase_source(s,p)) + sourceType: select case (phase_source(s,ph)) case (SOURCE_thermal_dissipation_ID) sourceType - ins = source_thermal_dissipation_instance(p) + ins = source_thermal_dissipation_instance(ph) outputName = SOURCE_thermal_dissipation_label thisOutput => source_thermal_dissipation_output thisSize => source_thermal_dissipation_sizePostResult case (SOURCE_thermal_externalheat_ID) sourceType - ins = source_thermal_externalheat_instance(p) + ins = source_thermal_externalheat_instance(ph) outputName = SOURCE_thermal_externalheat_label thisOutput => source_thermal_externalheat_output thisSize => source_thermal_externalheat_sizePostResult case (SOURCE_damage_isoBrittle_ID) sourceType - ins = source_damage_isoBrittle_instance(p) + ins = source_damage_isoBrittle_instance(ph) outputName = SOURCE_damage_isoBrittle_label thisOutput => source_damage_isoBrittle_output thisSize => source_damage_isoBrittle_sizePostResult case (SOURCE_damage_isoDuctile_ID) sourceType - ins = source_damage_isoDuctile_instance(p) + ins = source_damage_isoDuctile_instance(ph) outputName = SOURCE_damage_isoDuctile_label thisOutput => source_damage_isoDuctile_output thisSize => source_damage_isoDuctile_sizePostResult case (SOURCE_damage_anisoBrittle_ID) sourceType - ins = source_damage_anisoBrittle_instance(p) + ins = source_damage_anisoBrittle_instance(ph) outputName = SOURCE_damage_anisoBrittle_label thisOutput => source_damage_anisoBrittle_output thisSize => source_damage_anisoBrittle_sizePostResult case (SOURCE_damage_anisoDuctile_ID) sourceType - ins = source_damage_anisoDuctile_instance(p) + ins = source_damage_anisoDuctile_instance(ph) outputName = SOURCE_damage_anisoDuctile_label thisOutput => source_damage_anisoDuctile_output thisSize => source_damage_anisoDuctile_sizePostResult case (SOURCE_vacancy_phenoplasticity_ID) sourceType - ins = source_vacancy_phenoplasticity_instance(p) + ins = source_vacancy_phenoplasticity_instance(ph) outputName = SOURCE_vacancy_phenoplasticity_label thisOutput => source_vacancy_phenoplasticity_output thisSize => source_vacancy_phenoplasticity_sizePostResult case (SOURCE_vacancy_irradiation_ID) sourceType - ins = source_vacancy_irradiation_instance(p) + ins = source_vacancy_irradiation_instance(ph) outputName = SOURCE_vacancy_irradiation_label thisOutput => source_vacancy_irradiation_output thisSize => source_vacancy_irradiation_sizePostResult case (SOURCE_vacancy_thermalfluc_ID) sourceType - ins = source_vacancy_thermalfluc_instance(p) + ins = source_vacancy_thermalfluc_instance(ph) outputName = SOURCE_vacancy_thermalfluc_label thisOutput => source_vacancy_thermalfluc_output thisSize => source_vacancy_thermalfluc_sizePostResult @@ -318,29 +318,28 @@ subroutine constitutive_init() constitutive_source_maxSizeDotState = 0_pInt constitutive_source_maxSizePostResults = 0_pInt - PhaseLoop2:do p = 1_pInt,material_Nphase + PhaseLoop2:do ph = 1_pInt,material_Nphase !-------------------------------------------------------------------------------------------------- ! partition and inititalize state - plasticState(p)%partionedState0 = plasticState(p)%State0 - plasticState(p)%State = plasticState(p)%State0 - forall(s = 1_pInt:phase_Nsources(p)) - sourceState(p)%p(s)%partionedState0 = sourceState(p)%p(s)%State0 - sourceState(p)%p(s)%State = sourceState(p)%p(s)%State0 + plasticState(ph)%partionedState0 = plasticState(ph)%state0 + plasticState(ph)%state = plasticState(ph)%partionedState0 + forall(s = 1_pInt:phase_Nsources(ph)) + sourceState(ph)%p(s)%partionedState0 = sourceState(ph)%p(s)%state0 + sourceState(ph)%p(s)%state = sourceState(ph)%p(s)%partionedState0 end forall !-------------------------------------------------------------------------------------------------- ! determine max size of state and output constitutive_plasticity_maxSizeDotState = max(constitutive_plasticity_maxSizeDotState, & - plasticState(p)%sizeDotState) + plasticState(ph)%sizeDotState) constitutive_plasticity_maxSizePostResults = max(constitutive_plasticity_maxSizePostResults, & - plasticState(p)%sizePostResults) + plasticState(ph)%sizePostResults) constitutive_source_maxSizeDotState = max(constitutive_source_maxSizeDotState, & - maxval(sourceState(p)%p(:)%sizeDotState)) + maxval(sourceState(ph)%p(:)%sizeDotState)) constitutive_source_maxSizePostResults = max(constitutive_source_maxSizePostResults, & - maxval(sourceState(p)%p(:)%sizePostResults)) + maxval(sourceState(ph)%p(:)%sizePostResults)) enddo PhaseLoop2 - end subroutine constitutive_init From e0a3d7bd3cae753df66ba4985c32a5379fd231bb Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 30 Jun 2018 11:08:33 +0200 Subject: [PATCH 25/54] converging keywords towards DAMASK paper --- PRIVATE | 2 +- examples/AbaqusStandard/material.config | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PRIVATE b/PRIVATE index cd02f6c1a..d8ab8056d 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit cd02f6c1a481491eb4517651516b8311348b4777 +Subproject commit d8ab8056d6245ce42bec8953de9af1d7754867cf diff --git a/examples/AbaqusStandard/material.config b/examples/AbaqusStandard/material.config index 3c2cda56a..d371c8de0 100644 --- a/examples/AbaqusStandard/material.config +++ b/examples/AbaqusStandard/material.config @@ -3,10 +3,10 @@ #-------------------# [dummy] -type none +mech none [poly] -type isostrain +mech isostrain Ngrains 10 @@ -63,7 +63,7 @@ gdot0_slip 0.001 n_slip 20 tau0_slip 31e6 # per family tausat_slip 63e6 # per family -w0_slip 2.25 +a_slip 2.25 gdot0_twin 0.001 n_twin 20 tau0_twin 31e6 # per family From f8bac92a1ab37acffd3cfd212b8cb0d3749a3524 Mon Sep 17 00:00:00 2001 From: Test User Date: Sat, 30 Jun 2018 15:52:12 +0200 Subject: [PATCH 26/54] [skip ci] updated version information after successful test of v2.0.2-160-g7d1e6ef5 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 591bc9f15..42bfca400 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-156-g5e5f975b +v2.0.2-160-g7d1e6ef5 From 7ae21603e38c733733b4c1b16295f21ea472fb64 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 2 Jul 2018 12:26:39 +0200 Subject: [PATCH 27/54] including debug statements --- installation/mods_Abaqus/abaqus_v6_debug.env | 56 ++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 installation/mods_Abaqus/abaqus_v6_debug.env diff --git a/installation/mods_Abaqus/abaqus_v6_debug.env b/installation/mods_Abaqus/abaqus_v6_debug.env new file mode 100644 index 000000000..b99d1407c --- /dev/null +++ b/installation/mods_Abaqus/abaqus_v6_debug.env @@ -0,0 +1,56 @@ +# +# DAMASK Abaqus Environment File +# +# ------------------------------------ +# originally taken from Abaqus ver. 6.11.1 +# +# +# Linux (Opteron/EM64T) Settings: +# +# Compile and Link command for user subroutines. +# Compile_cpp and link_exe for Abaqus make utility. +# +import os, re, glob, driverUtils +from damask import version as DAMASKVERSION + +# Use the version in $PATH +fortCmd = "ifort" + +# -free to use free-format FORTRAN 90 syntax +# -O <0-3> optimization level +# -fpp use FORTRAN preprocessor on source code +# -openmp build with openMP support +# -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) +# -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) +# -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) +# -ftz flush underflow to zero +# -diag-disable 5268 disable warnings about line length > 132 (only comments there anyway) +# -implicitnone assume no implicit types (e.g. i for integer) +# -standard-semantics sets standard (Fortran 2008) and some other conventions +# -assume nostd_mod_proc_name avoid problems with libraries compiled without that option +# -real-size 64 -DFLOAT=8 assume size of real to be 8 bytes, matches our definition of pReal +# -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt + +compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + + "-I%I -free -O1 -fpp -openmp " + + "-ftz -diag-disable 5268 " + + "-implicitnone -standard-semantics " + + "-assume nostd_mod_proc_name " + + "-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " + + "-check bounds,format,output_conversion,uninit " + + "-ftrapuv -fpe-all0 " + + "-g -traceback -gen-interfaces -fp-stack-check -fp-model strict " + + '-DDAMASKVERSION=\\\"%s\\\"'%DAMASKVERSION) + +# Abaqus/CAE will generate an input file without parts and assemblies. +cae_no_parts_input_file=ON +# Both the Abaqus/Explicit packager and analysis are run in double precision. +double_precision=BOTH +# The user will not be asked whether old job files of the same name should be deleted. +ask_delete=OFF + +# usub_lib_dir='your_prefered_location/abqlib' + +# Remove the temporary names from the namespace +del fortCmd +del DAMASKVERSION From c9531b3aa8d00a30e8d78dec4e4b3a1b959501c6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 2 Jul 2018 13:00:22 +0200 Subject: [PATCH 28/54] openmp does not work when running with runtime debugging --- installation/mods_Abaqus/abaqus_v6.env | 2 +- installation/mods_Abaqus/abaqus_v6_debug.env | 2 +- installation/mods_Abaqus/abaqus_v6_serial.env | 52 ------------------- 3 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 installation/mods_Abaqus/abaqus_v6_serial.env diff --git a/installation/mods_Abaqus/abaqus_v6.env b/installation/mods_Abaqus/abaqus_v6.env index b4710e198..fb243e987 100644 --- a/installation/mods_Abaqus/abaqus_v6.env +++ b/installation/mods_Abaqus/abaqus_v6.env @@ -32,7 +32,7 @@ fortCmd = "ifort" # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + - "-I%I -free -O1 -fpp -openmp " + + "-I%I -free -O3 -fpp " + "-ftz -diag-disable 5268 " + "-implicitnone -standard-semantics " + "-assume nostd_mod_proc_name " + diff --git a/installation/mods_Abaqus/abaqus_v6_debug.env b/installation/mods_Abaqus/abaqus_v6_debug.env index b99d1407c..2b112f29a 100644 --- a/installation/mods_Abaqus/abaqus_v6_debug.env +++ b/installation/mods_Abaqus/abaqus_v6_debug.env @@ -32,7 +32,7 @@ fortCmd = "ifort" # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + - "-I%I -free -O1 -fpp -openmp " + + "-I%I -free -O0 -fpp " + "-ftz -diag-disable 5268 " + "-implicitnone -standard-semantics " + "-assume nostd_mod_proc_name " + diff --git a/installation/mods_Abaqus/abaqus_v6_serial.env b/installation/mods_Abaqus/abaqus_v6_serial.env deleted file mode 100644 index c608b6993..000000000 --- a/installation/mods_Abaqus/abaqus_v6_serial.env +++ /dev/null @@ -1,52 +0,0 @@ -# -# DAMASK Abaqus Environment File -# -# ------------------------------------ -# originally taken from Abaqus ver. 6.11.1 -# -# -# Linux (Opteron/EM64T) Settings: -# -# Compile and Link command for user subroutines. -# Compile_cpp and link_exe for Abaqus make utility. -# -import os, re, glob, driverUtils -from damask import version as DAMASKVERSION - -# Use the version in $PATH -fortCmd = "ifort" - -# -free to use free-format FORTRAN 90 syntax -# -O <0-3> optimization level -# -fpp use FORTRAN preprocessor on source code -# -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) -# -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) -# -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) -# -ftz flush underflow to zero -# -diag-disable 5268 disable warnings about line length > 132 (only comments there anyway) -# -implicitnone assume no implicit types (e.g. i for integer) -# -standard-semantics sets standard (Fortran 2008) and some other conventions -# -assume nostd_mod_proc_name avoid problems with libraries compiled without that option -# -real-size 64 -DFLOAT=8 assume size of real to be 8 bytes, matches our definition of pReal -# -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt - -compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + - "-I%I -free -O1 -fpp " + - "-ftz -diag-disable 5268 " + - "-implicitnone -standard-semantics " + - "-assume nostd_mod_proc_name " + - "-real-size 64 -integer-size 32 -DFLOAT=8 -DINT=4 " + - '-DDAMASKVERSION=\\\"%s\\\"'%DAMASKVERSION) - -# Abaqus/CAE will generate an input file without parts and assemblies. -cae_no_parts_input_file=ON -# Both the Abaqus/Explicit packager and analysis are run in double precision. -double_precision=BOTH -# The user will not be asked whether old job files of the same name should be deleted. -ask_delete=OFF - -# usub_lib_dir='your_prefered_location/abqlib' - -# Remove the temporary names from the namespace -del fortCmd -del DAMASKVERSION From 2b15468f0f8b745f3ba18cf83840d8ce2a7b51ce Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 2 Jul 2018 19:53:26 +0200 Subject: [PATCH 29/54] transition compatibility not needed any more --- env/DAMASK.csh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/env/DAMASK.csh b/env/DAMASK.csh index d5bfb4437..26e2dd8a2 100644 --- a/env/DAMASK.csh +++ b/env/DAMASK.csh @@ -3,15 +3,7 @@ set CALLED=($_) set DIRNAME=`dirname $CALLED[2]` - -# transition compatibility (renamed $DAMASK_ROOT/DAMASK_env.csh to $DAMASK_ROOT/env/DAMASK.csh) -set FILENAME=`basename $CALLED[2]` -if ($FILENAME == "DAMASK.csh") then - set DIRNAME=$DIRNAME"/../" -endif - -set DAMASK_ROOT=`python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $DIRNAME` - +set DAMASK_ROOT=`python -c "import os,sys; print(os.path.realpath(os.path.expanduser(sys.argv[1])))" $DIRNAME"/../"` source $DAMASK_ROOT/CONFIG From 630c1ac95bb8032cccdcd034ed354b7d95ae8f33 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Mon, 2 Jul 2018 22:15:12 +0200 Subject: [PATCH 30/54] ngrains is not supported any more --- PRIVATE | 2 +- examples/AbaqusStandard/material.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PRIVATE b/PRIVATE index aead92902..e6ce7728e 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit aead92902b3a0cf3404be9c552bfec918d7aaffb +Subproject commit e6ce7728e38b89cc5b78b4a463346333b01ffb24 diff --git a/examples/AbaqusStandard/material.config b/examples/AbaqusStandard/material.config index d371c8de0..52968f72a 100644 --- a/examples/AbaqusStandard/material.config +++ b/examples/AbaqusStandard/material.config @@ -7,7 +7,7 @@ mech none [poly] mech isostrain -Ngrains 10 +Nconstituents 10 From 23f74343a7aa1eda4061151c6706fbd407fe660b Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 3 Jul 2018 00:06:08 +0200 Subject: [PATCH 31/54] [skip ci] updated version information after successful test of v2.0.2-162-g2b15468f --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 42bfca400..4c8721172 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-160-g7d1e6ef5 +v2.0.2-162-g2b15468f From 4817417aa1b9e62f4315db16c76bf5b078a80427 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 12:04:45 +0200 Subject: [PATCH 32/54] not supported anymore --- .../2014.2/Marc_tools/comp_damask | 52 - .../2014.2/Marc_tools/comp_damask_h | 52 - .../2014.2/Marc_tools/comp_damask_hmp | 52 - .../2014.2/Marc_tools/comp_damask_l | 52 - .../2014.2/Marc_tools/comp_damask_lmp | 52 - .../2014.2/Marc_tools/comp_damask_mp | 52 - .../2014.2/Marc_tools/comp_user.original | 41 - .../2014.2/Marc_tools/include_linux64 | 748 --- .../Marc_tools/include_linux64.original | 685 --- .../2014.2/Marc_tools/run_damask | 4087 ---------------- .../2014.2/Marc_tools/run_damask_h | 4087 ---------------- .../2014.2/Marc_tools/run_damask_hmp | 4087 ---------------- .../2014.2/Marc_tools/run_damask_l | 4087 ---------------- .../2014.2/Marc_tools/run_damask_lmp | 4087 ---------------- .../2014.2/Marc_tools/run_damask_mp | 4087 ---------------- .../2014.2/Marc_tools/run_marc.original | 4184 ---------------- .../2014.2/Mentat_bin/edit_window | 5 - .../2014.2/Mentat_bin/edit_window.original | 18 - .../2014.2/Mentat_bin/kill1.original | 8 - .../mods_MarcMentat/2014.2/Mentat_bin/kill4 | 8 - .../mods_MarcMentat/2014.2/Mentat_bin/kill5 | 8 - .../mods_MarcMentat/2014.2/Mentat_bin/kill6 | 8 - .../mods_MarcMentat/2014.2/Mentat_bin/kill7 | 8 - .../mods_MarcMentat/2014.2/Mentat_bin/kill8 | 8 - .../mods_MarcMentat/2014.2/Mentat_bin/kill9 | 8 - .../2014.2/Mentat_bin/submit1.original | 186 - .../mods_MarcMentat/2014.2/Mentat_bin/submit4 | 187 - .../mods_MarcMentat/2014.2/Mentat_bin/submit5 | 187 - .../mods_MarcMentat/2014.2/Mentat_bin/submit6 | 187 - .../mods_MarcMentat/2014.2/Mentat_bin/submit7 | 187 - .../mods_MarcMentat/2014.2/Mentat_bin/submit8 | 187 - .../mods_MarcMentat/2014.2/Mentat_bin/submit9 | 187 - .../2014.2/Mentat_menus/job_run.ms | 3396 ------------- .../2014.2/Mentat_menus/job_run.ms.original | 3255 ------------- .../2014/Marc_tools/comp_damask | 52 - .../2014/Marc_tools/comp_damask_h | 52 - .../2014/Marc_tools/comp_damask_hmp | 52 - .../2014/Marc_tools/comp_damask_l | 52 - .../2014/Marc_tools/comp_damask_lmp | 52 - .../2014/Marc_tools/comp_damask_mp | 52 - .../2014/Marc_tools/comp_user.original | 41 - .../2014/Marc_tools/include_linux64 | 742 --- .../2014/Marc_tools/include_linux64.original | 679 --- .../2014/Marc_tools/run_damask | 4085 ---------------- .../2014/Marc_tools/run_damask_h | 4085 ---------------- .../2014/Marc_tools/run_damask_hmp | 4085 ---------------- .../2014/Marc_tools/run_damask_l | 4085 ---------------- .../2014/Marc_tools/run_damask_lmp | 4085 ---------------- .../2014/Marc_tools/run_damask_mp | 4085 ---------------- .../2014/Marc_tools/run_marc.original | 4138 ---------------- .../2014/Mentat_bin/edit_window | 5 - .../2014/Mentat_bin/edit_window.original | 18 - .../2014/Mentat_bin/kill1.original | 8 - .../mods_MarcMentat/2014/Mentat_bin/kill4 | 8 - .../mods_MarcMentat/2014/Mentat_bin/kill5 | 8 - .../mods_MarcMentat/2014/Mentat_bin/kill6 | 8 - .../mods_MarcMentat/2014/Mentat_bin/kill7 | 8 - .../mods_MarcMentat/2014/Mentat_bin/kill8 | 8 - .../mods_MarcMentat/2014/Mentat_bin/kill9 | 8 - .../2014/Mentat_bin/submit1.original | 186 - .../mods_MarcMentat/2014/Mentat_bin/submit4 | 187 - .../mods_MarcMentat/2014/Mentat_bin/submit5 | 187 - .../mods_MarcMentat/2014/Mentat_bin/submit6 | 187 - .../mods_MarcMentat/2014/Mentat_bin/submit7 | 187 - .../mods_MarcMentat/2014/Mentat_bin/submit8 | 187 - .../mods_MarcMentat/2014/Mentat_bin/submit9 | 187 - .../2014/Mentat_menus/job_run.ms | 3219 ------------- .../2014/Mentat_menus/job_run.ms.original | 3082 ------------ .../2015/Marc_tools/comp_damask | 52 - .../2015/Marc_tools/comp_damask_h | 52 - .../2015/Marc_tools/comp_damask_hmp | 52 - .../2015/Marc_tools/comp_damask_l | 52 - .../2015/Marc_tools/comp_damask_lmp | 52 - .../2015/Marc_tools/comp_damask_mp | 52 - .../2015/Marc_tools/comp_user.original | 41 - .../2015/Marc_tools/include_linux64 | 744 --- .../2015/Marc_tools/include_linux64.original | 688 --- .../2015/Marc_tools/run_damask | 4135 ---------------- .../2015/Marc_tools/run_damask_h | 4135 ---------------- .../2015/Marc_tools/run_damask_hmp | 4135 ---------------- .../2015/Marc_tools/run_damask_l | 4135 ---------------- .../2015/Marc_tools/run_damask_lmp | 4135 ---------------- .../2015/Marc_tools/run_damask_mp | 4135 ---------------- .../2015/Marc_tools/run_marc.original | 4218 ----------------- .../2015/Mentat_bin/edit_window | 5 - .../2015/Mentat_bin/edit_window.original | 18 - .../2015/Mentat_bin/kill1.original | 8 - .../mods_MarcMentat/2015/Mentat_bin/kill4 | 8 - .../mods_MarcMentat/2015/Mentat_bin/kill5 | 8 - .../mods_MarcMentat/2015/Mentat_bin/kill6 | 8 - .../mods_MarcMentat/2015/Mentat_bin/kill7 | 8 - .../mods_MarcMentat/2015/Mentat_bin/kill8 | 8 - .../mods_MarcMentat/2015/Mentat_bin/kill9 | 8 - .../2015/Mentat_bin/submit1.original | 186 - .../mods_MarcMentat/2015/Mentat_bin/submit4 | 187 - .../mods_MarcMentat/2015/Mentat_bin/submit5 | 187 - .../mods_MarcMentat/2015/Mentat_bin/submit6 | 187 - .../mods_MarcMentat/2015/Mentat_bin/submit7 | 187 - .../mods_MarcMentat/2015/Mentat_bin/submit8 | 187 - .../mods_MarcMentat/2015/Mentat_bin/submit9 | 187 - .../2015/Mentat_menus/job_run.ms | 2655 ----------- .../2015/Mentat_menus/job_run.ms.original | 2518 ---------- 102 files changed, 114013 deletions(-) delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_h delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_hmp delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_l delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_lmp delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_mp delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/comp_user.original delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64 delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64.original delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_damask delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_h delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_hmp delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_l delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_lmp delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_mp delete mode 100644 installation/mods_MarcMentat/2014.2/Marc_tools/run_marc.original delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window.original delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill1.original delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill4 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill5 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill6 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill7 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill8 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/kill9 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit1.original delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit4 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit5 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit6 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit7 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit8 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_bin/submit9 delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms delete mode 100644 installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms.original delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_damask delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_damask_h delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_damask_hmp delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_damask_l delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_damask_lmp delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_damask_mp delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/comp_user.original delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/include_linux64 delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/include_linux64.original delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_damask delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_damask_h delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_damask_hmp delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_damask_l delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_damask_lmp delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_damask_mp delete mode 100644 installation/mods_MarcMentat/2014/Marc_tools/run_marc.original delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/edit_window delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/edit_window.original delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill1.original delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill4 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill5 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill6 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill7 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill8 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/kill9 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit1.original delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit4 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit5 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit6 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit7 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit8 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_bin/submit9 delete mode 100644 installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms delete mode 100644 installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms.original delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_damask delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_damask_h delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_damask_hmp delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_damask_l delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_damask_lmp delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_damask_mp delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/comp_user.original delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/include_linux64 delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/include_linux64.original delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_damask delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_damask_h delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_damask_hmp delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_damask_l delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_damask_lmp delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_damask_mp delete mode 100644 installation/mods_MarcMentat/2015/Marc_tools/run_marc.original delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/edit_window delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/edit_window.original delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill1.original delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill4 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill5 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill6 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill7 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill8 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/kill9 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit1.original delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit4 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit5 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit6 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit7 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit8 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_bin/submit9 delete mode 100644 installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms delete mode 100644 installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms.original diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask deleted file mode 100644 index 2d144b8a4..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_h b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_h deleted file mode 100644 index 01464f095..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_h +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_hmp b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_hmp deleted file mode 100644 index 36ced6543..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_hmp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_l b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_l deleted file mode 100644 index 31b5cd175..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_l +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_lmp b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_lmp deleted file mode 100644 index 8a0c1255d..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_lmp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRANLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_mp b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_mp deleted file mode 100644 index 986d9ae04..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_damask_mp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_user.original b/installation/mods_MarcMentat/2014.2/Marc_tools/comp_user.original deleted file mode 100644 index 8679bb041..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/comp_user.original +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user.f on host `hostname`" -echo "program: $program" - $FORTRAN $user.f || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$user.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS || \ - { - echo "$0: link failed for $user.o on host `hostname`" - exit 1 - } - /bin/rm $userobj diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64 b/installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64 deleted file mode 100644 index 5ea0df864..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64 +++ /dev/null @@ -1,748 +0,0 @@ -# -# General definitions for the Marc 2014 version -# -# EM64T -# ( LP64 - i4 version) -# (ILP64 - i8 version) -# -# Linux RedHat 5.7 -# -# 64 bit MPI version -# -# Intel(R) Fortran Compiler -# Version 13.0.1 -# -# Intel(R) C Compiler -# Version 13.0.1 -# -# MKL Libraries: -# Intel(R) MKL 10.3 -# -# DATE -# -# To check the O/S level, type: -# uname -a -# -# Distributed parallel MPI libraries: -# 1) HP MPI 2.3 -# To check the mpi version, type: -# mpirun -version -# 2) Intel MPI 4.0 -# To check the mpi version, type: -# mpirun -version -# -# To check the Compiler level, type using the compiler -# installation path: -# ifort -V -# icc -V -# -# REMARKS : This file contains the definitions of variables used during -# compilation loading and use of the MARC programmes . The -# current machine type is identified by means of the variable -# MACHINE , defined below. -# -# -# MPI_ROOT: root directory in which mpi shared libraries, etc. are located -# DIRJOB : directory in which spawned jobs should look for Marc input -# MPI_ARCH: system architecture -# MPI_EPATH: path where executable resides -# -REVISION="VERSION, BUILD" -HOSTNAME=`hostname` - -# find available memory in Mbyte on the machine -# can be set explicitly -MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'` - -# set _OEM_NASTRAN to 1 for MD Nastran build -# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable -_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}" - -# uncomment the following line for an autoforge build -#AUTOFORGE=1 -AUTOFORGE=0 -export AUTOFORGE - -# integer size -if test "$MARC_INTEGER_SIZE" = "" ; then - INTEGER_PATH= -else - INTEGER_PATH=/$MARC_INTEGER_SIZE -fi - -FCOMP=ifort - -# -# settings for Metis -# -METIS="-I$METIS_SOURCE/include" -METISLIBS="$MARC_LIB/metis.a " - -# -# settings for MPI -# -# RCP and RSH are used for parallel network runs -# replace with similar commands like rsh if needed -RCP=/usr/bin/scp -RSH=/usr/bin/ssh -# - - -MPI_DEFAULT=intelmpi -MPI_OTHER=hpmpi - -MPITYPE=$MPI_DEFAULT - -if test $AUTOFORGE -then - if test $AUTOFORGE = 1 - then - MPITYPE=none - fi -fi - - -# overrule MPITYPE setting with environmental variable MARC_MPITYPE -if test $MARC_MPITYPE -then - MPITYPE=$MARC_MPITYPE -fi - -# always set MPITYPE to none for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - MPITYPE=none -fi - -# Edit following lines to build with GPGPU version of BCS Solver for -# NVIDIA platforms -#BCSGPUSOLVER=NONE -BCSGPUSOLVER=BCSGPU - -SOLVERFLAGS= -if test "$BCSGPUSOLVER" = BCSGPU -then - SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA" - BCS_DIR=bcsgpusolver - export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH - export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH -else - BCS_DIR=bcssolver -fi -# -# settings for MPI -# -DDM= -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - FCOMPMPI=mpif90 - export MPI_ROOT=$MARC_HPMPI - export MPI_REMSH=$RSH - export MPI_F77=$FCOMP - ARCHITECTURE=linux_amd64 - DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI" - MPI_CLEAN= - export MPI_EPATH=$MARC_BIN - export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH - export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1" -# Below line is moved in run_marc file -# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN" - if test -n "$MSC_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE" - fi - if test -n "$LM_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE" - fi - export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x" - RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f " - RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np " - RUN_JOB0= - fi - if test $MPITYPE = intelmpi - then - INTELMPI_VERSION=HYDRA - FCOMPMPI=mpiifort - MPI_ROOT=$MARC_INTELMPI - DDM="-I${MPI_ROOT}/include64 -DDDM" - PATH=$MPI_ROOT/bin64:$PATH - export PATH - LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - if test $INTELMPI_VERSION = HYDRA - then - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall" - else - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile " - fi - RUN_JOB0= - MPI_CLEAN= - MPI_EPATH=$MARC_BIN - MPIR_HOME=$MPI_ROOT - MPICH_F77=$FCOMP - MPICH_F77LINKER=$FCOMP - export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER - I_MPI_PIN_DOMAIN=node - export I_MPI_PIN_DOMAIN - fi -else - MPI_ROOT=$MARC_DUMMYMPI - export MPI_ROOT=$MARC_DUMMYMPI - DDM="-I$MPI_ROOT/include" -fi - -# -# variables for the "maintain" script -# - -MACHINENAME=LINUX -MACHINE64BIT=yes -MACHINE=Linux_EM64T -DEV=/dev/tape -GETLOG="whoami" -CLEAR="clear" -MY_UNAME=`uname -a` - -# Edit following 2 lines to build with VKI Solver -#VKISOLVER=VKI -VKISOLVER=NONE - -# Edit following 2 lines to build with CASI Solver -CASISOLVER=CASI -#CASISOLVER=NONE - -# Edit following 2 lines to build with MF2 Solver -MF2SOLVER=NONE -#MF2SOLVER=SERIAL -#MF2SOLVER=MF2PARALLEL - -# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO) -#INTELSOLVER=NONE -INTELSOLVER=PARDISO - -# Edit following lines to build with MUMPS -if test "$MARC_INTEGER_SIZE" = "i4" ; then - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -else - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -fi - -# Edit following 2 lines to build MARC dynamic shared library -MARC_DLL=MARC_DLL -MARC_DLL=NONE - -# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - VKISOLVER=NONE - CASISOLVER=NONE - MF2SOLVER=NONE - INTELSOLVER=NONE - MUMPSSOLVER=NONE - BCSGPUSOLVER=NONE - MARC_DLL=NONE -fi - -# -# define Fortran and C compile syntax -# -if test "$VKISOLVER" = VKI -then - SOLVERFLAGS="$SOLVERFLAGS -DVKI" -fi - -if test "$CASISOLVER" = CASI -then - SOLVERFLAGS="$SOLVERFLAGS -DCASI" -fi - -if test "$MF2SOLVER" = MF2PARALLEL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL" -fi -if test "$MF2SOLVER" = MF2SERIAL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL" -fi - -if test "$INTELSOLVER" = PARDISO -then - SOLVERFLAGS="$SOLVERFLAGS -DPARDISO" -fi - -if test "$MUMPSSOLVER" = MUMPS -then - SOLVERFLAGS="$SOLVERFLAGS -DMUMPS" -fi - - -if test "$MARC_DLL" = MARC_DLL -then - SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL" -fi - -LINK_OPT= -DEBUG_OPT= -C_DEBUG_OPT= - -#Uncomment following line to build Marc in debuggable mode -MARCDEBUG= -#MARCDEBUG="ON" - -if test "$MARCDEBUG" = "ON" -then - LINK_OPT="-debug -traceback" - DEBUG_OPT="-debug -traceback" - C_DEBUG_OPT="-debug -traceback" -fi - - -MARCCHECK= -#MARCCHECK="ON" -if test "$MARCCHECK" = "ON" -then - DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv " - C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv " -fi - -MARCCODECOV= -#MARCCODECOV="ON" - -MARCCODEPROF= -#MARCCODEPROF="ON" - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - I8FFLAGS="-real-size 64 -integer-size 32" - I8DEFINES="-DFLOAT=8 -DINT=4" - I8CDEFINES= - I8CASIDEFS= -else - I8FFLAGS="-i8 -real-size 64 -integer-size 64" - I8DEFINES="-DI64 -DFLOAT=8 -DINT=8" - I8CDEFINES="-U_DOUBLE -D_SINGLE" - I8CASIDEFS="-DCASI_64BIT_INT=1" -fi - -MTHREAD=OPENMP -if test "$MARC_OPENMP" = "NONE" ; then - MTHREAD=NONE -fi -#MTHREAD=NONE -if test "$_OEM_NASTRAN" -ne 0 -then -MTHREAD=NONE -fi - -OMP_COMPAT=NO -OMP_COMPAT=YES -if test "$MTHREAD" = "NONE" -then -OMP_COMPAT=NO -fi - -CDEFINES= -FDEFINES= - -if test "$_OEM_NASTRAN" -ne 0 -then - CDEFINES="$CDEFINES -D_OEM_NASTRAN" - FDEFINES="$FDEFINES -D_OEM_NASTRAN" -fi - -FDEFINES="$FDEFINES -D_IMPLICITNONE" - -if test "$_OEM_NASTRAN" -eq 0 -then - FDEFINES="$FDEFINES -DMKL -DOPENMP" -fi - -if test "$OMP_COMPAT" = "YES" -then - FDEFINES="$FDEFINES -DOMP_COMPAT" -fi - -# -D_MSCMARC -FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT" -CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES" - -CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS" -if test "$_OEM_NASTRAN" -ne 0 -then - CINCL="$CINCL -I../../include" -fi - -CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - -if test "$MARCDEBUG" = "ON" -then - CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -fi - -LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel" -CCT="$CC" -CCTLOW="$CCLOW" -CCTHIGH="$CCHIGH" - -CC_CASI="$CC -std=c99 $I8CASIDEFS" -CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -CCT_CASI="$CCT -std=c99 $I8CASIDEFS" -CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -#PROFILE="-Mprof=func" -#PROFILE="-Mprof=lines" -#PROFILE="-Mprof=func,mpi" -PROFILE= -if test "$MARCCODECOV" = "ON" -then -PROFILE="-prof-gen=srcpos" -fi -if test "$MARCCODEPROF" = "ON" -then -PROFILE=" $PROFILE -pg" -fi - -FORT_OPT="-c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr -mp1 -WB" -if test "$MTHREAD" = "OPENMP" -then - FORT_OPT=" $FORT_OPT -openmp" - if test "$OMP_COMPAT" = "YES" - then - FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat" - fi -else -# FORT_OPT=" $FORT_OPT -auto " - FORT_OPT=" $FORT_OPT -save -zero" -fi - -FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -# determine DAMASK version -HIT=0 -for arg in "$@" -do - if [ $HIT = 1 ] - then - DAMASKPATH=`dirname $arg` - break - elif [ ${arg:0:2} = -u -o ${arg:0:2} = -U ] - then - HIT=1 - fi -done -read DAMASKVERSION < $DAMASKPATH/../VERSION -DAMASKVERSION="'"$DAMASKVERSION"'" - -# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3 -DFORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - -if test "$MARCDEBUG" = "ON" -then - FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - - # DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3 - DFORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2.2 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_std_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014.2 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - -fi - -FORTLOWT="$FORTLOW" -FORTRANT="$FORTRAN" -FORTHIGHT="$FORTHIGH" - -FORTRANMNF="$FCOMP -c $FDEFINES " -CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE" - -FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main" -CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include" - - -BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL" -NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES " -NVCCLIB="ar rvl" -NVCCLD=icc -BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORT90HIGH="$BCSFORTHIGH" -if test "$MARCDEBUG" = "ON" -then - BCSFORTRAN=$BCSFORTLOW - BCSFORTHIGH=$BCSFORTLOW - BCSFORT90HIGH=$BCSFORTLOW -fi - -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - fi -# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines -# if test $MPITYPE = intelmpi -# then -# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include" -# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# fi - if test $MPITYPE = intelmpi - then - LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - fi -else - LOAD="$FCOMP $LINK_OPT -o " - LOADT="$FCOMP $LINK_OPT -o " -fi - -if test "$MARC_DLL" = MARC_DLL -then - FORTLOW="$FORTLOW -fpp -fPIC" - FORTRAN="$FORTRAN -fpp -fPIC" - FORTHIGH="$FORTHIGH -fpp -fPIC" - FORTRANMNF="$FORTRANMNF -fpp -fPIC" - CC="$CC -fPIC" - CCMNF="$CCMNF -fPIC" - CC_CASI="$CC_CASI -fPIC" - CCLOW_CASI="$CCLOW_CASI -fPIC" - CCHIGH_CASI="$CCHIGH_CASI -fPIC" - LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread" - LINK_MARC_DLL="-shared -fPIC" - LOAD_DLL=$LOAD - LOADT_DLL=$LOADT - EXT_DLL="so" -fi - - -XLIBS="-L/usr/X11/lib -lX11 " - -# -# define archive and ranlib syntax -# - -ARC="ar rvl" -ARD="ar dvl" -ARX="ar xl" -RAN="" - -# -# choose which libraries you want to use ( e.g. blas ) -# - -if test "$VKISOLVER" = VKI -then - VKISOLVERLIBS="$MARC_LIB/vkisolver.a" -else - VKISOLVERLIBS= -fi - -if test "$CASISOLVER" = CASI -then - CASISOLVERLIBS="$MARC_CASI/casilib.a" -else - CASISOLVERLIBS= -fi - -MF2SOLVERLIBS= -if test "$MF2SOLVER" = MF2PARALLEL -then - MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \ - $MARC_LIB/mf2parallel/libsym.a \ - $MARC_LIB/mf2parallel/libmet.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libnum.a \ - $MARC_LIB/mf2parallel/libutl.a \ - $MARC_LIB/mf2parallel/libr8.a \ - $MARC_LIB/mf2parallel/libz.a " -fi - -if test "$INTELSOLVER" = PARDISO -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a" - else - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a" - fi -else - INTELSOLVERLIBS= -fi - -if test "$MUMPSSOLVER" = MUMPS -then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - if test $MPITYPE = none - then - MUMPSSOLVERLIBS2= - echo hello > /dev/null - fi - if test $MPITYPE = intelmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a " - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a " - fi - fi - if test $MPITYPE = hpmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a" - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a" - fi - fi -else - MUMPSSOLVERLIBS= - MUMPSSOLVERLIBS2= -fi - -if test "$BCSGPUSOLVER" = BCSGPU -then - BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a " - MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda " - MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda " - MARCCUDALIBS=$MARCCUDALIBS1 - CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda " -else - BCSSOLVERLIBS="${MARC_LIB}/bcslib.a " -fi - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group" -else - MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group" -fi - -SECLIBS="-L$MARC_LIB -llapi" - -SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${INTELSOLVERLIBS} ${MF2SOLVERLIBS} ${MUMPSSOLVERLIBS2} \ - $MKLLIB -L$MARC_MKL -liomp5 \ - $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a " - -SOLVERLIBS_DLL=${SOLVERLIBS} - -MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}" -MRCLIBSPAR="$MARC_LIB/clib.a" -STUBS="$MARC_LIB/stubs.a " -MNFLIBS="$MARC_LIB/libmnf.a" -MDUSER="$MARC_LIB/md_user.a" - -OPENMP="-openmp" - -SYSLIBS=" $OPENMP -lpthread " - -# Uncomment the following lines to turn on the trace and comment out the next 4 lines -# if test $MPITYPE = intelmpi -# then -# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \ -# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt" -# fi -if test $MPITYPE = intelmpi -then - SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt $OPENMP -threads -lpthread" -fi - -SYSLIBSPAR=" " - -MARC_DLL_CODES="runmarc.f" - - -BLAS_SRC="dzero.f icopy.f izero.f" -if test "$_OEM_NASTRAN" -ne 0 -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f" - else - BLAS_SRC="ALL" - fi -fi - -LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \ - omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \ - elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \ - cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \ - inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f" -if test "$MARC_INTEGER_SIZE" = "i8" ; then - LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f" -fi -LOW_OPT_CODES_CASI="" - -HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \ - dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \ - dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f " - - -HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c" - -MAXNUM=1000000 diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64.original b/installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64.original deleted file mode 100644 index 79bc53fe9..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/include_linux64.original +++ /dev/null @@ -1,685 +0,0 @@ -# -# General definitions for the Marc 2014 version -# -# EM64T -# ( LP64 - i4 version) -# (ILP64 - i8 version) -# -# Linux RedHat 5.7 -# -# 64 bit MPI version -# -# Intel(R) Fortran Compiler -# Version 13.0.1 -# -# Intel(R) C Compiler -# Version 13.0.1 -# -# MKL Libraries: -# Intel(R) MKL 10.3 -# -# DATE -# -# To check the O/S level, type: -# uname -a -# -# Distributed parallel MPI libraries: -# 1) HP MPI 2.3 -# To check the mpi version, type: -# mpirun -version -# 2) Intel MPI 4.0 -# To check the mpi version, type: -# mpirun -version -# -# To check the Compiler level, type using the compiler -# installation path: -# ifort -V -# icc -V -# -# REMARKS : This file contains the definitions of variables used during -# compilation loading and use of the MARC programmes . The -# current machine type is identified by means of the variable -# MACHINE , defined below. -# -# -# MPI_ROOT: root directory in which mpi shared libraries, etc. are located -# DIRJOB : directory in which spawned jobs should look for Marc input -# MPI_ARCH: system architecture -# MPI_EPATH: path where executable resides -# -REVISION="VERSION, BUILD" -HOSTNAME=`hostname` - -# find available memory in Mbyte on the machine -# can be set explicitly -MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'` - -# set _OEM_NASTRAN to 1 for MD Nastran build -# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable -_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}" - -# uncomment the following line for an autoforge build -#AUTOFORGE=1 -AUTOFORGE=0 -export AUTOFORGE - -# integer size -if test "$MARC_INTEGER_SIZE" = "" ; then - INTEGER_PATH= -else - INTEGER_PATH=/$MARC_INTEGER_SIZE -fi - -FCOMP=ifort - -# -# settings for Metis -# -METIS="-I$METIS_SOURCE/include" -METISLIBS="$MARC_LIB/metis.a " - -# -# settings for MPI -# -# RCP and RSH are used for parallel network runs -# replace with similar commands like rsh if needed -RCP=/usr/bin/scp -RSH=/usr/bin/ssh -# - - -MPI_DEFAULT=intelmpi -MPI_OTHER=hpmpi - -MPITYPE=$MPI_DEFAULT - -if test $AUTOFORGE -then - if test $AUTOFORGE = 1 - then - MPITYPE=none - fi -fi - - -# overrule MPITYPE setting with environmental variable MARC_MPITYPE -if test $MARC_MPITYPE -then - MPITYPE=$MARC_MPITYPE -fi - -# always set MPITYPE to none for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - MPITYPE=none -fi - -# Edit following lines to build with GPGPU version of BCS Solver for -# NVIDIA platforms -#BCSGPUSOLVER=NONE -BCSGPUSOLVER=BCSGPU - -SOLVERFLAGS= -if test "$BCSGPUSOLVER" = BCSGPU -then - SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA" - BCS_DIR=bcsgpusolver - export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH - export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH -else - BCS_DIR=bcssolver -fi -# -# settings for MPI -# -DDM= -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - FCOMPMPI=mpif90 - export MPI_ROOT=$MARC_HPMPI - export MPI_REMSH=$RSH - export MPI_F77=$FCOMP - ARCHITECTURE=linux_amd64 - DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI" - MPI_CLEAN= - export MPI_EPATH=$MARC_BIN - export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH - export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1" -# Below line is moved in run_marc file -# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN" - if test -n "$MSC_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE" - fi - if test -n "$LM_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE" - fi - export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x" - RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f " - RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np " - RUN_JOB0= - fi - if test $MPITYPE = intelmpi - then - INTELMPI_VERSION=HYDRA - FCOMPMPI=mpiifort - MPI_ROOT=$MARC_INTELMPI - DDM="-I${MPI_ROOT}/include64 -DDDM" - PATH=$MPI_ROOT/bin64:$PATH - export PATH - LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - if test $INTELMPI_VERSION = HYDRA - then - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall" - else - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile " - fi - RUN_JOB0= - MPI_CLEAN= - MPI_EPATH=$MARC_BIN - MPIR_HOME=$MPI_ROOT - MPICH_F77=$FCOMP - MPICH_F77LINKER=$FCOMP - export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER - I_MPI_PIN_DOMAIN=node - export I_MPI_PIN_DOMAIN - fi -else - MPI_ROOT=$MARC_DUMMYMPI - export MPI_ROOT=$MARC_DUMMYMPI - DDM="-I$MPI_ROOT/include" -fi - -# -# variables for the "maintain" script -# - -MACHINENAME=LINUX -MACHINE64BIT=yes -MACHINE=Linux_EM64T -DEV=/dev/tape -GETLOG="whoami" -CLEAR="clear" -MY_UNAME=`uname -a` - -# Edit following 2 lines to build with VKI Solver -#VKISOLVER=VKI -VKISOLVER=NONE - -# Edit following 2 lines to build with CASI Solver -CASISOLVER=CASI -#CASISOLVER=NONE - -# Edit following 2 lines to build with MF2 Solver -MF2SOLVER=NONE -#MF2SOLVER=SERIAL -#MF2SOLVER=MF2PARALLEL - -# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO) -#INTELSOLVER=NONE -INTELSOLVER=PARDISO - -# Edit following lines to build with MUMPS -if test "$MARC_INTEGER_SIZE" = "i4" ; then - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -else - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -fi - -# Edit following 2 lines to build MARC dynamic shared library -MARC_DLL=MARC_DLL -MARC_DLL=NONE - -# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - VKISOLVER=NONE - CASISOLVER=NONE - MF2SOLVER=NONE - INTELSOLVER=NONE - MUMPSSOLVER=NONE - BCSGPUSOLVER=NONE - MARC_DLL=NONE -fi - -# -# define Fortran and C compile syntax -# -if test "$VKISOLVER" = VKI -then - SOLVERFLAGS="$SOLVERFLAGS -DVKI" -fi - -if test "$CASISOLVER" = CASI -then - SOLVERFLAGS="$SOLVERFLAGS -DCASI" -fi - -if test "$MF2SOLVER" = MF2PARALLEL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL" -fi -if test "$MF2SOLVER" = MF2SERIAL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL" -fi - -if test "$INTELSOLVER" = PARDISO -then - SOLVERFLAGS="$SOLVERFLAGS -DPARDISO" -fi - -if test "$MUMPSSOLVER" = MUMPS -then - SOLVERFLAGS="$SOLVERFLAGS -DMUMPS" -fi - - -if test "$MARC_DLL" = MARC_DLL -then - SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL" -fi - -LINK_OPT= -DEBUG_OPT= -C_DEBUG_OPT= - -#Uncomment following line to build Marc in debuggable mode -MARCDEBUG= -#MARCDEBUG="ON" - -if test "$MARCDEBUG" = "ON" -then - LINK_OPT="-debug -traceback" - DEBUG_OPT="-debug -traceback" - C_DEBUG_OPT="-debug -traceback" -fi - - -MARCCHECK= -#MARCCHECK="ON" -if test "$MARCCHECK" = "ON" -then - DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv " - C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv " -fi - -MARCCODECOV= -#MARCCODECOV="ON" - -MARCCODEPROF= -#MARCCODEPROF="ON" - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - I8FFLAGS= - I8DEFINES= - I8CDEFINES= - I8CASIDEFS= -else - I8FFLAGS="-i8" - I8DEFINES="-DI64" - I8CDEFINES="-U_DOUBLE -D_SINGLE" - I8CASIDEFS="-DCASI_64BIT_INT=1" -fi - -MTHREAD=OPENMP -if test "$MARC_OPENMP" = "NONE" ; then - MTHREAD=NONE -fi -#MTHREAD=NONE -if test "$_OEM_NASTRAN" -ne 0 -then -MTHREAD=NONE -fi - -OMP_COMPAT=NO -OMP_COMPAT=YES -if test "$MTHREAD" = "NONE" -then -OMP_COMPAT=NO -fi - -CDEFINES= -FDEFINES= - -if test "$_OEM_NASTRAN" -ne 0 -then - CDEFINES="$CDEFINES -D_OEM_NASTRAN" - FDEFINES="$FDEFINES -D_OEM_NASTRAN" -fi - -FDEFINES="$FDEFINES -D_IMPLICITNONE" - -if test "$_OEM_NASTRAN" -eq 0 -then - FDEFINES="$FDEFINES -DMKL -DOPENMP" -fi - -if test "$OMP_COMPAT" = "YES" -then - FDEFINES="$FDEFINES -DOMP_COMPAT" -fi - -# -D_MSCMARC -FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT" -CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES" - -CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS" -if test "$_OEM_NASTRAN" -ne 0 -then - CINCL="$CINCL -I../../include" -fi - -CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - -if test "$MARCDEBUG" = "ON" -then - CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -fi - -LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel" -CCT="$CC" -CCTLOW="$CCLOW" -CCTHIGH="$CCHIGH" - -CC_CASI="$CC -std=c99 $I8CASIDEFS" -CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -CCT_CASI="$CCT -std=c99 $I8CASIDEFS" -CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -#PROFILE="-Mprof=func" -#PROFILE="-Mprof=lines" -#PROFILE="-Mprof=func,mpi" -PROFILE= -if test "$MARCCODECOV" = "ON" -then -PROFILE="-prof-gen=srcpos" -fi -if test "$MARCCODEPROF" = "ON" -then -PROFILE=" $PROFILE -pg" -fi - -FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB" -if test "$MTHREAD" = "OPENMP" -then - FORT_OPT=" $FORT_OPT -openmp" - if test "$OMP_COMPAT" = "YES" - then - FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat" - fi -else -# FORT_OPT=" $FORT_OPT -auto " - FORT_OPT=" $FORT_OPT -save -zero" -fi - -FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -if test "$MARCDEBUG" = "ON" -then - FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" -fi - -FORTLOWT="$FORTLOW" -FORTRANT="$FORTRAN" -FORTHIGHT="$FORTHIGH" - -FORTRANMNF="$FCOMP -c $FDEFINES " -CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE" - -FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main" -CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include" - - -BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL" -NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES " -NVCCLIB="ar rvl" -NVCCLD=icc -BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORT90HIGH="$BCSFORTHIGH" -if test "$MARCDEBUG" = "ON" -then - BCSFORTRAN=$BCSFORTLOW - BCSFORTHIGH=$BCSFORTLOW - BCSFORT90HIGH=$BCSFORTLOW -fi - -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - fi -# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines -# if test $MPITYPE = intelmpi -# then -# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include" -# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# fi - if test $MPITYPE = intelmpi - then - LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - fi -else - LOAD="$FCOMP $LINK_OPT -o " - LOADT="$FCOMP $LINK_OPT -o " -fi - -if test "$MARC_DLL" = MARC_DLL -then - FORTLOW="$FORTLOW -fpp -fPIC" - FORTRAN="$FORTRAN -fpp -fPIC" - FORTHIGH="$FORTHIGH -fpp -fPIC" - FORTRANMNF="$FORTRANMNF -fpp -fPIC" - CC="$CC -fPIC" - CCMNF="$CCMNF -fPIC" - CC_CASI="$CC_CASI -fPIC" - CCLOW_CASI="$CCLOW_CASI -fPIC" - CCHIGH_CASI="$CCHIGH_CASI -fPIC" - LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread" - LINK_MARC_DLL="-shared -fPIC" - LOAD_DLL=$LOAD - LOADT_DLL=$LOADT - EXT_DLL="so" -fi - - -XLIBS="-L/usr/X11/lib -lX11 " - -# -# define archive and ranlib syntax -# - -ARC="ar rvl" -ARD="ar dvl" -ARX="ar xl" -RAN="" - -# -# choose which libraries you want to use ( e.g. blas ) -# - -if test "$VKISOLVER" = VKI -then - VKISOLVERLIBS="$MARC_LIB/vkisolver.a" -else - VKISOLVERLIBS= -fi - -if test "$CASISOLVER" = CASI -then - CASISOLVERLIBS="$MARC_CASI/casilib.a" -else - CASISOLVERLIBS= -fi - -MF2SOLVERLIBS= -if test "$MF2SOLVER" = MF2PARALLEL -then - MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \ - $MARC_LIB/mf2parallel/libsym.a \ - $MARC_LIB/mf2parallel/libmet.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libnum.a \ - $MARC_LIB/mf2parallel/libutl.a \ - $MARC_LIB/mf2parallel/libr8.a \ - $MARC_LIB/mf2parallel/libz.a " -fi - -if test "$INTELSOLVER" = PARDISO -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a" - else - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a" - fi -else - INTELSOLVERLIBS= -fi - -if test "$MUMPSSOLVER" = MUMPS -then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - if test $MPITYPE = none - then - MUMPSSOLVERLIBS2= - echo hello > /dev/null - fi - if test $MPITYPE = intelmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a " - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a " - fi - fi - if test $MPITYPE = hpmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a" - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a" - fi - fi -else - MUMPSSOLVERLIBS= - MUMPSSOLVERLIBS2= -fi - -if test "$BCSGPUSOLVER" = BCSGPU -then - BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a " - MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda " - MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda " - MARCCUDALIBS=$MARCCUDALIBS1 - CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda " -else - BCSSOLVERLIBS="${MARC_LIB}/bcslib.a " -fi - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group" -else - MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_blacs_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group" -fi - -SECLIBS="-L$MARC_LIB -llapi" - -SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${INTELSOLVERLIBS} ${MF2SOLVERLIBS} ${MUMPSSOLVERLIBS2} \ - $MKLLIB -L$MARC_MKL -liomp5 \ - $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a " - -SOLVERLIBS_DLL=${SOLVERLIBS} - -MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}" -MRCLIBSPAR="$MARC_LIB/clib.a" -STUBS="$MARC_LIB/stubs.a " -MNFLIBS="$MARC_LIB/libmnf.a" -MDUSER="$MARC_LIB/md_user.a" - -OPENMP="-openmp" - -SYSLIBS=" $OPENMP -lpthread " - -# Uncomment the following lines to turn on the trace and comment out the next 4 lines -# if test $MPITYPE = intelmpi -# then -# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \ -# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt" -# fi -if test $MPITYPE = intelmpi -then - SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt $OPENMP -threads -lpthread" -fi - -SYSLIBSPAR=" " - -MARC_DLL_CODES="runmarc.f" - - -BLAS_SRC="dzero.f icopy.f izero.f" -if test "$_OEM_NASTRAN" -ne 0 -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f" - else - BLAS_SRC="ALL" - fi -fi - -LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \ - omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \ - elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \ - cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \ - inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f" -if test "$MARC_INTEGER_SIZE" = "i8" ; then - LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f" -fi -LOW_OPT_CODES_CASI="" - -HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \ - dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \ - dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f " - - -HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c" - -MAXNUM=1000000 diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask b/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask deleted file mode 100644 index 2c9d55164..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask +++ /dev/null @@ -1,4087 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_h b/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_h deleted file mode 100644 index c91496a38..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_h +++ /dev/null @@ -1,4087 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_h $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_h $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_hmp b/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_hmp deleted file mode 100644 index 4c58e8a12..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_hmp +++ /dev/null @@ -1,4087 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_l b/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_l deleted file mode 100644 index 2093d52b4..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_l +++ /dev/null @@ -1,4087 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_l $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_l $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_lmp b/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_lmp deleted file mode 100644 index 827190af4..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_lmp +++ /dev/null @@ -1,4087 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_mp b/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_mp deleted file mode 100644 index 5e2f49e8e..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_damask_mp +++ /dev/null @@ -1,4087 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Marc_tools/run_marc.original b/installation/mods_MarcMentat/2014.2/Marc_tools/run_marc.original deleted file mode 100644 index ad2de25d4..000000000 --- a/installation/mods_MarcMentat/2014.2/Marc_tools/run_marc.original +++ /dev/null @@ -1,4184 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usersubname= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user - basefile=`$BASENAME $value` - if test ${basefile##*.} = f - then - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user.f - elif test ${basefile##*.} = F - then - user=`dirname $value`/`$BASENAME $value .F` - usersubname=$user.F - elif test ${basefile##*.} = f90 - then - user=`dirname $value`/`$BASENAME $value .f90` - usersubname=$user.f90 - elif test ${basefile##*.} = F90 - then - user=`dirname $value`/`$BASENAME $value .F90` - usersubname=$user.F90 - fi - case $user in - \/*) - ;; - *) - user=`pwd`/$user - usersubname=`pwd`/$usersubname - ;; - esac - if test ! -f $usersubname - then - if test -f $usersubname.f - then - usersubname=$usersubname.f - elif test -f $usersubname.F - then - usersubname=$usersubname.F - elif test -f $usersubname.f90 - then - usersubname=$usersubname.f90 - elif test -f $usersubname.F90 - then - usersubname=$usersubname.F90 - fi - fi - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$usersubname" - then - if test ! -f $usersubname - then - error="$error -user subroutine file $usersubname not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" - fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $usersubname -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $usersubname -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($usersubname)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user - basefile=`$BASENAME $value` - if test ${basefile##*.} = f - then - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user.f - elif test ${basefile##*.} = F - then - user=`dirname $value`/`$BASENAME $value .F` - usersubname=$user.F - elif test ${basefile##*.} = f90 - then - user=`dirname $value`/`$BASENAME $value .f90` - usersubname=$user.f90 - elif test ${basefile##*.} = F90 - then - user=`dirname $value`/`$BASENAME $value .F90` - usersubname=$user.F90 - fi - case $user in - \/*) - ;; - *) - user=`pwd`/$user - usersubname=`pwd`/$usersubname - ;; - esac - if test ! -f $usersubname - then - if test -f $usersubname.f - then - usersubname=$usersubname.f - elif test -f $usersubname.F - then - usersubname=$usersubname.F - elif test -f $usersubname.f90 - then - usersubname=$usersubname.f90 - elif test -f $usersubname.F90 - then - usersubname=$usersubname.F90 - fi - fi - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# - - if test "$user" - then -# program=$user.marc - program=$DIRJOB/`$BASENAME $user .f`.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$DIRJOB/`$BASENAME $user .f`.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test ${basefile##*.} = f - then - ln -sf "$user.f" "$usersub" - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user.f $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user.f on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser.f 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user.f on host `hostname`" - fi - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi - fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user.f $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user.f on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser.f 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user.f on host `hostname`" - fi - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null - -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi - fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window b/installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window deleted file mode 100644 index b732a7694..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# This script opens a window running an editor. -# The command to invoke the editor is specified during DAMASK installation - -%EDITOR% $* \ No newline at end of file diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window.original b/installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window.original deleted file mode 100644 index 64c0a68d0..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/edit_window.original +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# This script opens a window running an editor. The default window is an -# xterm, and the default editor is vi. These may be customized. - -dir= -for d in /usr/bin /usr/bin/X11; do - if test -x "$d/xterm"; then - dir="$d" - break - fi -done - -if test -z "$dir"; then - echo "$0: Could not find xterm" - exit 1 -fi - -"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $* diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill1.original b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill1.original deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill1.original +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill4 b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill4 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill4 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill5 b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill5 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill5 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill6 b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill6 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill6 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill7 b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill7 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill7 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill8 b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill8 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill8 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill9 b/installation/mods_MarcMentat/2014.2/Mentat_bin/kill9 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/kill9 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit1.original b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit1.original deleted file mode 100644 index cd0a2fde7..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit1.original +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=/msc/marc2014.2 -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit4 b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit4 deleted file mode 100644 index f25a2004e..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit4 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit5 b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit5 deleted file mode 100644 index 786f6efc5..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit5 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit6 b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit6 deleted file mode 100644 index 6a5d9d79f..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit6 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit7 b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit7 deleted file mode 100644 index d0e3be475..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit7 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit8 b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit8 deleted file mode 100644 index d466fc6ab..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit8 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit9 b/installation/mods_MarcMentat/2014.2/Mentat_bin/submit9 deleted file mode 100644 index 207a61803..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_bin/submit9 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms b/installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms deleted file mode 100644 index 598aeab63..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms +++ /dev/null @@ -1,3396 +0,0 @@ -#ifndef AUTOFORGE -popmenu job_title_pm file jobs.ms -popdown job_title_ok file jobs.ms -#ifndef QT_MENTAT -popmenu marc_input_style_pm file job_common.ms -popmenu marc_input_style_run_adv_pm file job_common.ms -popmenu marc_version_run_pm file job_common.ms -#endif - -group job_solver_gr file job_common.ms -group user_domains_gr file domain_decomposition.ms -group user_domains_generate_gr file domain_decomposition.ms -group user_domains_tail_gr file domain_decomposition.ms -group job_solver_opts_gr file job_common.ms -popmenu ddm_options file job_common.ms - -#ifdef QT_MENTAT -browser edit_browser file file.ms -browser directory_browser file file.ms -screen domains file domain_decomposition.ms -#else -popmenu edit_browser_popmenu file file.ms -popmenu directory_browser_popmenu file file.ms -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu usersub_file_browser_pm { - - group { -#endif - - browser usersub_file_browser { - position 0 0 - size 82 72 - text "$usersub_file_browser_label" ($usersub_file_browser_label) - filter "*.f *.F *.f90 *.F90" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$usersub_file_browser_command" ($usersub_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC User Subroutine File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu host_file_browser_pm { - - group { -#endif - - browser host_file_browser { - position 0 0 - size 82 72 - text "$host_file_browser_label" ($host_file_browser_label) - filter "*" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$host_file_browser_command" ($host_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC Host File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_popmenu { - -#ifdef QT_MENTAT - text "RUN JOB" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 52 4 - text "RUN JOB" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - button { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 24 4 - text "USER SUBROUTINE FILE" -#ifdef QT_MENTAT - browser usersub_file_browser -#else - popmenu usersub_file_browser_pm -#endif - settext $usersub_file_browser_label "SELECT USER SUBROUTINE FILE" - set $usersub_file_browser_command "*job_usersub_file" - help job_usersub_file - } - - toggle { - position +26 = - size 22 4 - text "SELECTED USER SUBS" - toggle job_usersubs - help job_run_seluser - visible job_usersubs - popmenu job_usersub_pm - } - - display { - position 1 +4 - size 50 4 - display job_usersub_file - } - - button { - position 1 +4 - size 12 4 - text "EDIT" - command "*job_edit_usersub_file" - visible job_usersub_file - } - - button { - position +12 = - size 12 4 - text "CLEAR" - command "*job_clear_usersub_file" - visible job_usersub_file - } - - roller { - position +12 = - size 26 4 - nvalues 3 - texts "COMPILE / NO SAVE" - "COMPILE AND SAVE" - "RUN SAVED EXECUTABLE" - help job_run_compile - roller "job_option user_source" - visible job_usersub_file -#ifdef QT_MENTAT - commands "*job_option user_source:compile_nosave" - "*job_option user_source:compile_save" - "*job_option user_source:run_saved" -#else - popmenu job_user_source_pm -#endif - } - - toggle { - position 1 +6 - size 22 4 - text "PARALLELIZATION/\{GPU}" - help job_run_parallel - toggle "or(*job_option parallel:on, \ - *job_option assem_recov_multi_threading:on, \ - solver_multi_procs, \ - solver_multi_threads, \ - and(job_solver_mfront_sparse,\ - job_nonsym_off,\ - *job_option solver_use_gpu:on))" - popmenu job_run_parallelization_pm - set $popname2 "job_run_parallelization_pm" - } - - frame { - position +22 = - size 28 16 - border_width 1 - border_color black - - group { - - display { - position 0 0 - size 28 4 - display job_ddm_domains - } - - display { - position = +4 - size 28 4 - display job_assem_recov_nthreads - } - - display { - position = +4 - size 28 4 - display job_solver_procs - visible solver_allows_multi_procs - } - - display { - position = = - size 28 4 - display job_solver_threads - visible "and(solver_allows_multi_threads,\ - not(and(job_solver_mfront_sparse,\ - *job_option parallel:on)))" - } - - display { - position = +4 - size 28 4 - display job_solver_gpu - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } - } - } - - button { - position 1 +18 - size 8 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - -# see also job_common.ms -# see also the ADVANCED JOB SUBMISSION popmenu in this file - - label { - position +10 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_pm -#endif - help job_option_input_style - } - - button { - position +20 = - size 13 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position 1 +6 - size 16 6 - text "SUBMIT (1)" - command "*submit_job 1 *monitor_job" - } - - button { - position +16 = - size 16 6 - text "ADV. JOB SUBM." - popmenu job_submit_adv_pm - } - - button { - position +16 = - size 18 6 - text "DAMASK" - popmenu damask - } - - button { - position 1 +6 - size 16 6 - text "UPDATE" - command "*update_job" - } - - button { - position +16 = - size 16 6 - text "MONITOR" - command "*monitor_job" - } - - button { - position +16 = - size 18 6 - text "KILL" - command "*kill_job *monitor_job" - } - - label { - position 1 +7 - size 32 4 - text "STATUS" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_status" - } - - label { - position -32 +4 - size 32 4 - text "CURRENT INCREMENT (CYCLE)" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_increment" - } - - label { - position -32 +4 - size 32 4 - text "SINGULARITY RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_singularity_ratio" - } - - label { - position -32 +4 - size 32 4 - text "CONVERGENCE RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_convergence_ratio" - } - - label { - position 1 +4 - size 32 4 - text "ANALYSIS TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_analysis_time" - } - - label { - position -32 +4 - size 32 4 - text "WALL TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_time" - } - - frame { - position 1 +4 - size 50 8 - - group { - - frame { - position 0 0 - size 50 8 - text "TOTAL" - border_width 1 - border_color black - group { - - label { - position +6 = - size 13 4 - text "CYCLES" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_cycles" - border_width 1 - border_color black - } - - label { - position -13 +4 - size 13 4 - text "SEPARATIONS" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_separations" - border_width 1 - border_color black - } - - label { - position +10 -4 - size 11 4 - text "CUT BACKS" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_cut_backs" - border_width 1 - border_color black - } - - label { - position -11 +4 - size 11 4 - text "REMESHES" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_remeshes" - border_width 1 - border_color black - } - } - } - } - } - - label { - position 1 +8 - size 19 4 - text "EXIT NUMBER" - border_width 1 - border_color black - } - - integer { - position +19 = - size 10 4 - display "job_exit" - } - - button { - position +10 = - size 21 4 - text "EXIT MESSAGE" - popmenu job_exit_msg_pm - help exit_message - } - - label { - position 1 +6 - size 7 4 - text "EDIT" - border_width 1 - border_color black - } - - button { - position +7 = - size 12 4 - text "OUTPUT FILE" - command "*job_edit_output" - } - - button { - position +12 = - size 9 4 - text "LOG FILE" - command "*job_edit_log_file" - } - - button { - position +9 = - size 12 4 - text "STATUS FILE" - command "*job_edit_status_file" - } - - button { - position +12 = - size 10 4 - text "ANY FILE" - settext $edit_browser_label "EDIT FILE" - set $edit_browser_command "*edit_file" -#ifdef QT_MENTAT - browser edit_browser -#else - popmenu edit_browser_popmenu -#endif - help edit_file - } - - popdown { - position 1 +6 - size 32 4 -#ifdef QT_MENTAT - text "OPEN POST FILE (MODEL PLOT RESULTS MENU)" - command "@popdown(job_properties_pm) @main(results) @popup(modelplot_pm) *post_open_default" -#else - text "OPEN POST FILE (RESULTS MENU)" - screen results - command "*post_open_default" -#endif - } - - button { - position 1 +6 - size 12 8 - text "RESET" - command "*job_submit_reset" - } - - popdown { - position +38 = - size 12 8 - text "OK" - } - } - - window job_run_wi { - parent mentat - origin 35 1 - size 52 115 - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_usersub_pm { - -#ifdef QT_MENTAT - text "CURRENTLY SELECTED USER SUBROUTINES" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 66 4 - text "CURRENTLY SELECTED USER SUBROUTINES" - } -#endif - - display { - position 1 +5 - size 64 86 - display "job_usersubs" - } - - popdown { - position 27 +88 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 66 102 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_submit_adv_pm { - -#ifdef QT_MENTAT - text "ADVANCED JOB SUBMISSION" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "ADVANCED JOB SUBMISSION" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - label { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 19 4 - text "INITIAL ALLOCATION" - border_width 1 - border_color black - } -#ifdef QT_MENTAT - label { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - } -#else - button { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - command "*job_param general_init_allocation" - } -#endif - text { - position +15 = - size 10 4 - display "job_param_value_general_init_allocation" - command "*job_param general_init_allocation" - help job_param_general_init_allocation - } - - label { - position +10 = - size 4 4 - text "MB" - border_width 1 - border_color black - } - - toggle { - position 1 +5 - size 32 4 - text "OUT-OF-CORE ELEMENT STORAGE" - help job_param_elsto - toggle "*job_option elsto:on" - true_command "*job_option elsto:on" - false_command "*job_option elsto:off" - } - - toggle { - position 1 +4 - size 32 4 - text "OUT-OF-CORE INCREMENTAL BACKUP" - help job_param_inc_backup_storage - toggle "*job_option inc_backup_storage:out_of_core" - true_command "*job_option inc_backup_storage:out_of_core" - false_command "*job_option inc_backup_storage:in_core" - } - - toggle { - position +34 = - size 14 4 - text "CHECK SIZES" - help job_run_check - toggle "*job_option check:on" - true_command "*job_option check:on" - false_command "*job_option check:off" - } - - label { - position 1 +6 - size 16 4 - text "INTEGER SIZE" - border_width 1 - border_color black - } - - roller { - position +16 = - size 32 4 - nvalues 3 - texts "DEFAULT" - "4-BYTE INTEGERS" - "8-BYTE INTEGERS" -#ifdef QT_MENTAT - commands "*job_option marc_integer_size:default" - "*job_option marc_integer_size:i4" - "*job_option marc_integer_size:i8" -#else - popmenu marc_integer_size_pm -#endif - help job_run_intsize - roller "job_option marc_integer_size" - } - - frame { - position 1 +6 - size 48 12 - text "MARC INPUT FILE" - border_width 1 - border_color black - - group { - - label { - position 0 4 - size 9 4 - text "VERSION" - border_width 1 - border_color black - } - - roller { - position +9 = - size 14 4 - nvalues 20 - nvisible 20 - texts "DEFAULT" -#if 0 - "2014.2" -#endif - "2014.1" - "2014" - "2013.1" - "2013" - "2012" - "2011" - "2010.2" - "2010" - "2008" - "2007" - "2005R3" - "2005" - "2003" - "2001" - "2000" -#if 0 - "8" -#endif - "K7" - "K6.2" - "K5" - "K4" - help job_param_version - rollers "job_input_version_default" -#if 0 - "job_input_version_2014.2" -#endif - "job_input_version_2014.1" - "job_input_version_2014" - "job_input_version_2013.1" - "job_input_version_2013" - "job_input_version_2012" - "job_input_version_2011" - "job_input_version_2010.2" - "job_input_version_2010" - "job_input_version_2008" - "job_input_version_2007" - "job_input_version_2005r3" - "job_input_version_2005" - "job_input_version_2003" - "job_input_version_2001" - "job_input_version_2000" -#if 0 - "job_input_version_8" -#endif - "job_input_version_k7" - "job_input_version_k6" - "job_input_version_k5" - "job_input_version_k4" -#ifdef QT_MENTAT - commands "*job_option version:default" -#if 0 - "*job_option version:2014.2" -#endif - "*job_option version:2014.1" - "*job_option version:2014" - "*job_option version:2013.1" - "*job_option version:2013" - "*job_option version:2012" - "*job_option version:2011" - "*job_option version:2010.2" - "*job_option version:2010" - "*job_option version:2008" - "*job_option version:2007" - "*job_option version:2005r3" - "*job_option version:2005" - "*job_option version:2003" - "*job_option version:2001" - "*job_option version:2000" -#if 0 - "*job_option version:8" -#endif - "*job_option version:k7" - "*job_option version:k6" - "*job_option version:k5" - "*job_option version:k4" - visibles "job_allows_input_version_default" -#if 0 - "job_allows_input_version_2014.2" -#endif - "job_allows_input_version_2014.1" - "job_allows_input_version_2014" - "job_allows_input_version_2013.1" - "job_allows_input_version_2013" - "job_allows_input_version_2012" - "job_allows_input_version_2011" - "job_allows_input_version_2010.2" - "job_allows_input_version_2010" - "job_allows_input_version_2008" - "job_allows_input_version_2007" - "job_allows_input_version_2005r3" - "job_allows_input_version_2005" - "job_allows_input_version_2003" - "job_allows_input_version_2001" - "job_allows_input_version_2000" -#if 0 - "job_allows_input_version_8" -#endif - "job_allows_input_version_k7" - "job_allows_input_version_k6" - "job_allows_input_version_k5" - "job_allows_input_version_k4" -#else - popmenu marc_version_run_pm -#endif - } - -# see also job_common.ms -# see also the RUN JOB popmenu in this file - - label { - position +14 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_run_adv_pm -#endif - help job_option_input_style - } - - toggle { - position 0 +4 - size 48 4 - text "EXTENDED PRECISION" - help job_run_precision - toggle "*job_option inp_file_prec:extended" - true_command "*job_option inp_file_prec:extended" - false_command "*job_option inp_file_prec:normal" - } - } - } - - button { - position 1 +14 - size 24 4 - text "SCRATCH DIRECTORY" - settext $directory_browser_label "JOB SCRATCH DIRECTORY" - set $directory_browser_command "*job_scratch_directory" -#ifdef QT_MENTAT - browser directory_browser -#else - popmenu directory_browser_popmenu -#endif - help job_scratch_directory - } - - button { - position +24 = - size 24 4 - text "CLEAR" - command "*job_clear_scratch_directory" - visible job_scratch_directory - } - - text { - position 1 +4 - size 48 4 - display job_scratch_dir - command "*job_scratch_directory" - } - -#ifdef DCOM - toggle { - position 1 +6 - size 8 4 - text "\{DCOM}" - toggle "*job_option dcom:on" - help job_run_dcom - true_command "*job_option dcom:on" - false_command "*job_option dcom:off" - visible win32_available - } - - button { - position +8 = - size 12 4 - text "HOSTNAME" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } - - text job_dcom_hostname { - position +12 = - size 28 4 - display "job_dcom_hostname" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } -#endif - - button { - position 1 +6 - size 24 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - - button { - position +24 = - size 24 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position +4 +6 - size 20 4 - text "WRITE INPUT FILE" - command "*job_write_input" - } - - button { - position = +4 - size 20 4 - text "EDIT INPUT FILE" - command "*job_edit_input" - } - - popdown { - position 1 +5 - size 20 6 - text "SUBMIT 1" - command "*submit_job 1 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 1" - command "*execute_job 1 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 2" - command "*submit_job 2 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 2" - command "*execute_job 2 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 3" - command "*submit_job 3 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 3" - command "*execute_job 3 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - -#-------------------------------------------------------------------------------------------------- -popmenu damask { - -#ifdef QT_MENTAT - text "DAMASK.MPIE.DE" -#endif - - group { -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "DAMASK.MPIE.DE" - } -#endif - - label { - position 1 6 - size 13 6 - text "Optimzation" - border_width 1 - border_color black - } - - label { - position +13 = - size 20 6 - text "write Input" - border_width 1 - border_color black - } - - label { - position +18 = - size 30 6 - text "do not write Inp." - border_width 1 - border_color black - } - - label { - position -32 +6 - size 12 6 - text "O2 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 4 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 4 *monitor_job" - } - - label { - position -32 +6 - size 12 6 - text "O1 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 5 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 5 *monitor_job" - } - - label { - position -32 +6 - size 12 6 - text "O0 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 6 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 6 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "CANCEL" - } -} - - - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - -#-------------------------------------------------------------------------------------------------- -popmenu job_exit_msg_pm { - -#ifdef QT_MENTAT - text "EXIT MESSAGE" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 86 4 - text "EXIT MESSAGE" - } - - display { - position 1 5 - size 84 74 - display "job_exit_msg" - } -#endif - -#ifdef QT_MENTAT - - text { - position 1 5 - size 84 74 - multiline - readonly - display "job_exit_msg" - } - -#endif - popdown { - position 37 +76 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 86 90 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_user_source_pm { - - window { - parent job_run_wi - origin 25 17 - size 26 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_user_source_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_user_source_gr { - popdown { - position 0 0 - size 26 4 - text "COMPILE / NO SAVE" - command "*job_option user_source:compile_nosave" - } - - popdown { - position = +4 - size 26 4 - text "COMPILE AND SAVE" - command "*job_option user_source:compile_save" - } - - popdown { - position = +4 - size 26 4 - text "RUN SAVED EXECUTABLE" - command "*job_option user_source:run_saved" - } - - popdown { - position = +5 - size 26 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_parallelization_pm { - -#ifdef QT_MENTAT - text "PARALLELIZATION/\{GPU}" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 60 4 - text "PARALLELIZATION/GPU" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 48 28 - group job_ddm_gr - text "DOMAIN DECOMPOSITION" - border_width 1 - border_color black - } - - frame { - position 1 +29 - size 36 13 - group job_assem_recov_gr - text "ASSEMBLY AND RECOVERY" - border_width 1 - border_color black - } - - frame { - position 1 +14 - size 58 31 - group job_parallel_matrix_solver_gr - text "MATRIX SOLVER" - border_width 1 - border_color black - } - - frame { - position 1 +32 - size 48 28 - group job_parallel_env_gr - text "PARALLELIZATION ENVIRONMENT" - border_width 1 - border_color black - visible "or(*job_option parallel:on, \ - solver_multi_procs)" - } - - popdown { - position 24 +30 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 1 - size 60 119 - background_color body - border_width 1 - border_color border - buffering single - } -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_gr { - - toggle { - position 1 4 - size 30 4 - text "USE \{DDM}" - toggle "*job_option parallel:on" - help job_run_ddm_use - true_command "*job_option parallel:on" - false_command "*job_option parallel:off" - active "not(job_solver_it_ext)" - } - - frame { - position +2 +5 - size 44 18 - group job_ddm_use_gr - visible "*job_option parallel:on" - } -} - -group job_ddm_use_gr { - roller { - position 0 0 - size 30 4 - nvalues 2 - texts "DECOMPOSITION IN MARC" - "DECOMPOSITION IN MENTAT" - roller "job_option ddm_generator" -#ifdef QT_MENTAT - commands "*job_option ddm_generator:fea_solver" - "*job_option ddm_generator:preprocessor" -#else - popmenu job_ddm_generator_pm -#endif - help job_run_ddm_generator - } - - frame { - position 0 +5 - size 44 8 - group job_ddm_fea_solver_gr - visible "*job_option ddm_generator:fea_solver" - } - - frame { - position = = - size 44 8 - group job_ddm_preprocessor_gr - visible "*job_option ddm_generator:preprocessor" - } - - text { - position 0 +9 - size 22 4 -#ifdef QT_MENTAT - text "Single Input File" -#else - text "SINGLE INPUT FILE" -#endif - readonly - visible "*job_option ddm_generator:fea_solver" - } - - roller { - position = = - size 22 4 - nvalues 2 - texts "MULTIPLE INPUT FILES" - "SINGLE INPUT FILE" - roller "job_option ddm_single_input" - commands "*job_option ddm_single_input:off" - "*job_option ddm_single_input:on" - visible "*job_option ddm_generator:preprocessor" - help job_run_ddm_single_input - } - - roller { - position +23 = - size 21 4 - nvalues 2 - texts "MULTIPLE POST FILES" - "SINGLE POST FILE" - roller "job_option ddm_single_post" - commands "*job_option ddm_single_post:off" - "*job_option ddm_single_post:on" - help job_run_ddm_single_post - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_generator_pm { - - window { - parent mentat - origin 42 19 - size 30 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_generator_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_generator_gr { - - popdown { - position 0 0 - size 30 4 - text "DECOMPOSITION IN MARC" - command "*job_option ddm_generator:fea_solver" - help job_run_ddm_generator - } - - popdown { - position = +4 - size 30 4 - text "DECOMPOSITION IN MENTAT" - command "*job_option ddm_generator:preprocessor" - help job_run_ddm_generator - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - help job_run_ddm_generator - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_fea_solver_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 10 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 0 0 - size 10 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +10 = - size 4 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position +4 = - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method_pm -#endif - } - - button { - position +4 +4 - size 19 4 - text "ADVANCED SETTINGS" -#ifdef QT_MENTAT - popmenu job_ddm_fea_solver_pm -#else - screen job_ddm_fea_solver_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method_pm { - - window { - parent mentat - origin 56 24 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_method_gr { - - popdown { - position 0 0 - size 30 4 - text "METIS BEST" - command "*job_option ddm_method:metis_best" - } - - popdown { - position = +4 - size 30 4 - text "METIS ELEMENT BASED" - command "*job_option ddm_method:metis_element_based" - } - - popdown { - position = +4 - size 30 4 - text "METIS NODE BASED" - command "*job_option ddm_method:metis_node_based" - } - - popdown { - position = +4 - size 30 4 - text "RECURSIVE COORDINATE BISECTION" - command "*job_option ddm_method:recur_coord_bisect" - } - - popdown { - position = +4 - size 30 4 - text "VECTOR" - command "*job_option ddm_method:vector" - } - - popdown { - position = +4 - size 30 4 - text "RADIAL" - command "*job_option ddm_method:radial" - } - - popdown { - position = +4 - size 30 4 - text "ANGULAR" - command "*job_option ddm_method:angular" - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - } -} -#endif - - -#ifdef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_fea_solver_pm { - - text "JOB PARALLELIZATION" -#else -screen job_ddm_fea_solver_sc { - - menu { -#endif - - group { - units 32 120 - -#ifndef QT_MENTAT - label { - position 0 0 - size 32 4 - text "JOB PARALLELIZATION" - } -#endif - - label { - position 0 5 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - -#ifdef QT_MENTAT - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { - -#ifdef QT_MENTAT - position 0 +9 -#else - position 0 +5 -#endif - size 32 76 - text "ADVANCED DECOMPOSITION IN MARC" - border_width 1 - border_color black - - group { - -#ifdef QT_MENTAT - label { - position 1 4 - size 16 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 1 4 - size 16 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +16 = - size 14 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position 1 +4 - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method2_pm -#endif - } - - frame { - position 1 +5 - size 30 20 - group job_ddm_direction_gr - visible "or(*job_option ddm_method:vector, \ - *job_option ddm_method:radial, \ - *job_option ddm_method:angular)" - } - - toggle { - position 1 +21 - size 30 4 - text "DOMAIN ISLAND REMOVAL" - toggle "*job_option ddm_island_removal:on" - true_command "*job_option ddm_island_removal:on" - false_command "*job_option ddm_island_removal:off" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "GRAPH" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "COARSE" - "FINE" - help ddm_decomp_coarse_graph - rollers "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - commands "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "QUADRATIC ELEMENTS" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "GENUINE" - "LINEARIZED" - help job_run_ddm_decomp_linearized - rollers "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - commands "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - } - -#ifdef QT_MENTAT - label { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - help job_param - } -#else - button { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_elem_weight_factor" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } - - toggle { - position 1 +5 - size 30 4 - text "DETECT CONTACT" - toggle "*job_option ddm_detect_contact:on" - true_command "*job_option ddm_detect_contact:on" - false_command "*job_option ddm_detect_contact:off" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - help job_run_ddm_decomp_detect_contact - } - -#ifdef QT_MENTAT - label { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } -#endif - - text { - position +15 = - size 15 4 - command "*set_ddm_contact_tolerance" - display "job_param_value_ddm_contact_tolerance" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } - -#ifdef QT_MENTAT - label { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_contact_constr_factor" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } - } - } - -#ifdef QT_MENTAT - popdown { - position 0 +77 - size 32 8 - text "OK" - } -#else - frame { - position 0 +77 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return -#endif - } -#ifndef QT_MENTAT - window main_window - disable_right_mouse_button - } - - menu transform -} # job_ddm_fea_solver_sc -#else - mode permanent -} # job_ddm_fea_solver_pm -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method2_pm { - - window { - parent mentat - origin 1 22 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_direction_gr { - - button { - position 0 0 - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "*job_option ddm_method:vector" - } - - button { - position = = - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "not(*job_option ddm_method:vector)" - } - - button { - position +15 = - size 15 4 - text "FROM / TO" - command "*job_vector_from_to ddm_sort_direction_x" - } - - text { - position -15 +4 - size 10 4 - command "*job_param ddm_sort_direction_x" - display "job_param_value_ddm_sort_direction_x" - help ddm_job_decomp_user_direction_x - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_y" - display "job_param_value_ddm_sort_direction_y" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_z" - display "job_param_value_ddm_sort_direction_z" - } - - frame { - position 0 +4 - size 30 8 - group job_ddm_sort_point_gr - visible "not(*job_option ddm_method:vector)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_gr { - - label { - position 0 0 - size 14 4 - border_width 1 - border_color black - text "POINT ON AXIS" - } - - roller { - position +14 = - size 10 4 - nvalues 2 - texts "DEFAULT" - "USER" - roller "job_option ddm_sort_point" -#ifdef QT_MENTAT - commands "*job_option ddm_sort_point:default" - "*job_option ddm_sort_point:user" -#else - popmenu job_ddm_sort_point_meth_pm -#endif - } - - button { - position +10 = - size 6 4 - text "SET" - command "*job_position ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position 0 +4 - size 10 4 - command "*job_param ddm_sort_point_x" - display "job_param_value_ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_y" - display "job_param_value_ddm_sort_point_y" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_z" - display "job_param_value_ddm_sort_point_z" - visible "*job_option ddm_sort_point:user" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_sort_point_meth_pm { - - window { - parent mentat - origin 15 35 - size 14 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_sort_point_meth_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_meth_gr { - - popdown { - position 0 0 - size 14 4 - text "DEFAULT" - command "*job_option ddm_sort_point:default" - } - - popdown { - position = +4 - size 14 4 - text "USER DEFINED" - command "*job_option ddm_sort_point:user" - } - - popdown { - position = +5 - size 14 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_preprocessor_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - border_width 1 - border_color black - } - - integer { - position +10 = - size 4 4 - display valid_domains - } - - button { - position +4 = - size 30 4 - text "USER DOMAINS" -#ifdef QT_MENTAT - popmenu domains_pm -#else - screen job_ddm_user_domains_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - help job_run_ddm_user_domains - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -screen job_ddm_user_domains_sc { - - menu { - - group { - units 32 120 - - label { - position 0 0 - size 32 4 - text "USER DOMAINS" - } - - frame { - position 0 5 - size 32 28 - group user_domains_gr - } - - frame { - position 0 +29 - size 32 49 - group user_domains_generate_gr - } - - frame { - position 0 +50 - size 32 8 - group user_domains_tail_gr - } - - frame { - position 0 92 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return - } - window main_window - disable_right_mouse_button - - } - - menu transform - -} # job_ddm_user_domains_sc -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_assem_recov_gr { - - toggle { - position 1 +4 - size 30 4 - text "MULTIPLE THREADS" - true_command "*job_option assem_recov_multi_threading:on" - false_command "*job_option assem_recov_multi_threading:off" - toggle "*job_option assem_recov_multi_threading:on" - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 12 4 - text "# THREADS" - visible "*job_option assem_recov_multi_threading:on" - } -#else - button { - position +2 +4 - size 12 4 - text "# THREADS" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } -#endif - - text { - position +12 = - size 4 4 - display "job_param_value_assem_recov_nthreads" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } - - label { - position +4 = - size 12 4 - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 = - size 4 4 - display "job_assem_recov_nthreads_dom" - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_matrix_solver_gr { - - label { - position 3 4 - size 12 4 - text "SOLUTION" - border_width 1 - border_color black - } - - roller { - position +12 = - size 18 4 - nvalues 2 - texts "SYMMETRIC" - "NONSYMMETRIC" - rollers job_nonsym_off - job_nonsym_on - commands "*job_option solver_nonsym:off" - "*job_option solver_nonsym:on" - help job_param_solver_method - } - - label { - position -12 +4 - size 6 4 - text "TYPE" - border_width 1 - border_color black - } - - roller { - position +6 = - size 24 4 - nvalues 9 - help job_param_solver_method - texts "MULTIFRONTAL SPARSE" - "MIXED DIRECT-ITERATIVE" - "CASI ITERATIVE" - "PARDISO DIRECT SPARSE" - "MUMPS PARALLEL DIRECT" - "HARDWARE SPARSE" - "ITERATIVE SPARSE" - "DIRECT PROFILE" - "DIRECT SPARSE" - rollers job_solver_mfront_sparse - job_solver_mixed_direct_iterative - job_solver_it_ext - job_solver_pardiso - job_solver_mumps - job_solver_sparse - job_solver_it_sparse - job_solver_dir_profile - job_solver_dir_sparse -#ifdef QT_MENTAT - commands "*job_option solver:mfront_sparse" - "*job_option solver:mixed_direct_iterative" - "*job_option solver:it_ext" - "*job_option solver:pardiso" - "*job_option solver:mumps" - "*job_option solver:sparse" - "*job_option solver:it_sparse" - "*job_option solver:dir_profile" - "*job_option solver:dir_sparse" - visibles job_allows_solver_mfront_sparse - job_allows_solver_mixed_direct_iterative - job_allows_solver_it_ext - job_allows_solver_pardiso - job_allows_solver_mumps - job_allows_solver_sparse - job_allows_solver_it_sparse - job_allows_solver_dir_profile - job_allows_solver_dir_sparse - help job_param_solver_method -#else - popmenu job_set_parallel_matrix_solver_pm -#endif - } - - button { - position +24 = - size 10 4 - text "OPTIONS" - popmenu job_parallel_matrix_solver_opt_pm - } - - frame { - position +10 = - size 14 4 - group job_run_solver_ddm_opts_gr - visible "*job_option parallel:on" - } - - frame { - position 1 +5 - size 46 8 - group job_solver_multi_procs_gr - visible solver_allows_multi_procs - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_gr - visible solver_allows_multi_threads - } - - frame { - position 1 +9 - size 46 8 - group job_solver_gpu_gr - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_set_parallel_matrix_solver_pm { - window { - parent mentat - origin 48 61 - size 24 42 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_solver_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_parallel_matrix_solver_opt_pm { - -#ifdef QT_MENTAT - text "MATRIX SOLVER OPTIONS" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 38 4 - text "MATRIX SOLVER OPTIONS" - } -#endif - - frame { - position 1 5 - size 36 23 - group job_solver_opts_gr - } - - popdown { - position 13 +25 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 41 12 - size 38 39 - border_width 1 - border_color border - background_color body - } - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -group job_run_solver_ddm_opts_gr { - - button { - position 0 0 - size 14 4 - text "\{DDM} OPTIONS" - popmenu ddm_options -# see also job_common.ms! - visible "not(or(job_solver_it_sparse, \ - job_solver_it_ext, \ - job_solver_mixed_direct_iterative, \ - job_solver_pardiso, \ - job_solver_mumps))" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_procs_parallel_off_gr - visible "*job_option parallel:off" - } - - frame { - position = = - size 46 8 - group job_solver_multi_procs_parallel_on_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - true_command "*job_option nsolver_procs_serial:on" - false_command "*job_option nsolver_procs_serial:off" - toggle "*job_option nsolver_procs_serial:on" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - visible "*job_option nsolver_procs_serial:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# PROCESSES" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - border_width 1 - border_color black - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - help job_run_multithreading - rollers "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_nsolver_procs_ddm_automatic_gr - visible "*job_option nsolver_procs_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_nsolver_procs_ddm_user_gr - visible "*job_option nsolver_procs_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nsolver_procs" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - } -} - -group job_solver_multi_threads_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_off_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_on_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_off_gr - visible "and(job_solver_pardiso,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_on_gr - visible "and(job_solver_pardiso,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_it_ext_off_gr - visible "and(job_solver_it_ext,*job_option parallel:off)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option mfront_sparse_multi_threading:on" - true_command "*job_option mfront_sparse_multi_threading:on" - false_command "*job_option mfront_sparse_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option mfront_sparse_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +30 0 - size 12 4 - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 0 - size 4 4 - display "job_mfront_sparse_nthreads_dom" - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - } - - label { - position 2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_automatic_gr - visible "*job_option mfront_sparse_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_user_gr - visible "*job_option mfront_sparse_multi_threading_ddm:user" - } -} -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nthreads" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - - - -#-------------------------------------------------------------------------------------------------- -group job_solver_gpu_gr { - - toggle { - position 0 0 - size 30 4 - text "USE \{GPU(s)}" - toggle "*job_option solver_use_gpu:on" - true_command "*job_option solver_use_gpu:on" - false_command "*job_option solver_use_gpu:off" - help job_solver_gpu - } - - label { - position +2 +4 - size 16 4 - text "\{GPU} SELECTION" - border_width 1 - border_color black - visible "*job_option solver_use_gpu:on" - } - - roller { - position +16 = - size 12 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - rollers "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - visible "*job_option solver_use_gpu:on" - help job_solver_gpu - } - - text { - position +12 = - size 16 4 - display job_solver_gpus - command "*clear_job_solver_gpus *job_solver_gpus" - visible "and(*job_option solver_use_gpu:on,*job_option solver_gpus:user)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option pardiso_multi_threading:on" - true_command "*job_option pardiso_multi_threading:on" - false_command "*job_option pardiso_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option pardiso_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_pardiso_multi_threads_ddm_automatic_gr - visible "*job_option pardiso_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_pardiso_multi_threads_ddm_user_gr - visible "*job_option pardiso_multi_threading_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nthreads" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_it_ext_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option it_ext_multi_threading:on" - true_command "*job_option it_ext_multi_threading:on" - false_command "*job_option it_ext_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option it_ext_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option it_ext_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_gr { - - roller { - position 1 4 - size 30 4 - nvalues 2 - texts "SINGLE MACHINE" - "NETWORK" - help job_run_ddm_setup - roller "job_option parallel_setup" - commands "*job_option parallel_setup:single" - "*job_option parallel_setup:network" - } - - frame { - position +2 +5 - size 44 18 - group job_parallel_env_network_gr - visible "*job_option parallel_setup:network" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_gr { - - button { - position 0 0 - size 28 4 - text "HOST FILE" -#ifdef QT_MENTAT - browser host_file_browser -#else - popmenu host_file_browser_pm -#endif - settext $host_file_browser_label "SELECT HOST FILE" - set $host_file_browser_command "*job_host_file" - help job_host_file - } - - button { - position +28 = - size 8 4 - text "EDIT" - command "*job_edit_host_file" - help job_edit_host_file - visible job_host_file - } - - button { - position +8 = - size 8 4 - text "CLEAR" - command "*job_clear_host_file" - help job_clear_host_file - visible job_host_file - } - - display { - position 0 +4 - size 44 4 - display job_host_file - } - - frame { - position 0 +5 - size 44 9 - group job_parallel_env_network_ddm_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_ddm_gr { - - toggle { - position 0 0 - size 22 4 - text "COPY INPUT FILE" - toggle "*job_option copy_input_file:on" - true_command "*job_option copy_input_file:on" - false_command "*job_option copy_input_file:off" - help job_host_copy_inputfile - } - - toggle { - position +23 = - size 21 4 - text "COPY POST FILE" - toggle "*job_option copy_post_file:on" - true_command "*job_option copy_post_file:on" - false_command "*job_option copy_post_file:off" - help job_host_copy_inputfile - } - - label { - position 0 +5 - size 10 4 - text "HOSTS" - border_width 1 - border_color black - visible job_usersub_file - } - - roller { - position +10 = - size 18 4 - nvalues 2 - texts "COMPATIBLE" - "INCOMPATIBLE" - roller "job_option network_hosts" - commands "*job_option network_hosts:compatible" - "*job_option network_hosts:incompatible" - help job_host_comp - visible job_usersub_file - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu marc_integer_size_pm { - - window { - parent mentat - origin 55 32 - size 32 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group marc_integer_size_gr -} - - -#-------------------------------------------------------------------------------------------------- -group marc_integer_size_gr { - - popdown { - position 0 0 - size 32 4 - text "DEFAULT" - command "*job_option marc_integer_size:default" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "4-BYTE INTEGERS" - command "*job_option marc_integer_size:i4" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "8-BYTE INTEGERS" - command "*job_option marc_integer_size:i8" - help job_run_intsize - } - - popdown { - position = +5 - size 32 4 - text "CANCEL" - help job_run_intsize - } -} -#endif -#endif diff --git a/installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms.original b/installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms.original deleted file mode 100644 index 3397e70a0..000000000 --- a/installation/mods_MarcMentat/2014.2/Mentat_menus/job_run.ms.original +++ /dev/null @@ -1,3255 +0,0 @@ -#ifndef AUTOFORGE -popmenu job_title_pm file jobs.ms -popdown job_title_ok file jobs.ms -#ifndef QT_MENTAT -popmenu marc_input_style_pm file job_common.ms -popmenu marc_input_style_run_adv_pm file job_common.ms -popmenu marc_version_run_pm file job_common.ms -#endif - -group job_solver_gr file job_common.ms -group user_domains_gr file domain_decomposition.ms -group user_domains_generate_gr file domain_decomposition.ms -group user_domains_tail_gr file domain_decomposition.ms -group job_solver_opts_gr file job_common.ms -popmenu ddm_options file job_common.ms - -#ifdef QT_MENTAT -browser edit_browser file file.ms -browser directory_browser file file.ms -screen domains file domain_decomposition.ms -#else -popmenu edit_browser_popmenu file file.ms -popmenu directory_browser_popmenu file file.ms -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu usersub_file_browser_pm { - - group { -#endif - - browser usersub_file_browser { - position 0 0 - size 82 72 - text "$usersub_file_browser_label" ($usersub_file_browser_label) - filter "*.f *.F *.f90 *.F90" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$usersub_file_browser_command" ($usersub_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC User Subroutine File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu host_file_browser_pm { - - group { -#endif - - browser host_file_browser { - position 0 0 - size 82 72 - text "$host_file_browser_label" ($host_file_browser_label) - filter "*" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$host_file_browser_command" ($host_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC Host File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_popmenu { - -#ifdef QT_MENTAT - text "RUN JOB" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 52 4 - text "RUN JOB" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - button { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 24 4 - text "USER SUBROUTINE FILE" -#ifdef QT_MENTAT - browser usersub_file_browser -#else - popmenu usersub_file_browser_pm -#endif - settext $usersub_file_browser_label "SELECT USER SUBROUTINE FILE" - set $usersub_file_browser_command "*job_usersub_file" - help job_usersub_file - } - - toggle { - position +26 = - size 22 4 - text "SELECTED USER SUBS" - toggle job_usersubs - help job_run_seluser - visible job_usersubs - popmenu job_usersub_pm - } - - display { - position 1 +4 - size 50 4 - display job_usersub_file - } - - button { - position 1 +4 - size 12 4 - text "EDIT" - command "*job_edit_usersub_file" - visible job_usersub_file - } - - button { - position +12 = - size 12 4 - text "CLEAR" - command "*job_clear_usersub_file" - visible job_usersub_file - } - - roller { - position +12 = - size 26 4 - nvalues 3 - texts "COMPILE / NO SAVE" - "COMPILE AND SAVE" - "RUN SAVED EXECUTABLE" - help job_run_compile - roller "job_option user_source" - visible job_usersub_file -#ifdef QT_MENTAT - commands "*job_option user_source:compile_nosave" - "*job_option user_source:compile_save" - "*job_option user_source:run_saved" -#else - popmenu job_user_source_pm -#endif - } - - toggle { - position 1 +6 - size 22 4 - text "PARALLELIZATION/\{GPU}" - help job_run_parallel - toggle "or(*job_option parallel:on, \ - *job_option assem_recov_multi_threading:on, \ - solver_multi_procs, \ - solver_multi_threads, \ - and(job_solver_mfront_sparse,\ - job_nonsym_off,\ - *job_option solver_use_gpu:on))" - popmenu job_run_parallelization_pm - set $popname2 "job_run_parallelization_pm" - } - - frame { - position +22 = - size 28 16 - border_width 1 - border_color black - - group { - - display { - position 0 0 - size 28 4 - display job_ddm_domains - } - - display { - position = +4 - size 28 4 - display job_assem_recov_nthreads - } - - display { - position = +4 - size 28 4 - display job_solver_procs - visible solver_allows_multi_procs - } - - display { - position = = - size 28 4 - display job_solver_threads - visible "and(solver_allows_multi_threads,\ - not(and(job_solver_mfront_sparse,\ - *job_option parallel:on)))" - } - - display { - position = +4 - size 28 4 - display job_solver_gpu - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } - } - } - - button { - position 1 +18 - size 8 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - -# see also job_common.ms -# see also the ADVANCED JOB SUBMISSION popmenu in this file - - label { - position +10 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_pm -#endif - help job_option_input_style - } - - button { - position +20 = - size 13 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position 1 +6 - size 16 6 - text "SUBMIT (1)" - command "*submit_job 1 *monitor_job" - } - - button { - position +16 = - size 34 6 - text "ADVANCED JOB SUBMISSION" - popmenu job_submit_adv_pm - } - - button { - position 1 +6 - size 16 6 - text "UPDATE" - command "*update_job" - } - - button { - position +16 = - size 16 6 - text "MONITOR" - command "*monitor_job" - } - - button { - position +16 = - size 18 6 - text "KILL" - command "*kill_job *monitor_job" - } - - label { - position 1 +7 - size 32 4 - text "STATUS" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_status" - } - - label { - position -32 +4 - size 32 4 - text "CURRENT INCREMENT (CYCLE)" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_increment" - } - - label { - position -32 +4 - size 32 4 - text "SINGULARITY RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_singularity_ratio" - } - - label { - position -32 +4 - size 32 4 - text "CONVERGENCE RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_convergence_ratio" - } - - label { - position 1 +4 - size 32 4 - text "ANALYSIS TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_analysis_time" - } - - label { - position -32 +4 - size 32 4 - text "WALL TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_time" - } - - frame { - position 1 +4 - size 50 8 - - group { - - frame { - position 0 0 - size 50 8 - text "TOTAL" - border_width 1 - border_color black - group { - - label { - position +6 = - size 13 4 - text "CYCLES" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_cycles" - border_width 1 - border_color black - } - - label { - position -13 +4 - size 13 4 - text "SEPARATIONS" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_separations" - border_width 1 - border_color black - } - - label { - position +10 -4 - size 11 4 - text "CUT BACKS" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_cut_backs" - border_width 1 - border_color black - } - - label { - position -11 +4 - size 11 4 - text "REMESHES" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_remeshes" - border_width 1 - border_color black - } - } - } - } - } - - label { - position 1 +8 - size 19 4 - text "EXIT NUMBER" - border_width 1 - border_color black - } - - integer { - position +19 = - size 10 4 - display "job_exit" - } - - button { - position +10 = - size 21 4 - text "EXIT MESSAGE" - popmenu job_exit_msg_pm - help exit_message - } - - label { - position 1 +6 - size 7 4 - text "EDIT" - border_width 1 - border_color black - } - - button { - position +7 = - size 12 4 - text "OUTPUT FILE" - command "*job_edit_output" - } - - button { - position +12 = - size 9 4 - text "LOG FILE" - command "*job_edit_log_file" - } - - button { - position +9 = - size 12 4 - text "STATUS FILE" - command "*job_edit_status_file" - } - - button { - position +12 = - size 10 4 - text "ANY FILE" - settext $edit_browser_label "EDIT FILE" - set $edit_browser_command "*edit_file" -#ifdef QT_MENTAT - browser edit_browser -#else - popmenu edit_browser_popmenu -#endif - help edit_file - } - - popdown { - position 1 +6 - size 32 4 -#ifdef QT_MENTAT - text "OPEN POST FILE (MODEL PLOT RESULTS MENU)" - command "@popdown(job_properties_pm) @main(results) @popup(modelplot_pm) *post_open_default" -#else - text "OPEN POST FILE (RESULTS MENU)" - screen results - command "*post_open_default" -#endif - } - - button { - position 1 +6 - size 12 8 - text "RESET" - command "*job_submit_reset" - } - - popdown { - position +38 = - size 12 8 - text "OK" - } - } - - window job_run_wi { - parent mentat - origin 35 1 - size 52 115 - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_usersub_pm { - -#ifdef QT_MENTAT - text "CURRENTLY SELECTED USER SUBROUTINES" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 66 4 - text "CURRENTLY SELECTED USER SUBROUTINES" - } -#endif - - display { - position 1 +5 - size 64 86 - display "job_usersubs" - } - - popdown { - position 27 +88 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 66 102 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_submit_adv_pm { - -#ifdef QT_MENTAT - text "ADVANCED JOB SUBMISSION" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "ADVANCED JOB SUBMISSION" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - label { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 19 4 - text "INITIAL ALLOCATION" - border_width 1 - border_color black - } -#ifdef QT_MENTAT - label { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - } -#else - button { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - command "*job_param general_init_allocation" - } -#endif - text { - position +15 = - size 10 4 - display "job_param_value_general_init_allocation" - command "*job_param general_init_allocation" - help job_param_general_init_allocation - } - - label { - position +10 = - size 4 4 - text "MB" - border_width 1 - border_color black - } - - toggle { - position 1 +5 - size 32 4 - text "OUT-OF-CORE ELEMENT STORAGE" - help job_param_elsto - toggle "*job_option elsto:on" - true_command "*job_option elsto:on" - false_command "*job_option elsto:off" - } - - toggle { - position 1 +4 - size 32 4 - text "OUT-OF-CORE INCREMENTAL BACKUP" - help job_param_inc_backup_storage - toggle "*job_option inc_backup_storage:out_of_core" - true_command "*job_option inc_backup_storage:out_of_core" - false_command "*job_option inc_backup_storage:in_core" - } - - toggle { - position +34 = - size 14 4 - text "CHECK SIZES" - help job_run_check - toggle "*job_option check:on" - true_command "*job_option check:on" - false_command "*job_option check:off" - } - - label { - position 1 +6 - size 16 4 - text "INTEGER SIZE" - border_width 1 - border_color black - } - - roller { - position +16 = - size 32 4 - nvalues 3 - texts "DEFAULT" - "4-BYTE INTEGERS" - "8-BYTE INTEGERS" -#ifdef QT_MENTAT - commands "*job_option marc_integer_size:default" - "*job_option marc_integer_size:i4" - "*job_option marc_integer_size:i8" -#else - popmenu marc_integer_size_pm -#endif - help job_run_intsize - roller "job_option marc_integer_size" - } - - frame { - position 1 +6 - size 48 12 - text "MARC INPUT FILE" - border_width 1 - border_color black - - group { - - label { - position 0 4 - size 9 4 - text "VERSION" - border_width 1 - border_color black - } - - roller { - position +9 = - size 14 4 - nvalues 20 - nvisible 20 - texts "DEFAULT" -#if 0 - "2014.2" -#endif - "2014.1" - "2014" - "2013.1" - "2013" - "2012" - "2011" - "2010.2" - "2010" - "2008" - "2007" - "2005R3" - "2005" - "2003" - "2001" - "2000" -#if 0 - "8" -#endif - "K7" - "K6.2" - "K5" - "K4" - help job_param_version - rollers "job_input_version_default" -#if 0 - "job_input_version_2014.2" -#endif - "job_input_version_2014.1" - "job_input_version_2014" - "job_input_version_2013.1" - "job_input_version_2013" - "job_input_version_2012" - "job_input_version_2011" - "job_input_version_2010.2" - "job_input_version_2010" - "job_input_version_2008" - "job_input_version_2007" - "job_input_version_2005r3" - "job_input_version_2005" - "job_input_version_2003" - "job_input_version_2001" - "job_input_version_2000" -#if 0 - "job_input_version_8" -#endif - "job_input_version_k7" - "job_input_version_k6" - "job_input_version_k5" - "job_input_version_k4" -#ifdef QT_MENTAT - commands "*job_option version:default" -#if 0 - "*job_option version:2014.2" -#endif - "*job_option version:2014.1" - "*job_option version:2014" - "*job_option version:2013.1" - "*job_option version:2013" - "*job_option version:2012" - "*job_option version:2011" - "*job_option version:2010.2" - "*job_option version:2010" - "*job_option version:2008" - "*job_option version:2007" - "*job_option version:2005r3" - "*job_option version:2005" - "*job_option version:2003" - "*job_option version:2001" - "*job_option version:2000" -#if 0 - "*job_option version:8" -#endif - "*job_option version:k7" - "*job_option version:k6" - "*job_option version:k5" - "*job_option version:k4" - visibles "job_allows_input_version_default" -#if 0 - "job_allows_input_version_2014.2" -#endif - "job_allows_input_version_2014.1" - "job_allows_input_version_2014" - "job_allows_input_version_2013.1" - "job_allows_input_version_2013" - "job_allows_input_version_2012" - "job_allows_input_version_2011" - "job_allows_input_version_2010.2" - "job_allows_input_version_2010" - "job_allows_input_version_2008" - "job_allows_input_version_2007" - "job_allows_input_version_2005r3" - "job_allows_input_version_2005" - "job_allows_input_version_2003" - "job_allows_input_version_2001" - "job_allows_input_version_2000" -#if 0 - "job_allows_input_version_8" -#endif - "job_allows_input_version_k7" - "job_allows_input_version_k6" - "job_allows_input_version_k5" - "job_allows_input_version_k4" -#else - popmenu marc_version_run_pm -#endif - } - -# see also job_common.ms -# see also the RUN JOB popmenu in this file - - label { - position +14 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_run_adv_pm -#endif - help job_option_input_style - } - - toggle { - position 0 +4 - size 48 4 - text "EXTENDED PRECISION" - help job_run_precision - toggle "*job_option inp_file_prec:extended" - true_command "*job_option inp_file_prec:extended" - false_command "*job_option inp_file_prec:normal" - } - } - } - - button { - position 1 +14 - size 24 4 - text "SCRATCH DIRECTORY" - settext $directory_browser_label "JOB SCRATCH DIRECTORY" - set $directory_browser_command "*job_scratch_directory" -#ifdef QT_MENTAT - browser directory_browser -#else - popmenu directory_browser_popmenu -#endif - help job_scratch_directory - } - - button { - position +24 = - size 24 4 - text "CLEAR" - command "*job_clear_scratch_directory" - visible job_scratch_directory - } - - text { - position 1 +4 - size 48 4 - display job_scratch_dir - command "*job_scratch_directory" - } - -#ifdef DCOM - toggle { - position 1 +6 - size 8 4 - text "\{DCOM}" - toggle "*job_option dcom:on" - help job_run_dcom - true_command "*job_option dcom:on" - false_command "*job_option dcom:off" - visible win32_available - } - - button { - position +8 = - size 12 4 - text "HOSTNAME" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } - - text job_dcom_hostname { - position +12 = - size 28 4 - display "job_dcom_hostname" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } -#endif - - button { - position 1 +6 - size 24 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - - button { - position +24 = - size 24 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position +4 +6 - size 20 4 - text "WRITE INPUT FILE" - command "*job_write_input" - } - - button { - position = +4 - size 20 4 - text "EDIT INPUT FILE" - command "*job_edit_input" - } - - popdown { - position 1 +5 - size 20 6 - text "SUBMIT 1" - command "*submit_job 1 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 1" - command "*execute_job 1 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 2" - command "*submit_job 2 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 2" - command "*execute_job 2 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 3" - command "*submit_job 3 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 3" - command "*execute_job 3 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_exit_msg_pm { - -#ifdef QT_MENTAT - text "EXIT MESSAGE" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 86 4 - text "EXIT MESSAGE" - } - - display { - position 1 5 - size 84 74 - display "job_exit_msg" - } -#endif - -#ifdef QT_MENTAT - - text { - position 1 5 - size 84 74 - multiline - readonly - display "job_exit_msg" - } - -#endif - popdown { - position 37 +76 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 86 90 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_user_source_pm { - - window { - parent job_run_wi - origin 25 17 - size 26 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_user_source_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_user_source_gr { - popdown { - position 0 0 - size 26 4 - text "COMPILE / NO SAVE" - command "*job_option user_source:compile_nosave" - } - - popdown { - position = +4 - size 26 4 - text "COMPILE AND SAVE" - command "*job_option user_source:compile_save" - } - - popdown { - position = +4 - size 26 4 - text "RUN SAVED EXECUTABLE" - command "*job_option user_source:run_saved" - } - - popdown { - position = +5 - size 26 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_parallelization_pm { - -#ifdef QT_MENTAT - text "PARALLELIZATION/\{GPU}" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 60 4 - text "PARALLELIZATION/GPU" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 48 28 - group job_ddm_gr - text "DOMAIN DECOMPOSITION" - border_width 1 - border_color black - } - - frame { - position 1 +29 - size 36 13 - group job_assem_recov_gr - text "ASSEMBLY AND RECOVERY" - border_width 1 - border_color black - } - - frame { - position 1 +14 - size 58 31 - group job_parallel_matrix_solver_gr - text "MATRIX SOLVER" - border_width 1 - border_color black - } - - frame { - position 1 +32 - size 48 28 - group job_parallel_env_gr - text "PARALLELIZATION ENVIRONMENT" - border_width 1 - border_color black - visible "or(*job_option parallel:on, \ - solver_multi_procs)" - } - - popdown { - position 24 +30 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 1 - size 60 119 - background_color body - border_width 1 - border_color border - buffering single - } -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_gr { - - toggle { - position 1 4 - size 30 4 - text "USE \{DDM}" - toggle "*job_option parallel:on" - help job_run_ddm_use - true_command "*job_option parallel:on" - false_command "*job_option parallel:off" - active "not(job_solver_it_ext)" - } - - frame { - position +2 +5 - size 44 18 - group job_ddm_use_gr - visible "*job_option parallel:on" - } -} - -group job_ddm_use_gr { - roller { - position 0 0 - size 30 4 - nvalues 2 - texts "DECOMPOSITION IN MARC" - "DECOMPOSITION IN MENTAT" - roller "job_option ddm_generator" -#ifdef QT_MENTAT - commands "*job_option ddm_generator:fea_solver" - "*job_option ddm_generator:preprocessor" -#else - popmenu job_ddm_generator_pm -#endif - help job_run_ddm_generator - } - - frame { - position 0 +5 - size 44 8 - group job_ddm_fea_solver_gr - visible "*job_option ddm_generator:fea_solver" - } - - frame { - position = = - size 44 8 - group job_ddm_preprocessor_gr - visible "*job_option ddm_generator:preprocessor" - } - - text { - position 0 +9 - size 22 4 -#ifdef QT_MENTAT - text "Single Input File" -#else - text "SINGLE INPUT FILE" -#endif - readonly - visible "*job_option ddm_generator:fea_solver" - } - - roller { - position = = - size 22 4 - nvalues 2 - texts "MULTIPLE INPUT FILES" - "SINGLE INPUT FILE" - roller "job_option ddm_single_input" - commands "*job_option ddm_single_input:off" - "*job_option ddm_single_input:on" - visible "*job_option ddm_generator:preprocessor" - help job_run_ddm_single_input - } - - roller { - position +23 = - size 21 4 - nvalues 2 - texts "MULTIPLE POST FILES" - "SINGLE POST FILE" - roller "job_option ddm_single_post" - commands "*job_option ddm_single_post:off" - "*job_option ddm_single_post:on" - help job_run_ddm_single_post - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_generator_pm { - - window { - parent mentat - origin 42 19 - size 30 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_generator_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_generator_gr { - - popdown { - position 0 0 - size 30 4 - text "DECOMPOSITION IN MARC" - command "*job_option ddm_generator:fea_solver" - help job_run_ddm_generator - } - - popdown { - position = +4 - size 30 4 - text "DECOMPOSITION IN MENTAT" - command "*job_option ddm_generator:preprocessor" - help job_run_ddm_generator - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - help job_run_ddm_generator - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_fea_solver_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 10 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 0 0 - size 10 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +10 = - size 4 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position +4 = - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method_pm -#endif - } - - button { - position +4 +4 - size 19 4 - text "ADVANCED SETTINGS" -#ifdef QT_MENTAT - popmenu job_ddm_fea_solver_pm -#else - screen job_ddm_fea_solver_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method_pm { - - window { - parent mentat - origin 56 24 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_method_gr { - - popdown { - position 0 0 - size 30 4 - text "METIS BEST" - command "*job_option ddm_method:metis_best" - } - - popdown { - position = +4 - size 30 4 - text "METIS ELEMENT BASED" - command "*job_option ddm_method:metis_element_based" - } - - popdown { - position = +4 - size 30 4 - text "METIS NODE BASED" - command "*job_option ddm_method:metis_node_based" - } - - popdown { - position = +4 - size 30 4 - text "RECURSIVE COORDINATE BISECTION" - command "*job_option ddm_method:recur_coord_bisect" - } - - popdown { - position = +4 - size 30 4 - text "VECTOR" - command "*job_option ddm_method:vector" - } - - popdown { - position = +4 - size 30 4 - text "RADIAL" - command "*job_option ddm_method:radial" - } - - popdown { - position = +4 - size 30 4 - text "ANGULAR" - command "*job_option ddm_method:angular" - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - } -} -#endif - - -#ifdef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_fea_solver_pm { - - text "JOB PARALLELIZATION" -#else -screen job_ddm_fea_solver_sc { - - menu { -#endif - - group { - units 32 120 - -#ifndef QT_MENTAT - label { - position 0 0 - size 32 4 - text "JOB PARALLELIZATION" - } -#endif - - label { - position 0 5 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - -#ifdef QT_MENTAT - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { - -#ifdef QT_MENTAT - position 0 +9 -#else - position 0 +5 -#endif - size 32 76 - text "ADVANCED DECOMPOSITION IN MARC" - border_width 1 - border_color black - - group { - -#ifdef QT_MENTAT - label { - position 1 4 - size 16 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 1 4 - size 16 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +16 = - size 14 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position 1 +4 - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method2_pm -#endif - } - - frame { - position 1 +5 - size 30 20 - group job_ddm_direction_gr - visible "or(*job_option ddm_method:vector, \ - *job_option ddm_method:radial, \ - *job_option ddm_method:angular)" - } - - toggle { - position 1 +21 - size 30 4 - text "DOMAIN ISLAND REMOVAL" - toggle "*job_option ddm_island_removal:on" - true_command "*job_option ddm_island_removal:on" - false_command "*job_option ddm_island_removal:off" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "GRAPH" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "COARSE" - "FINE" - help ddm_decomp_coarse_graph - rollers "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - commands "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "QUADRATIC ELEMENTS" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "GENUINE" - "LINEARIZED" - help job_run_ddm_decomp_linearized - rollers "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - commands "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - } - -#ifdef QT_MENTAT - label { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - help job_param - } -#else - button { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_elem_weight_factor" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } - - toggle { - position 1 +5 - size 30 4 - text "DETECT CONTACT" - toggle "*job_option ddm_detect_contact:on" - true_command "*job_option ddm_detect_contact:on" - false_command "*job_option ddm_detect_contact:off" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - help job_run_ddm_decomp_detect_contact - } - -#ifdef QT_MENTAT - label { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } -#endif - - text { - position +15 = - size 15 4 - command "*set_ddm_contact_tolerance" - display "job_param_value_ddm_contact_tolerance" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } - -#ifdef QT_MENTAT - label { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_contact_constr_factor" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } - } - } - -#ifdef QT_MENTAT - popdown { - position 0 +77 - size 32 8 - text "OK" - } -#else - frame { - position 0 +77 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return -#endif - } -#ifndef QT_MENTAT - window main_window - disable_right_mouse_button - } - - menu transform -} # job_ddm_fea_solver_sc -#else - mode permanent -} # job_ddm_fea_solver_pm -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method2_pm { - - window { - parent mentat - origin 1 22 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_direction_gr { - - button { - position 0 0 - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "*job_option ddm_method:vector" - } - - button { - position = = - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "not(*job_option ddm_method:vector)" - } - - button { - position +15 = - size 15 4 - text "FROM / TO" - command "*job_vector_from_to ddm_sort_direction_x" - } - - text { - position -15 +4 - size 10 4 - command "*job_param ddm_sort_direction_x" - display "job_param_value_ddm_sort_direction_x" - help ddm_job_decomp_user_direction_x - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_y" - display "job_param_value_ddm_sort_direction_y" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_z" - display "job_param_value_ddm_sort_direction_z" - } - - frame { - position 0 +4 - size 30 8 - group job_ddm_sort_point_gr - visible "not(*job_option ddm_method:vector)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_gr { - - label { - position 0 0 - size 14 4 - border_width 1 - border_color black - text "POINT ON AXIS" - } - - roller { - position +14 = - size 10 4 - nvalues 2 - texts "DEFAULT" - "USER" - roller "job_option ddm_sort_point" -#ifdef QT_MENTAT - commands "*job_option ddm_sort_point:default" - "*job_option ddm_sort_point:user" -#else - popmenu job_ddm_sort_point_meth_pm -#endif - } - - button { - position +10 = - size 6 4 - text "SET" - command "*job_position ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position 0 +4 - size 10 4 - command "*job_param ddm_sort_point_x" - display "job_param_value_ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_y" - display "job_param_value_ddm_sort_point_y" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_z" - display "job_param_value_ddm_sort_point_z" - visible "*job_option ddm_sort_point:user" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_sort_point_meth_pm { - - window { - parent mentat - origin 15 35 - size 14 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_sort_point_meth_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_meth_gr { - - popdown { - position 0 0 - size 14 4 - text "DEFAULT" - command "*job_option ddm_sort_point:default" - } - - popdown { - position = +4 - size 14 4 - text "USER DEFINED" - command "*job_option ddm_sort_point:user" - } - - popdown { - position = +5 - size 14 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_preprocessor_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - border_width 1 - border_color black - } - - integer { - position +10 = - size 4 4 - display valid_domains - } - - button { - position +4 = - size 30 4 - text "USER DOMAINS" -#ifdef QT_MENTAT - popmenu domains_pm -#else - screen job_ddm_user_domains_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - help job_run_ddm_user_domains - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -screen job_ddm_user_domains_sc { - - menu { - - group { - units 32 120 - - label { - position 0 0 - size 32 4 - text "USER DOMAINS" - } - - frame { - position 0 5 - size 32 28 - group user_domains_gr - } - - frame { - position 0 +29 - size 32 49 - group user_domains_generate_gr - } - - frame { - position 0 +50 - size 32 8 - group user_domains_tail_gr - } - - frame { - position 0 92 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return - } - window main_window - disable_right_mouse_button - - } - - menu transform - -} # job_ddm_user_domains_sc -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_assem_recov_gr { - - toggle { - position 1 +4 - size 30 4 - text "MULTIPLE THREADS" - true_command "*job_option assem_recov_multi_threading:on" - false_command "*job_option assem_recov_multi_threading:off" - toggle "*job_option assem_recov_multi_threading:on" - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 12 4 - text "# THREADS" - visible "*job_option assem_recov_multi_threading:on" - } -#else - button { - position +2 +4 - size 12 4 - text "# THREADS" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } -#endif - - text { - position +12 = - size 4 4 - display "job_param_value_assem_recov_nthreads" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } - - label { - position +4 = - size 12 4 - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 = - size 4 4 - display "job_assem_recov_nthreads_dom" - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_matrix_solver_gr { - - label { - position 3 4 - size 12 4 - text "SOLUTION" - border_width 1 - border_color black - } - - roller { - position +12 = - size 18 4 - nvalues 2 - texts "SYMMETRIC" - "NONSYMMETRIC" - rollers job_nonsym_off - job_nonsym_on - commands "*job_option solver_nonsym:off" - "*job_option solver_nonsym:on" - help job_param_solver_method - } - - label { - position -12 +4 - size 6 4 - text "TYPE" - border_width 1 - border_color black - } - - roller { - position +6 = - size 24 4 - nvalues 9 - help job_param_solver_method - texts "MULTIFRONTAL SPARSE" - "MIXED DIRECT-ITERATIVE" - "CASI ITERATIVE" - "PARDISO DIRECT SPARSE" - "MUMPS PARALLEL DIRECT" - "HARDWARE SPARSE" - "ITERATIVE SPARSE" - "DIRECT PROFILE" - "DIRECT SPARSE" - rollers job_solver_mfront_sparse - job_solver_mixed_direct_iterative - job_solver_it_ext - job_solver_pardiso - job_solver_mumps - job_solver_sparse - job_solver_it_sparse - job_solver_dir_profile - job_solver_dir_sparse -#ifdef QT_MENTAT - commands "*job_option solver:mfront_sparse" - "*job_option solver:mixed_direct_iterative" - "*job_option solver:it_ext" - "*job_option solver:pardiso" - "*job_option solver:mumps" - "*job_option solver:sparse" - "*job_option solver:it_sparse" - "*job_option solver:dir_profile" - "*job_option solver:dir_sparse" - visibles job_allows_solver_mfront_sparse - job_allows_solver_mixed_direct_iterative - job_allows_solver_it_ext - job_allows_solver_pardiso - job_allows_solver_mumps - job_allows_solver_sparse - job_allows_solver_it_sparse - job_allows_solver_dir_profile - job_allows_solver_dir_sparse - help job_param_solver_method -#else - popmenu job_set_parallel_matrix_solver_pm -#endif - } - - button { - position +24 = - size 10 4 - text "OPTIONS" - popmenu job_parallel_matrix_solver_opt_pm - } - - frame { - position +10 = - size 14 4 - group job_run_solver_ddm_opts_gr - visible "*job_option parallel:on" - } - - frame { - position 1 +5 - size 46 8 - group job_solver_multi_procs_gr - visible solver_allows_multi_procs - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_gr - visible solver_allows_multi_threads - } - - frame { - position 1 +9 - size 46 8 - group job_solver_gpu_gr - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_set_parallel_matrix_solver_pm { - window { - parent mentat - origin 48 61 - size 24 42 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_solver_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_parallel_matrix_solver_opt_pm { - -#ifdef QT_MENTAT - text "MATRIX SOLVER OPTIONS" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 38 4 - text "MATRIX SOLVER OPTIONS" - } -#endif - - frame { - position 1 5 - size 36 23 - group job_solver_opts_gr - } - - popdown { - position 13 +25 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 41 12 - size 38 39 - border_width 1 - border_color border - background_color body - } - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -group job_run_solver_ddm_opts_gr { - - button { - position 0 0 - size 14 4 - text "\{DDM} OPTIONS" - popmenu ddm_options -# see also job_common.ms! - visible "not(or(job_solver_it_sparse, \ - job_solver_it_ext, \ - job_solver_mixed_direct_iterative, \ - job_solver_pardiso, \ - job_solver_mumps))" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_procs_parallel_off_gr - visible "*job_option parallel:off" - } - - frame { - position = = - size 46 8 - group job_solver_multi_procs_parallel_on_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - true_command "*job_option nsolver_procs_serial:on" - false_command "*job_option nsolver_procs_serial:off" - toggle "*job_option nsolver_procs_serial:on" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - visible "*job_option nsolver_procs_serial:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# PROCESSES" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - border_width 1 - border_color black - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - help job_run_multithreading - rollers "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_nsolver_procs_ddm_automatic_gr - visible "*job_option nsolver_procs_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_nsolver_procs_ddm_user_gr - visible "*job_option nsolver_procs_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nsolver_procs" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - } -} - -group job_solver_multi_threads_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_off_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_on_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_off_gr - visible "and(job_solver_pardiso,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_on_gr - visible "and(job_solver_pardiso,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_it_ext_off_gr - visible "and(job_solver_it_ext,*job_option parallel:off)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option mfront_sparse_multi_threading:on" - true_command "*job_option mfront_sparse_multi_threading:on" - false_command "*job_option mfront_sparse_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option mfront_sparse_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +30 0 - size 12 4 - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 0 - size 4 4 - display "job_mfront_sparse_nthreads_dom" - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - } - - label { - position 2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_automatic_gr - visible "*job_option mfront_sparse_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_user_gr - visible "*job_option mfront_sparse_multi_threading_ddm:user" - } -} -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nthreads" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - - - -#-------------------------------------------------------------------------------------------------- -group job_solver_gpu_gr { - - toggle { - position 0 0 - size 30 4 - text "USE \{GPU(s)}" - toggle "*job_option solver_use_gpu:on" - true_command "*job_option solver_use_gpu:on" - false_command "*job_option solver_use_gpu:off" - help job_solver_gpu - } - - label { - position +2 +4 - size 16 4 - text "\{GPU} SELECTION" - border_width 1 - border_color black - visible "*job_option solver_use_gpu:on" - } - - roller { - position +16 = - size 12 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - rollers "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - visible "*job_option solver_use_gpu:on" - help job_solver_gpu - } - - text { - position +12 = - size 16 4 - display job_solver_gpus - command "*clear_job_solver_gpus *job_solver_gpus" - visible "and(*job_option solver_use_gpu:on,*job_option solver_gpus:user)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option pardiso_multi_threading:on" - true_command "*job_option pardiso_multi_threading:on" - false_command "*job_option pardiso_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option pardiso_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_pardiso_multi_threads_ddm_automatic_gr - visible "*job_option pardiso_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_pardiso_multi_threads_ddm_user_gr - visible "*job_option pardiso_multi_threading_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nthreads" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_it_ext_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option it_ext_multi_threading:on" - true_command "*job_option it_ext_multi_threading:on" - false_command "*job_option it_ext_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option it_ext_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option it_ext_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_gr { - - roller { - position 1 4 - size 30 4 - nvalues 2 - texts "SINGLE MACHINE" - "NETWORK" - help job_run_ddm_setup - roller "job_option parallel_setup" - commands "*job_option parallel_setup:single" - "*job_option parallel_setup:network" - } - - frame { - position +2 +5 - size 44 18 - group job_parallel_env_network_gr - visible "*job_option parallel_setup:network" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_gr { - - button { - position 0 0 - size 28 4 - text "HOST FILE" -#ifdef QT_MENTAT - browser host_file_browser -#else - popmenu host_file_browser_pm -#endif - settext $host_file_browser_label "SELECT HOST FILE" - set $host_file_browser_command "*job_host_file" - help job_host_file - } - - button { - position +28 = - size 8 4 - text "EDIT" - command "*job_edit_host_file" - help job_edit_host_file - visible job_host_file - } - - button { - position +8 = - size 8 4 - text "CLEAR" - command "*job_clear_host_file" - help job_clear_host_file - visible job_host_file - } - - display { - position 0 +4 - size 44 4 - display job_host_file - } - - frame { - position 0 +5 - size 44 9 - group job_parallel_env_network_ddm_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_ddm_gr { - - toggle { - position 0 0 - size 22 4 - text "COPY INPUT FILE" - toggle "*job_option copy_input_file:on" - true_command "*job_option copy_input_file:on" - false_command "*job_option copy_input_file:off" - help job_host_copy_inputfile - } - - toggle { - position +23 = - size 21 4 - text "COPY POST FILE" - toggle "*job_option copy_post_file:on" - true_command "*job_option copy_post_file:on" - false_command "*job_option copy_post_file:off" - help job_host_copy_inputfile - } - - label { - position 0 +5 - size 10 4 - text "HOSTS" - border_width 1 - border_color black - visible job_usersub_file - } - - roller { - position +10 = - size 18 4 - nvalues 2 - texts "COMPATIBLE" - "INCOMPATIBLE" - roller "job_option network_hosts" - commands "*job_option network_hosts:compatible" - "*job_option network_hosts:incompatible" - help job_host_comp - visible job_usersub_file - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu marc_integer_size_pm { - - window { - parent mentat - origin 55 32 - size 32 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group marc_integer_size_gr -} - - -#-------------------------------------------------------------------------------------------------- -group marc_integer_size_gr { - - popdown { - position 0 0 - size 32 4 - text "DEFAULT" - command "*job_option marc_integer_size:default" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "4-BYTE INTEGERS" - command "*job_option marc_integer_size:i4" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "8-BYTE INTEGERS" - command "*job_option marc_integer_size:i8" - help job_run_intsize - } - - popdown { - position = +5 - size 32 4 - text "CANCEL" - help job_run_intsize - } -} -#endif -#endif diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask b/installation/mods_MarcMentat/2014/Marc_tools/comp_damask deleted file mode 100644 index 2d144b8a4..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_h b/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_h deleted file mode 100644 index 01464f095..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_h +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_hmp b/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_hmp deleted file mode 100644 index 36ced6543..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_hmp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_l b/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_l deleted file mode 100644 index 31b5cd175..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_l +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_lmp b/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_lmp deleted file mode 100644 index 8a0c1255d..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_lmp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRANLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_mp b/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_mp deleted file mode 100644 index 986d9ae04..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_damask_mp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2014/Marc_tools/comp_user.original b/installation/mods_MarcMentat/2014/Marc_tools/comp_user.original deleted file mode 100644 index 8679bb041..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/comp_user.original +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user.f on host `hostname`" -echo "program: $program" - $FORTRAN $user.f || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$user.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS || \ - { - echo "$0: link failed for $user.o on host `hostname`" - exit 1 - } - /bin/rm $userobj diff --git a/installation/mods_MarcMentat/2014/Marc_tools/include_linux64 b/installation/mods_MarcMentat/2014/Marc_tools/include_linux64 deleted file mode 100644 index e67f8158e..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/include_linux64 +++ /dev/null @@ -1,742 +0,0 @@ -# -# General definitions for the Marc 2014 version -# -# EM64T -# ( LP64 - i4 version) -# (ILP64 - i8 version) -# -# Linux RedHat 5.7 -# -# 64 bit MPI version -# -# Intel(R) Fortran Compiler -# Version 13.0.1 -# -# Intel(R) C Compiler -# Version 13.0.1 -# -# MKL Libraries: -# Intel(R) MKL 10.3 -# -# DATE -# -# To check the O/S level, type: -# uname -a -# -# Distributed parallel MPI libraries: -# 1) HP MPI 2.3 -# To check the mpi version, type: -# mpirun -version -# 2) Intel MPI 4.0 -# To check the mpi version, type: -# mpirun -version -# -# To check the Compiler level, type using the compiler -# installation path: -# ifort -V -# icc -V -# -# REMARKS : This file contains the definitions of variables used during -# compilation loading and use of the MARC programmes . The -# current machine type is identified by means of the variable -# MACHINE , defined below. -# -# -# MPI_ROOT: root directory in which mpi shared libraries, etc. are located -# DIRJOB : directory in which spawned jobs should look for Marc input -# MPI_ARCH: system architecture -# MPI_EPATH: path where executable resides -# - -REVISION="VERSION, BUILD" -HOSTNAME=`hostname` - -# find available memory in Mbyte on the machine -# can be set explicitly -MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'` - -# set _OEM_NASTRAN to 1 for MD Nastran build -# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable -_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}" - -# uncomment the following line for an autoforge build -#AUTOFORGE=1 -AUTOFORGE=0 -export AUTOFORGE - -# integer size -if test "$MARC_INTEGER_SIZE" = "" ; then - INTEGER_PATH= -else - INTEGER_PATH=/$MARC_INTEGER_SIZE -fi - -FCOMP=ifort - -# -# settings for Metis -# -METIS="-I$METIS_SOURCE" -METISLIBS="$MARC_LIB/metis.a " - -# -# settings for MPI -# -# RCP and RSH are used for parallel network runs -# replace with similar commands like rsh if needed -RCP=/usr/bin/scp -RSH=/usr/bin/ssh -# - - -MPI_DEFAULT=intelmpi -MPI_OTHER=hpmpi - -MPITYPE=$MPI_DEFAULT - -if test $AUTOFORGE -then - if test $AUTOFORGE = 1 - then - MPITYPE=none - fi -fi - - -# overrule MPITYPE setting with environmental variable MARC_MPITYPE -if test $MARC_MPITYPE -then - MPITYPE=$MARC_MPITYPE -fi - -# always set MPITYPE to none for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - MPITYPE=none -fi - -# Edit following lines to build with GPGPU version of BCS Solver for -# NVIDIA platforms -#BCSGPUSOLVER=NONE -BCSGPUSOLVER=BCSGPU - -SOLVERFLAGS= -if test "$BCSGPUSOLVER" = BCSGPU -then - SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA" - BCS_DIR=bcsgpusolver - export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH - export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH -else - BCS_DIR=bcssolver -fi -# -# settings for MPI -# -DDM= -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - FCOMPMPI=mpif90 - export MPI_ROOT=$MARC_HPMPI - export MPI_REMSH=$RSH - export MPI_F77=$FCOMP - ARCHITECTURE=linux_amd64 - DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI" - MPI_CLEAN= - export MPI_EPATH=$MARC_BIN - export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH - export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1" -# Below line is moved in run_marc file -# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN" - if test -n "$MSC_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE" - fi - if test -n "$LM_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE" - fi - export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x" - RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f " - RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np " - RUN_JOB0= - fi - if test $MPITYPE = intelmpi - then - INTELMPI_VERSION=HYDRA - FCOMPMPI=mpiifort - MPI_ROOT=$MARC_INTELMPI - DDM="-I${MPI_ROOT}/include64 -DDDM" - PATH=$MPI_ROOT/bin64:$PATH - export PATH - LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - if test $INTELMPI_VERSION = HYDRA - then - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall" - else - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile " - fi - RUN_JOB0= - MPI_CLEAN= - MPI_EPATH=$MARC_BIN - MPIR_HOME=$MPI_ROOT - MPICH_F77=$FCOMP - MPICH_F77LINKER=$FCOMP - export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER - I_MPI_PIN_DOMAIN=node - export I_MPI_PIN_DOMAIN - fi -else - MPI_ROOT=$MARC_DUMMYMPI - export MPI_ROOT=$MARC_DUMMYMPI - DDM="-I$MPI_ROOT/include" -fi - -# -# variables for the "maintain" script -# - -MACHINENAME=LINUX -MACHINE64BIT=yes -MACHINE=Linux_EM64T -DEV=/dev/tape -GETLOG="whoami" -CLEAR="clear" -MY_UNAME=`uname -a` - -# Edit following 2 lines to build with VKI Solver -#VKISOLVER=VKI -VKISOLVER=NONE - -# Edit following 2 lines to build with CASI Solver -CASISOLVER=CASI -#CASISOLVER=NONE - -# Edit following 2 lines to build with MF2 Solver -MF2SOLVER=NONE -#MF2SOLVER=SERIAL -#MF2SOLVER=MF2PARALLEL - -# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO) -#INTELSOLVER=NONE -INTELSOLVER=PARDISO - -# Edit following lines to build with MUMPS -if test "$MARC_INTEGER_SIZE" = "i4" ; then - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -else - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -fi - -# Edit following 2 lines to build MARC dynamic shared library -MARC_DLL=MARC_DLL -MARC_DLL=NONE - -# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - VKISOLVER=NONE - CASISOLVER=NONE - MF2SOLVER=NONE - INTELSOLVER=NONE - MUMPSSOLVER=NONE - BCSGPUSOLVER=NONE - MARC_DLL=NONE -fi - -# -# define Fortran and C compile syntax -# -if test "$VKISOLVER" = VKI -then - SOLVERFLAGS="$SOLVERFLAGS -DVKI" -fi - -if test "$CASISOLVER" = CASI -then - SOLVERFLAGS="$SOLVERFLAGS -DCASI" -fi - -if test "$MF2SOLVER" = MF2PARALLEL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL" -fi -if test "$MF2SOLVER" = MF2SERIAL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL" -fi - -if test "$INTELSOLVER" = PARDISO -then - SOLVERFLAGS="$SOLVERFLAGS -DPARDISO" -fi - -if test "$MUMPSSOLVER" = MUMPS -then - SOLVERFLAGS="$SOLVERFLAGS -DMUMPS" -fi - - -if test "$MARC_DLL" = MARC_DLL -then - SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL" -fi - -LINK_OPT= -DEBUG_OPT= -C_DEBUG_OPT= - -#Uncomment following line to build Marc in debuggable mode -MARCDEBUG= -#MARCDEBUG="ON" - -if test "$MARCDEBUG" = "ON" -then - LINK_OPT="-debug -traceback" - DEBUG_OPT="-debug -traceback" - C_DEBUG_OPT="-debug -traceback" -fi - - -MARCCHECK= -#MARCCHECK="ON" -if test "$MARCCHECK" = "ON" -then - DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv " - C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv " -fi - -MARCCODECOV= -#MARCCODECOV="ON" - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - I8FFLAGS="-real-size 64 -integer-size 32" - I8DEFINES="-DFLOAT=8 -DINT=4" - I8CDEFINES= - I8CASIDEFS= -else - I8FFLAGS="-i8 -real-size 64 -integer-size 64" - I8DEFINES="-DI64 -DFLOAT=8 -DINT=8" - I8CDEFINES="-U_DOUBLE -D_SINGLE" - I8CASIDEFS="-DCASI_64BIT_INT=1" -fi - -MTHREAD=OPENMP -if test "$MARC_OPENMP" = "NONE" ; then - MTHREAD=NONE -fi -#MTHREAD=NONE -if test "$_OEM_NASTRAN" -ne 0 -then -MTHREAD=NONE -fi - -OMP_COMPAT=NO -OMP_COMPAT=YES -if test "$MTHREAD" = "NONE" -then -OMP_COMPAT=NO -fi - -CDEFINES= -FDEFINES= - -if test "$_OEM_NASTRAN" -ne 0 -then - CDEFINES="$CDEFINES -D_OEM_NASTRAN" - FDEFINES="$FDEFINES -D_OEM_NASTRAN" -fi - -FDEFINES="$FDEFINES -D_IMPLICITNONE" - -if test "$_OEM_NASTRAN" -eq 0 -then - FDEFINES="$FDEFINES -DMKL -DOPENMP" -fi - -if test "$OMP_COMPAT" = "YES" -then - FDEFINES="$FDEFINES -DOMP_COMPAT" -fi - -# -D_MSCMARC -FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT" -CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES" - -CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS" -if test "$_OEM_NASTRAN" -ne 0 -then - CINCL="$CINCL -I../../include" -fi - -CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - -if test "$MARCDEBUG" = "ON" -then - CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -fi - -LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel" -CCT="$CC" -CCTLOW="$CCLOW" -CCTHIGH="$CCHIGH" - -CC_CASI="$CC -c99 $I8CASIDEFS" -CCLOW_CASI="$CCLOW -c99 $I8CASIDEFS" -CCHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS" - -CCT_CASI="$CCT -c99 $I8CASIDEFS" -CCTLOW_CASI="$CCLOW -c99 $I8CASIDEFS" -CCTHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS" - -#PROFILE="-Mprof=func" -#PROFILE="-Mprof=lines" -#PROFILE="-Mprof=func,mpi" -PROFILE= -if test "$MARCCODECOV" = "ON" -then -PROFILE="-prof-gen=srcpos" -fi - -FORT_OPT="-c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB" -if test "$MTHREAD" = "OPENMP" -then - FORT_OPT=" $FORT_OPT -openmp" - if test "$OMP_COMPAT" = "YES" - then - FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat" - fi -else -# FORT_OPT=" $FORT_OPT -auto " - FORT_OPT=" $FORT_OPT -save -zero" -fi - -FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -# determine DAMASK version -HIT=0 -for arg in "$@" -do - if [ $HIT = 1 ] - then - DAMASKPATH=`dirname $arg` - break - elif [ ${arg:0:2} = -u -o ${arg:0:2} = -U ] - then - HIT=1 - fi -done -read DAMASKVERSION < $DAMASKPATH/../VERSION -DAMASKVERSION="'"$DAMASKVERSION"'" - -# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3 -DFORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - -if test "$MARCDEBUG" = "ON" -then - FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3 - DFORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2014 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - -fi - -FORTLOWT="$FORTLOW" -FORTRANT="$FORTRAN" -FORTHIGHT="$FORTHIGH" - -FORTRANMNF="$FCOMP -c $FDEFINES " -CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE" - -FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main" -CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include" - - -BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL" -NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES " -NVCCLIB="ar rvl" -NVCCLD=icc -BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORT90HIGH="$BCSFORTHIGH" -if test "$MARCDEBUG" = "ON" -then - BCSFORTRAN=$BCSFORTLOW - BCSFORTHIGH=$BCSFORTLOW - BCSFORT90HIGH=$BCSFORTLOW -fi - -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - fi -# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines -# if test $MPITYPE = intelmpi -# then -# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include" -# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# fi - if test $MPITYPE = intelmpi - then - LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - fi -else - LOAD="$FCOMP $LINK_OPT -o " - LOADT="$FCOMP $LINK_OPT -o " -fi - -if test "$MARC_DLL" = MARC_DLL -then - FORTLOW="$FORTLOW -fpp -fPIC" - FORTRAN="$FORTRAN -fpp -fPIC" - FORTHIGH="$FORTHIGH -fpp -fPIC" - FORTRANMNF="$FORTRANMNF -fpp -fPIC" - CC="$CC -fPIC" - CCMNF="$CCMNF -fPIC" - CC_CASI="$CC_CASI -fPIC" - CCLOW_CASI="$CCLOW_CASI -fPIC" - CCHIGH_CASI="$CCHIGH_CASI -fPIC" - LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread" - LINK_MARC_DLL="-shared -fPIC" - LOAD_DLL=$LOAD - LOADT_DLL=$LOADT - EXT_DLL="so" -fi - - -XLIBS="-L/usr/X11/lib -lX11 " - -# -# define archive and ranlib syntax -# - -ARC="ar rvl" -ARD="ar dvl" -ARX="ar xl" -RAN="" - -# -# choose which libraries you want to use ( e.g. blas ) -# - -if test "$VKISOLVER" = VKI -then - VKISOLVERLIBS="$MARC_LIB/vkisolver.a" -else - VKISOLVERLIBS= -fi - -if test "$CASISOLVER" = CASI -then - CASISOLVERLIBS="$MARC_LIB/casilib.a" -else - CASISOLVERLIBS= -fi - -MF2SOLVERLIBS= -if test "$MF2SOLVER" = MF2PARALLEL -then - MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \ - $MARC_LIB/mf2parallel/libsym.a \ - $MARC_LIB/mf2parallel/libmet.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libnum.a \ - $MARC_LIB/mf2parallel/libutl.a \ - $MARC_LIB/mf2parallel/libr8.a \ - $MARC_LIB/mf2parallel/libz.a " -fi - -if test "$INTELSOLVER" = PARDISO -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a" - else - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a" - fi -else - INTELSOLVERLIBS= -fi - -if test "$MUMPSSOLVER" = MUMPS -then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - if test $MPITYPE = none - then - MUMPSSOLVERLIBS2= - echo hello > /dev/null - fi - if test $MPITYPE = intelmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a " - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a " - fi - fi - if test $MPITYPE = hpmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a" - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a" - fi - fi -else - MUMPSSOLVERLIBS= - MUMPSSOLVERLIBS2= -fi - -if test "$BCSGPUSOLVER" = BCSGPU -then - BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a " - MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda " - MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda " - MARCCUDALIBS=$MARCCUDALIBS1 - CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda " -else - BCSSOLVERLIBS="${MARC_LIB}/bcslib.a " -fi - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group" -else - MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group" -fi - -SECLIBS="-L$MARC_LIB -llapi" - -SOLVERLIBS="${BCSSOLVERLIBS} \ - ${INTELSOLVERLIBS} ${MF2SOLVERLIBS} -Wl,--start-group $MKLLIB ${MUMPSSOLVERLIBS2} \ - $MARC_MKL/libiomp5.a -Wl,--end-group \ - $MARC_LIB/blas_src.a ${VKISOLVERLIBS} ${CASISOLVERLIBS} " -SOLVERLIBS_DLL=${SOLVERLIBS} - -MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}" -MRCLIBSPAR="$MARC_LIB/clib.a" -STUBS="$MARC_LIB/stubs.a " -MNFLIBS="$MARC_LIB/libmnf.a" -MDUSER="$MARC_LIB/md_user.a" - -OPENMP="-openmp" - -SYSLIBS=" $OPENMP -lpthread " - -# Uncomment the following lines to turn on the trace and comment out the next 4 lines -# if test $MPITYPE = intelmpi -# then -# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \ -# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt" -# fi -if test $MPITYPE = intelmpi -then - SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt $OPENMP -threads -lpthread" -fi - -SYSLIBSPAR=" " - -MARC_DLL_CODES="runmarc.f" - - -BLAS_SRC="dzero.f icopy.f izero.f" -if test "$_OEM_NASTRAN" -ne 0 -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f" - else - BLAS_SRC="ALL" - fi -fi - -LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \ - omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \ - elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \ - cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \ - inertie.f em_sso072.f cn_fol3d_qpatch6.f" -if test "$MARC_INTEGER_SIZE" = "i8" ; then - LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f" -fi -LOW_OPT_CODES_CASI="" - -HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \ - dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \ - dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f cn_qsort4_11.f " - - -HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c" - -MAXNUM=1000000 diff --git a/installation/mods_MarcMentat/2014/Marc_tools/include_linux64.original b/installation/mods_MarcMentat/2014/Marc_tools/include_linux64.original deleted file mode 100644 index c1bc09a3b..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/include_linux64.original +++ /dev/null @@ -1,679 +0,0 @@ -# -# General definitions for the Marc 2014 version -# -# EM64T -# ( LP64 - i4 version) -# (ILP64 - i8 version) -# -# Linux RedHat 5.7 -# -# 64 bit MPI version -# -# Intel(R) Fortran Compiler -# Version 13.0.1 -# -# Intel(R) C Compiler -# Version 13.0.1 -# -# MKL Libraries: -# Intel(R) MKL 10.3 -# -# DATE -# -# To check the O/S level, type: -# uname -a -# -# Distributed parallel MPI libraries: -# 1) HP MPI 2.3 -# To check the mpi version, type: -# mpirun -version -# 2) Intel MPI 4.0 -# To check the mpi version, type: -# mpirun -version -# -# To check the Compiler level, type using the compiler -# installation path: -# ifort -V -# icc -V -# -# REMARKS : This file contains the definitions of variables used during -# compilation loading and use of the MARC programmes . The -# current machine type is identified by means of the variable -# MACHINE , defined below. -# -# -# MPI_ROOT: root directory in which mpi shared libraries, etc. are located -# DIRJOB : directory in which spawned jobs should look for Marc input -# MPI_ARCH: system architecture -# MPI_EPATH: path where executable resides -# - -REVISION="VERSION, BUILD" -HOSTNAME=`hostname` - -# find available memory in Mbyte on the machine -# can be set explicitly -MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'` - -# set _OEM_NASTRAN to 1 for MD Nastran build -# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable -_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}" - -# uncomment the following line for an autoforge build -#AUTOFORGE=1 -AUTOFORGE=0 -export AUTOFORGE - -# integer size -if test "$MARC_INTEGER_SIZE" = "" ; then - INTEGER_PATH= -else - INTEGER_PATH=/$MARC_INTEGER_SIZE -fi - -FCOMP=ifort - -# -# settings for Metis -# -METIS="-I$METIS_SOURCE" -METISLIBS="$MARC_LIB/metis.a " - -# -# settings for MPI -# -# RCP and RSH are used for parallel network runs -# replace with similar commands like rsh if needed -RCP=/usr/bin/scp -RSH=/usr/bin/ssh -# - - -MPI_DEFAULT=intelmpi -MPI_OTHER=hpmpi - -MPITYPE=$MPI_DEFAULT - -if test $AUTOFORGE -then - if test $AUTOFORGE = 1 - then - MPITYPE=none - fi -fi - - -# overrule MPITYPE setting with environmental variable MARC_MPITYPE -if test $MARC_MPITYPE -then - MPITYPE=$MARC_MPITYPE -fi - -# always set MPITYPE to none for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - MPITYPE=none -fi - -# Edit following lines to build with GPGPU version of BCS Solver for -# NVIDIA platforms -#BCSGPUSOLVER=NONE -BCSGPUSOLVER=BCSGPU - -SOLVERFLAGS= -if test "$BCSGPUSOLVER" = BCSGPU -then - SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA" - BCS_DIR=bcsgpusolver - export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH - export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH -else - BCS_DIR=bcssolver -fi -# -# settings for MPI -# -DDM= -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - FCOMPMPI=mpif90 - export MPI_ROOT=$MARC_HPMPI - export MPI_REMSH=$RSH - export MPI_F77=$FCOMP - ARCHITECTURE=linux_amd64 - DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI" - MPI_CLEAN= - export MPI_EPATH=$MARC_BIN - export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH - export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1" -# Below line is moved in run_marc file -# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN" - if test -n "$MSC_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE" - fi - if test -n "$LM_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE" - fi - export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x" - RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f " - RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np " - RUN_JOB0= - fi - if test $MPITYPE = intelmpi - then - INTELMPI_VERSION=HYDRA - FCOMPMPI=mpiifort - MPI_ROOT=$MARC_INTELMPI - DDM="-I${MPI_ROOT}/include64 -DDDM" - PATH=$MPI_ROOT/bin64:$PATH - export PATH - LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - if test $INTELMPI_VERSION = HYDRA - then - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall" - else - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile " - fi - RUN_JOB0= - MPI_CLEAN= - MPI_EPATH=$MARC_BIN - MPIR_HOME=$MPI_ROOT - MPICH_F77=$FCOMP - MPICH_F77LINKER=$FCOMP - export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER - I_MPI_PIN_DOMAIN=node - export I_MPI_PIN_DOMAIN - fi -else - MPI_ROOT=$MARC_DUMMYMPI - export MPI_ROOT=$MARC_DUMMYMPI - DDM="-I$MPI_ROOT/include" -fi - -# -# variables for the "maintain" script -# - -MACHINENAME=LINUX -MACHINE64BIT=yes -MACHINE=Linux_EM64T -DEV=/dev/tape -GETLOG="whoami" -CLEAR="clear" -MY_UNAME=`uname -a` - -# Edit following 2 lines to build with VKI Solver -#VKISOLVER=VKI -VKISOLVER=NONE - -# Edit following 2 lines to build with CASI Solver -CASISOLVER=CASI -#CASISOLVER=NONE - -# Edit following 2 lines to build with MF2 Solver -MF2SOLVER=NONE -#MF2SOLVER=SERIAL -#MF2SOLVER=MF2PARALLEL - -# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO) -#INTELSOLVER=NONE -INTELSOLVER=PARDISO - -# Edit following lines to build with MUMPS -if test "$MARC_INTEGER_SIZE" = "i4" ; then - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -else - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -fi - -# Edit following 2 lines to build MARC dynamic shared library -MARC_DLL=MARC_DLL -MARC_DLL=NONE - -# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - VKISOLVER=NONE - CASISOLVER=NONE - MF2SOLVER=NONE - INTELSOLVER=NONE - MUMPSSOLVER=NONE - BCSGPUSOLVER=NONE - MARC_DLL=NONE -fi - -# -# define Fortran and C compile syntax -# -if test "$VKISOLVER" = VKI -then - SOLVERFLAGS="$SOLVERFLAGS -DVKI" -fi - -if test "$CASISOLVER" = CASI -then - SOLVERFLAGS="$SOLVERFLAGS -DCASI" -fi - -if test "$MF2SOLVER" = MF2PARALLEL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL" -fi -if test "$MF2SOLVER" = MF2SERIAL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL" -fi - -if test "$INTELSOLVER" = PARDISO -then - SOLVERFLAGS="$SOLVERFLAGS -DPARDISO" -fi - -if test "$MUMPSSOLVER" = MUMPS -then - SOLVERFLAGS="$SOLVERFLAGS -DMUMPS" -fi - - -if test "$MARC_DLL" = MARC_DLL -then - SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL" -fi - -LINK_OPT= -DEBUG_OPT= -C_DEBUG_OPT= - -#Uncomment following line to build Marc in debuggable mode -MARCDEBUG= -#MARCDEBUG="ON" - -if test "$MARCDEBUG" = "ON" -then - LINK_OPT="-debug -traceback" - DEBUG_OPT="-debug -traceback" - C_DEBUG_OPT="-debug -traceback" -fi - - -MARCCHECK= -#MARCCHECK="ON" -if test "$MARCCHECK" = "ON" -then - DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv " - C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv " -fi - -MARCCODECOV= -#MARCCODECOV="ON" - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - I8FFLAGS= - I8DEFINES= - I8CDEFINES= - I8CASIDEFS= -else - I8FFLAGS="-i8" - I8DEFINES="-DI64" - I8CDEFINES="-U_DOUBLE -D_SINGLE" - I8CASIDEFS="-DCASI_64BIT_INT=1" -fi - -MTHREAD=OPENMP -if test "$MARC_OPENMP" = "NONE" ; then - MTHREAD=NONE -fi -#MTHREAD=NONE -if test "$_OEM_NASTRAN" -ne 0 -then -MTHREAD=NONE -fi - -OMP_COMPAT=NO -OMP_COMPAT=YES -if test "$MTHREAD" = "NONE" -then -OMP_COMPAT=NO -fi - -CDEFINES= -FDEFINES= - -if test "$_OEM_NASTRAN" -ne 0 -then - CDEFINES="$CDEFINES -D_OEM_NASTRAN" - FDEFINES="$FDEFINES -D_OEM_NASTRAN" -fi - -FDEFINES="$FDEFINES -D_IMPLICITNONE" - -if test "$_OEM_NASTRAN" -eq 0 -then - FDEFINES="$FDEFINES -DMKL -DOPENMP" -fi - -if test "$OMP_COMPAT" = "YES" -then - FDEFINES="$FDEFINES -DOMP_COMPAT" -fi - -# -D_MSCMARC -FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT" -CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES" - -CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS" -if test "$_OEM_NASTRAN" -ne 0 -then - CINCL="$CINCL -I../../include" -fi - -CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - -if test "$MARCDEBUG" = "ON" -then - CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -fi - -LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel" -CCT="$CC" -CCTLOW="$CCLOW" -CCTHIGH="$CCHIGH" - -CC_CASI="$CC -c99 $I8CASIDEFS" -CCLOW_CASI="$CCLOW -c99 $I8CASIDEFS" -CCHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS" - -CCT_CASI="$CCT -c99 $I8CASIDEFS" -CCTLOW_CASI="$CCLOW -c99 $I8CASIDEFS" -CCTHIGH_CASI="$CCHIGH -c99 $I8CASIDEFS" - -#PROFILE="-Mprof=func" -#PROFILE="-Mprof=lines" -#PROFILE="-Mprof=func,mpi" -PROFILE= -if test "$MARCCODECOV" = "ON" -then -PROFILE="-prof-gen=srcpos" -fi - -FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB" -if test "$MTHREAD" = "OPENMP" -then - FORT_OPT=" $FORT_OPT -openmp" - if test "$OMP_COMPAT" = "YES" - then - FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat" - fi -else -# FORT_OPT=" $FORT_OPT -auto " - FORT_OPT=" $FORT_OPT -save -zero" -fi - -FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -if test "$MARCDEBUG" = "ON" -then - FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" -fi - -FORTLOWT="$FORTLOW" -FORTRANT="$FORTRAN" -FORTHIGHT="$FORTHIGH" - -FORTRANMNF="$FCOMP -c $FDEFINES " -CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE" - -FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main" -CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include" - - -BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL" -NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES " -NVCCLIB="ar rvl" -NVCCLD=icc -BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORT90HIGH="$BCSFORTHIGH" -if test "$MARCDEBUG" = "ON" -then - BCSFORTRAN=$BCSFORTLOW - BCSFORTHIGH=$BCSFORTLOW - BCSFORT90HIGH=$BCSFORTLOW -fi - -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - fi -# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines -# if test $MPITYPE = intelmpi -# then -# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include" -# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# fi - if test $MPITYPE = intelmpi - then - LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - fi -else - LOAD="$FCOMP $LINK_OPT -o " - LOADT="$FCOMP $LINK_OPT -o " -fi - -if test "$MARC_DLL" = MARC_DLL -then - FORTLOW="$FORTLOW -fpp -fPIC" - FORTRAN="$FORTRAN -fpp -fPIC" - FORTHIGH="$FORTHIGH -fpp -fPIC" - FORTRANMNF="$FORTRANMNF -fpp -fPIC" - CC="$CC -fPIC" - CCMNF="$CCMNF -fPIC" - CC_CASI="$CC_CASI -fPIC" - CCLOW_CASI="$CCLOW_CASI -fPIC" - CCHIGH_CASI="$CCHIGH_CASI -fPIC" - LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread" - LINK_MARC_DLL="-shared -fPIC" - LOAD_DLL=$LOAD - LOADT_DLL=$LOADT - EXT_DLL="so" -fi - - -XLIBS="-L/usr/X11/lib -lX11 " - -# -# define archive and ranlib syntax -# - -ARC="ar rvl" -ARD="ar dvl" -ARX="ar xl" -RAN="" - -# -# choose which libraries you want to use ( e.g. blas ) -# - -if test "$VKISOLVER" = VKI -then - VKISOLVERLIBS="$MARC_LIB/vkisolver.a" -else - VKISOLVERLIBS= -fi - -if test "$CASISOLVER" = CASI -then - CASISOLVERLIBS="$MARC_LIB/casilib.a" -else - CASISOLVERLIBS= -fi - -MF2SOLVERLIBS= -if test "$MF2SOLVER" = MF2PARALLEL -then - MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \ - $MARC_LIB/mf2parallel/libsym.a \ - $MARC_LIB/mf2parallel/libmet.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libnum.a \ - $MARC_LIB/mf2parallel/libutl.a \ - $MARC_LIB/mf2parallel/libr8.a \ - $MARC_LIB/mf2parallel/libz.a " -fi - -if test "$INTELSOLVER" = PARDISO -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a" - else - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a" - fi -else - INTELSOLVERLIBS= -fi - -if test "$MUMPSSOLVER" = MUMPS -then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - if test $MPITYPE = none - then - MUMPSSOLVERLIBS2= - echo hello > /dev/null - fi - if test $MPITYPE = intelmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a " - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a " - fi - fi - if test $MPITYPE = hpmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a" - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a" - fi - fi -else - MUMPSSOLVERLIBS= - MUMPSSOLVERLIBS2= -fi - -if test "$BCSGPUSOLVER" = BCSGPU -then - BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a " - MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda " - MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda " - MARCCUDALIBS=$MARCCUDALIBS1 - CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda " -else - BCSSOLVERLIBS="${MARC_LIB}/bcslib.a " -fi - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - MKLLIB="$MARC_MKL/libmkl_blacs_lp64.a $MARC_MKL/libmkl_scalapack_lp64.a $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a " -else - MKLLIB="$MARC_MKL/libmkl_blacs_ilp64.a $MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a " -fi - -SECLIBS="-L$MARC_LIB -llapi" - -SOLVERLIBS="${BCSSOLVERLIBS} \ - ${INTELSOLVERLIBS} ${MF2SOLVERLIBS} -Wl,--start-group $MKLLIB ${MUMPSSOLVERLIBS2} \ - $MARC_MKL/libiomp5.a -Wl,--end-group \ - $MARC_LIB/blas_src.a ${VKISOLVERLIBS} ${CASISOLVERLIBS} " -SOLVERLIBS_DLL=${SOLVERLIBS} - -MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}" -MRCLIBSPAR="$MARC_LIB/clib.a" -STUBS="$MARC_LIB/stubs.a " -MNFLIBS="$MARC_LIB/libmnf.a" -MDUSER="$MARC_LIB/md_user.a" - -OPENMP="-openmp" - -SYSLIBS=" $OPENMP -lpthread " - -# Uncomment the following lines to turn on the trace and comment out the next 4 lines -# if test $MPITYPE = intelmpi -# then -# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \ -# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt" -# fi -if test $MPITYPE = intelmpi -then - SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt $OPENMP -threads -lpthread" -fi - -SYSLIBSPAR=" " - -MARC_DLL_CODES="runmarc.f" - - -BLAS_SRC="dzero.f icopy.f izero.f" -if test "$_OEM_NASTRAN" -ne 0 -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f" - else - BLAS_SRC="ALL" - fi -fi - -LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \ - omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \ - elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \ - cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \ - inertie.f em_sso072.f cn_fol3d_qpatch6.f" -if test "$MARC_INTEGER_SIZE" = "i8" ; then - LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f" -fi -LOW_OPT_CODES_CASI="" - -HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \ - dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \ - dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f cn_qsort4_11.f " - - -HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c" - -MAXNUM=1000000 diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_damask b/installation/mods_MarcMentat/2014/Marc_tools/run_damask deleted file mode 100644 index 8c70cf77e..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_damask +++ /dev/null @@ -1,4085 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_h b/installation/mods_MarcMentat/2014/Marc_tools/run_damask_h deleted file mode 100644 index aa22a1d24..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_h +++ /dev/null @@ -1,4085 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_h $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_h $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_hmp b/installation/mods_MarcMentat/2014/Marc_tools/run_damask_hmp deleted file mode 100644 index ec1076b47..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_hmp +++ /dev/null @@ -1,4085 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_l b/installation/mods_MarcMentat/2014/Marc_tools/run_damask_l deleted file mode 100644 index 388e2f056..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_l +++ /dev/null @@ -1,4085 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_l $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_l $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_lmp b/installation/mods_MarcMentat/2014/Marc_tools/run_damask_lmp deleted file mode 100644 index 02109d518..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_lmp +++ /dev/null @@ -1,4085 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_mp b/installation/mods_MarcMentat/2014/Marc_tools/run_damask_mp deleted file mode 100644 index c96f82df8..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_damask_mp +++ /dev/null @@ -1,4085 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Marc_tools/run_marc.original b/installation/mods_MarcMentat/2014/Marc_tools/run_marc.original deleted file mode 100644 index 667f4516e..000000000 --- a/installation/mods_MarcMentat/2014/Marc_tools/run_marc.original +++ /dev/null @@ -1,4138 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo selects i4 or i8 version # -# default: i4 or via defaults file run_marc_defaults # -# the -mo option will override # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - mode=i4 - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "error, version mode must be i4 or i8" - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i4 or i8" - echo " " - echo " use -mo i4 or -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usersubname= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=`dirname $value`/`$BASENAME $value .f` - basefile=`$BASENAME $value` - if test ${basefile##*.} = F - then - user=`dirname $value`/`$BASENAME $value .F` - fi - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - if test -f $user.f - then - usersubname=$user.f - elif test -f $user.F - then - usersubname=$user.F - else - usersubname=$user - fi - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$usersubname" - then - if test ! -f $usersubname - then - error="$error -user subroutine file $usersubname not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" - fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $usersubname -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $usersubname -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=`dirname $value`/`$BASENAME $value .f` - basefile=`$BASENAME $value` - if test ${basefile##*.} = F - then - user=`dirname $value`/`$BASENAME $value .F` - fi - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - if test -f $user.f - then - usersubname=$user.f - elif test -f $user.F - then - usersubname=$user.F - else - usersubname=$user - fi - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# - - if test "$user" - then -# program=$user.marc - program=$DIRJOB/`$BASENAME $user .f`.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$DIRJOB/`$BASENAME $user .f`.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test ${basefile##*.} = f - then - ln -sf "$user.f" "$usersub" - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user.f $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user.f on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser.f 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user.f on host `hostname`" - fi - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi - fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user.f $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user.f on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser.f 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user.f on host `hostname`" - fi - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null - -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi - fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/edit_window b/installation/mods_MarcMentat/2014/Mentat_bin/edit_window deleted file mode 100644 index b732a7694..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/edit_window +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# This script opens a window running an editor. -# The command to invoke the editor is specified during DAMASK installation - -%EDITOR% $* \ No newline at end of file diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/edit_window.original b/installation/mods_MarcMentat/2014/Mentat_bin/edit_window.original deleted file mode 100644 index 64c0a68d0..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/edit_window.original +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# This script opens a window running an editor. The default window is an -# xterm, and the default editor is vi. These may be customized. - -dir= -for d in /usr/bin /usr/bin/X11; do - if test -x "$d/xterm"; then - dir="$d" - break - fi -done - -if test -z "$dir"; then - echo "$0: Could not find xterm" - exit 1 -fi - -"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $* diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill1.original b/installation/mods_MarcMentat/2014/Mentat_bin/kill1.original deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill1.original +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill4 b/installation/mods_MarcMentat/2014/Mentat_bin/kill4 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill4 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill5 b/installation/mods_MarcMentat/2014/Mentat_bin/kill5 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill5 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill6 b/installation/mods_MarcMentat/2014/Mentat_bin/kill6 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill6 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill7 b/installation/mods_MarcMentat/2014/Mentat_bin/kill7 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill7 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill8 b/installation/mods_MarcMentat/2014/Mentat_bin/kill8 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill8 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/kill9 b/installation/mods_MarcMentat/2014/Mentat_bin/kill9 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/kill9 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit1.original b/installation/mods_MarcMentat/2014/Mentat_bin/submit1.original deleted file mode 100644 index 035070b21..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit1.original +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=/nethome/storage/raid3/f.roters/temp/msc/marc2014 -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit4 b/installation/mods_MarcMentat/2014/Mentat_bin/submit4 deleted file mode 100644 index f25a2004e..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit4 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit5 b/installation/mods_MarcMentat/2014/Mentat_bin/submit5 deleted file mode 100644 index 786f6efc5..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit5 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit6 b/installation/mods_MarcMentat/2014/Mentat_bin/submit6 deleted file mode 100644 index 6a5d9d79f..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit6 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit7 b/installation/mods_MarcMentat/2014/Mentat_bin/submit7 deleted file mode 100644 index d0e3be475..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit7 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit8 b/installation/mods_MarcMentat/2014/Mentat_bin/submit8 deleted file mode 100644 index d466fc6ab..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit8 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_bin/submit9 b/installation/mods_MarcMentat/2014/Mentat_bin/submit9 deleted file mode 100644 index 207a61803..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_bin/submit9 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms b/installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms deleted file mode 100644 index 2ab6c9272..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms +++ /dev/null @@ -1,3219 +0,0 @@ -#ifndef AUTOFORGE -popmenu job_title_pm file jobs.ms -popdown job_title_ok file jobs.ms -#ifndef QT_MENTAT -popmenu marc_input_style_pm file job_common.ms -popmenu marc_input_style_run_adv_pm file job_common.ms -popmenu marc_version_run_pm file job_common.ms -#endif - -group job_solver_gr file job_common.ms -group user_domains_gr file domain_decomposition.ms -group user_domains_generate_gr file domain_decomposition.ms -group user_domains_tail_gr file domain_decomposition.ms -group job_solver_opts_gr file job_common.ms -popmenu ddm_options file job_common.ms - -#ifdef QT_MENTAT -browser edit_browser file file.ms -browser directory_browser file file.ms -screen domains file domain_decomposition.ms -#else -popmenu edit_browser_popmenu file file.ms -popmenu directory_browser_popmenu file file.ms -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu usersub_file_browser_pm { - - group { -#endif - - browser usersub_file_browser { - position 0 0 - size 82 72 - text "$usersub_file_browser_label" ($usersub_file_browser_label) - filter "*.f *.f90" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$usersub_file_browser_command" ($usersub_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC User Subroutine File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu host_file_browser_pm { - - group { -#endif - - browser host_file_browser { - position 0 0 - size 82 72 - text "$host_file_browser_label" ($host_file_browser_label) - filter "*" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$host_file_browser_command" ($host_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC Host File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_popmenu { - -#ifdef QT_MENTAT - text "RUN JOB" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 52 4 - text "RUN JOB" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - button { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 24 4 - text "USER SUBROUTINE FILE" -#ifdef QT_MENTAT - browser usersub_file_browser -#else - popmenu usersub_file_browser_pm -#endif - settext $usersub_file_browser_label "SELECT USER SUBROUTINE FILE" - set $usersub_file_browser_command "*job_usersub_file" - help job_usersub_file - } - - toggle { - position +26 = - size 22 4 - text "SELECTED USER SUBS" - toggle job_usersubs - help job_run_seluser - visible job_usersubs - popmenu job_usersub_pm - } - - display { - position 1 +4 - size 50 4 - display job_usersub_file - } - - button { - position 1 +4 - size 12 4 - text "EDIT" - command "*job_edit_usersub_file" - visible job_usersub_file - } - - button { - position +12 = - size 12 4 - text "CLEAR" - command "*job_clear_usersub_file" - visible job_usersub_file - } - - roller { - position +12 = - size 26 4 - nvalues 3 - texts "COMPILE / NO SAVE" - "COMPILE AND SAVE" - "RUN SAVED EXECUTABLE" - help job_run_compile - roller "job_option user_source" - visible job_usersub_file -#ifdef QT_MENTAT - commands "*job_option user_source:compile_nosave" - "*job_option user_source:compile_save" - "*job_option user_source:run_saved" -#else - popmenu job_user_source_pm -#endif - } - - toggle { - position 1 +6 - size 22 4 - text "PARALLELIZATION/\{GPU}" - help job_run_parallel - toggle "or(*job_option parallel:on, \ - *job_option assem_recov_multi_threading:on, \ - solver_multi_procs, \ - solver_multi_threads, \ - and(job_solver_mfront_sparse,\ - job_nonsym_off,\ - *job_option solver_use_gpu:on))" - popmenu job_run_parallelization_pm - set $popname2 "job_run_parallelization_pm" - } - - frame { - position +22 = - size 28 16 - border_width 1 - border_color black - - group { - - display { - position 0 0 - size 28 4 - display job_ddm_domains - } - - display { - position = +4 - size 28 4 - display job_assem_recov_nthreads - } - - display { - position = +4 - size 28 4 - display job_solver_procs - visible solver_allows_multi_procs - } - - display { - position = = - size 28 4 - display job_solver_threads - visible "and(solver_allows_multi_threads,\ - not(and(job_solver_mfront_sparse,\ - *job_option parallel:on)))" - } - - display { - position = +4 - size 28 4 - display job_solver_gpu - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } - } - } - - button { - position 1 +18 - size 8 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - -# see also job_common.ms -# see also the ADVANCED JOB SUBMISSION popmenu in this file - - label { - position +10 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_pm -#endif - help job_option_input_style - } - - button { - position +20 = - size 13 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position 1 +6 - size 16 6 - text "SUBMIT (1)" - command "*submit_job 1 *monitor_job" - } - - button { - position +16 = - size 16 6 - text "ADV. JOB SUBM." - popmenu job_submit_adv_pm - } - - button { - position +16 = - size 18 6 - text "DAMASK" - popmenu damask - } - - button { - position 1 +6 - size 16 6 - text "UPDATE" - command "*update_job" - } - - button { - position +16 = - size 16 6 - text "MONITOR" - command "*monitor_job" - } - - button { - position +16 = - size 18 6 - text "KILL" - command "*kill_job *monitor_job" - } - - label { - position 1 +7 - size 32 4 - text "STATUS" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_status" - } - - label { - position -32 +4 - size 32 4 - text "CURRENT INCREMENT (CYCLE)" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_increment" - } - - label { - position -32 +4 - size 32 4 - text "SINGULARITY RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_singularity_ratio" - } - - label { - position -32 +4 - size 32 4 - text "CONVERGENCE RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_convergence_ratio" - } - - label { - position 1 +4 - size 32 4 - text "ANALYSIS TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_analysis_time" - } - - label { - position -32 +4 - size 32 4 - text "WALL TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_time" - } - - frame { - position 1 +4 - size 50 8 - - group { - - frame { - position 0 0 - size 50 8 - text "TOTAL" - border_width 1 - border_color black - group { - - label { - position +6 = - size 13 4 - text "CYCLES" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_cycles" - border_width 1 - border_color black - } - - label { - position -13 +4 - size 13 4 - text "SEPARATIONS" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_separations" - border_width 1 - border_color black - } - - label { - position +10 -4 - size 11 4 - text "CUT BACKS" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_cut_backs" - border_width 1 - border_color black - } - - label { - position -11 +4 - size 11 4 - text "REMESHES" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_remeshes" - border_width 1 - border_color black - } - } - } - } - } - - label { - position 1 +8 - size 19 4 - text "EXIT NUMBER" - border_width 1 - border_color black - } - - integer { - position +19 = - size 10 4 - display "job_exit" - } - - button { - position +10 = - size 21 4 - text "EXIT MESSAGE" - popmenu job_exit_msg_pm - help exit_message - } - - label { - position 1 +6 - size 7 4 - text "EDIT" - border_width 1 - border_color black - } - - button { - position +7 = - size 12 4 - text "OUTPUT FILE" - command "*job_edit_output" - } - - button { - position +12 = - size 9 4 - text "LOG FILE" - command "*job_edit_log_file" - } - - button { - position +9 = - size 12 4 - text "STATUS FILE" - command "*job_edit_status_file" - } - - button { - position +12 = - size 10 4 - text "ANY FILE" - settext $edit_browser_label "EDIT FILE" - set $edit_browser_command "*edit_file" -#ifdef QT_MENTAT - browser edit_browser -#else - popmenu edit_browser_popmenu -#endif - help edit_file - } - - popdown { - position 1 +6 - size 32 4 -#ifdef QT_MENTAT - text "OPEN POST FILE (MODEL PLOT RESULTS MENU)" - command "@popdown(job_properties_pm) @main(results) @popup(modelplot_pm) *post_open_default" -#else - text "OPEN POST FILE (RESULTS MENU)" - screen results - command "*post_open_default" -#endif - } - - button { - position 1 +6 - size 12 8 - text "RESET" - command "*job_submit_reset" - } - - popdown { - position +38 = - size 12 8 - text "OK" - } - } - - window job_run_wi { - parent mentat - origin 35 1 - size 52 115 - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_usersub_pm { - -#ifdef QT_MENTAT - text "CURRENTLY SELECTED USER SUBROUTINES" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 66 4 - text "CURRENTLY SELECTED USER SUBROUTINES" - } -#endif - - display { - position 1 +5 - size 64 86 - display "job_usersubs" - } - - popdown { - position 27 +88 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 66 102 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_submit_adv_pm { - -#ifdef QT_MENTAT - text "ADVANCED JOB SUBMISSION" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "ADVANCED JOB SUBMISSION" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - label { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 19 4 - text "INITIAL ALLOCATION" - border_width 1 - border_color black - } -#ifdef QT_MENTAT - label { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - } -#else - button { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - command "*job_param general_init_allocation" - } -#endif - text { - position +15 = - size 10 4 - display "job_param_value_general_init_allocation" - command "*job_param general_init_allocation" - help job_param_general_init_allocation - } - - label { - position +10 = - size 4 4 - text "MB" - border_width 1 - border_color black - } - - toggle { - position 1 +5 - size 32 4 - text "OUT-OF-CORE ELEMENT STORAGE" - help job_param_elsto - toggle "*job_option elsto:on" - true_command "*job_option elsto:on" - false_command "*job_option elsto:off" - } - - toggle { - position 1 +4 - size 32 4 - text "OUT-OF-CORE INCREMENTAL BACKUP" - help job_param_inc_backup_storage - toggle "*job_option inc_backup_storage:out_of_core" - true_command "*job_option inc_backup_storage:out_of_core" - false_command "*job_option inc_backup_storage:in_core" - } - - toggle { - position +34 = - size 14 4 - text "CHECK SIZES" - help job_run_check - toggle "*job_option check:on" - true_command "*job_option check:on" - false_command "*job_option check:off" - } - - label { - position 1 +6 - size 16 4 - text "INTEGER SIZE" - border_width 1 - border_color black - } - - roller { - position +16 = - size 32 4 - nvalues 3 - texts "DEFAULT" - "4-BYTE INTEGERS" - "8-BYTE INTEGERS" -#ifdef QT_MENTAT - commands "*job_option marc_integer_size:default" - "*job_option marc_integer_size:i4" - "*job_option marc_integer_size:i8" -#else - popmenu marc_integer_size_pm -#endif - help job_run_intsize - roller "job_option marc_integer_size" - } - - frame { - position 1 +6 - size 48 12 - text "MARC INPUT FILE" - border_width 1 - border_color black - - group { - - label { - position 0 4 - size 9 4 - text "VERSION" - border_width 1 - border_color black - } - - roller { - position +9 = - size 14 4 - nvalues 18 - nvisible 18 - texts "DEFAULT" -#if 0 - "2014" -#endif - "2013.1" - "2013" - "2012" - "2011" - "2010.2" - "2010" - "2008" - "2007" - "2005R3" - "2005" - "2003" - "2001" - "2000" -#if 0 - "8" -#endif - "K7" - "K6.2" - "K5" - "K4" - help job_param_version - rollers "job_input_version_default" -#if 0 - "job_input_version_2014" -#endif - "job_input_version_2013.1" - "job_input_version_2013" - "job_input_version_2012" - "job_input_version_2011" - "job_input_version_2010.2" - "job_input_version_2010" - "job_input_version_2008" - "job_input_version_2007" - "job_input_version_2005r3" - "job_input_version_2005" - "job_input_version_2003" - "job_input_version_2001" - "job_input_version_2000" -#if 0 - "job_input_version_8" -#endif - "job_input_version_k7" - "job_input_version_k6" - "job_input_version_k5" - "job_input_version_k4" -#ifdef QT_MENTAT - commands "*job_option version:default" -#if 0 - "*job_option version:2014" -#endif - "*job_option version:2013.1" - "*job_option version:2013" - "*job_option version:2012" - "*job_option version:2011" - "*job_option version:2010.2" - "*job_option version:2010" - "*job_option version:2008" - "*job_option version:2007" - "*job_option version:2005r3" - "*job_option version:2005" - "*job_option version:2003" - "*job_option version:2001" - "*job_option version:2000" -#if 0 - "*job_option version:8" -#endif - "*job_option version:k7" - "*job_option version:k6" - "*job_option version:k5" - "*job_option version:k4" - visibles "job_allows_input_version_default" -#if 0 - "job_allows_input_version_2014" -#endif - "job_allows_input_version_2013.1" - "job_allows_input_version_2013" - "job_allows_input_version_2012" - "job_allows_input_version_2011" - "job_allows_input_version_2010.2" - "job_allows_input_version_2010" - "job_allows_input_version_2008" - "job_allows_input_version_2007" - "job_allows_input_version_2005r3" - "job_allows_input_version_2005" - "job_allows_input_version_2003" - "job_allows_input_version_2001" - "job_allows_input_version_2000" -#if 0 - "job_allows_input_version_8" -#endif - "job_allows_input_version_k7" - "job_allows_input_version_k6" - "job_allows_input_version_k5" - "job_allows_input_version_k4" -#else - popmenu marc_version_run_pm -#endif - } - -# see also job_common.ms -# see also the RUN JOB popmenu in this file - - label { - position +14 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_run_adv_pm -#endif - help job_option_input_style - } - - toggle { - position 0 +4 - size 48 4 - text "EXTENDED PRECISION" - help job_run_precision - toggle "*job_option inp_file_prec:extended" - true_command "*job_option inp_file_prec:extended" - false_command "*job_option inp_file_prec:normal" - } - } - } - - button { - position 1 +14 - size 24 4 - text "SCRATCH DIRECTORY" - settext $directory_browser_label "JOB SCRATCH DIRECTORY" - set $directory_browser_command "*job_scratch_directory" -#ifdef QT_MENTAT - browser directory_browser -#else - popmenu directory_browser_popmenu -#endif - help job_scratch_directory - } - - button { - position +24 = - size 24 4 - text "CLEAR" - command "*job_clear_scratch_directory" - visible job_scratch_directory - } - - text { - position 1 +4 - size 48 4 - display job_scratch_dir - command "*job_scratch_directory" - } - -#ifdef DCOM - toggle { - position 1 +6 - size 8 4 - text "\{DCOM}" - toggle "*job_option dcom:on" - help job_run_dcom - true_command "*job_option dcom:on" - false_command "*job_option dcom:off" - visible win32_available - } - - button { - position +8 = - size 12 4 - text "HOSTNAME" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } - - text job_dcom_hostname { - position +12 = - size 28 4 - display "job_dcom_hostname" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } -#endif - - button { - position 1 +6 - size 24 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - - button { - position +24 = - size 24 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position +4 +6 - size 20 4 - text "WRITE INPUT FILE" - command "*job_write_input" - } - - button { - position = +4 - size 20 4 - text "EDIT INPUT FILE" - command "*job_edit_input" - } - - popdown { - position 1 +5 - size 20 6 - text "SUBMIT 1" - command "*submit_job 1 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 1" - command "*execute_job 1 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 2" - command "*submit_job 2 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 2" - command "*execute_job 2 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 3" - command "*submit_job 3 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 3" - command "*execute_job 3 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - -#-------------------------------------------------------------------------------------------------- -popmenu damask { - -#ifdef QT_MENTAT - text "DAMASK.MPIE.DE" -#endif - - group { -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "DAMASK.MPIE.DE" - } -#endif - - label { - position 1 6 - size 13 6 - text "Optimzation" - border_width 1 - border_color black - } - - label { - position +13 = - size 20 6 - text "write Input" - border_width 1 - border_color black - } - - label { - position +18 = - size 30 6 - text "do not write Inp." - border_width 1 - border_color black - } - - label { - position -32 +6 - size 12 6 - text "O2 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 4 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 4 *monitor_job" - } - - label { - position -32 +6 - size 12 6 - text "O1 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 5 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 5 *monitor_job" - } - - label { - position -32 +6 - size 12 6 - text "O0 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 6 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 6 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "CANCEL" - } -} - - - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - mode dialog -} - -#-------------------------------------------------------------------------------------------------- -popmenu job_exit_msg_pm { - -#ifdef QT_MENTAT - text "EXIT MESSAGE" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 86 4 - text "EXIT MESSAGE" - } - - display { - position 1 5 - size 84 74 - display "job_exit_msg" - } -#endif - -#ifdef QT_MENTAT - - text { - position 1 5 - size 84 74 - multiline - readonly - display "job_exit_msg" - } - -#endif - popdown { - position 37 +76 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 86 90 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_user_source_pm { - - window { - parent job_run_wi - origin 25 17 - size 26 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_user_source_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_user_source_gr { - popdown { - position 0 0 - size 26 4 - text "COMPILE / NO SAVE" - command "*job_option user_source:compile_nosave" - } - - popdown { - position = +4 - size 26 4 - text "COMPILE AND SAVE" - command "*job_option user_source:compile_save" - } - - popdown { - position = +4 - size 26 4 - text "RUN SAVED EXECUTABLE" - command "*job_option user_source:run_saved" - } - - popdown { - position = +5 - size 26 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_parallelization_pm { - -#ifdef QT_MENTAT - text "PARALLELIZATION/\{GPU}" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 60 4 - text "PARALLELIZATION/GPU" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 48 28 - group job_ddm_gr - text "DOMAIN DECOMPOSITION" - border_width 1 - border_color black - } - - frame { - position 1 +29 - size 36 13 - group job_assem_recov_gr - text "ASSEMBLY AND RECOVERY" - border_width 1 - border_color black - } - - frame { - position 1 +14 - size 58 31 - group job_parallel_matrix_solver_gr - text "MATRIX SOLVER" - border_width 1 - border_color black - } - - frame { - position 1 +32 - size 48 28 - group job_parallel_env_gr - text "PARALLELIZATION ENVIRONMENT" - border_width 1 - border_color black - visible "or(*job_option parallel:on, \ - solver_multi_procs)" - } - - popdown { - position 24 +30 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 1 - size 60 119 - background_color body - border_width 1 - border_color border - buffering single - } -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_gr { - - toggle { - position 1 4 - size 30 4 - text "USE \{DDM}" - toggle "*job_option parallel:on" - help job_run_ddm_use - true_command "*job_option parallel:on" - false_command "*job_option parallel:off" - } - - frame { - position +2 +5 - size 44 18 - group job_ddm_use_gr - visible "*job_option parallel:on" - } -} - -group job_ddm_use_gr { - roller { - position 0 0 - size 30 4 - nvalues 2 - texts "DECOMPOSITION IN MARC" - "DECOMPOSITION IN MENTAT" - roller "job_option ddm_generator" -#ifdef QT_MENTAT - commands "*job_option ddm_generator:fea_solver" - "*job_option ddm_generator:preprocessor" -#else - popmenu job_ddm_generator_pm -#endif - help job_run_ddm_generator - } - - frame { - position 0 +5 - size 44 8 - group job_ddm_fea_solver_gr - visible "*job_option ddm_generator:fea_solver" - } - - frame { - position = = - size 44 8 - group job_ddm_preprocessor_gr - visible "*job_option ddm_generator:preprocessor" - } - - text { - position 0 +9 - size 22 4 -#ifdef QT_MENTAT - text "Single Input File" -#else - text "SINGLE INPUT FILE" -#endif - readonly - visible "*job_option ddm_generator:fea_solver" - } - - roller { - position = = - size 22 4 - nvalues 2 - texts "MULTIPLE INPUT FILES" - "SINGLE INPUT FILE" - roller "job_option ddm_single_input" - commands "*job_option ddm_single_input:off" - "*job_option ddm_single_input:on" - visible "*job_option ddm_generator:preprocessor" - help job_run_ddm_single_input - } - - roller { - position +23 = - size 21 4 - nvalues 2 - texts "MULTIPLE POST FILES" - "SINGLE POST FILE" - roller "job_option ddm_single_post" - commands "*job_option ddm_single_post:off" - "*job_option ddm_single_post:on" - help job_run_ddm_single_post - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_generator_pm { - - window { - parent mentat - origin 42 19 - size 30 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_generator_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_generator_gr { - - popdown { - position 0 0 - size 30 4 - text "DECOMPOSITION IN MARC" - command "*job_option ddm_generator:fea_solver" - help job_run_ddm_generator - } - - popdown { - position = +4 - size 30 4 - text "DECOMPOSITION IN MENTAT" - command "*job_option ddm_generator:preprocessor" - help job_run_ddm_generator - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - help job_run_ddm_generator - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_fea_solver_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 10 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 0 0 - size 10 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +10 = - size 4 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position +4 = - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method_pm -#endif - } - - button { - position +4 +4 - size 19 4 - text "ADVANCED SETTINGS" -#ifdef QT_MENTAT - popmenu job_ddm_fea_solver_pm -#else - screen job_ddm_fea_solver_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method_pm { - - window { - parent mentat - origin 56 24 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_method_gr { - - popdown { - position 0 0 - size 30 4 - text "METIS BEST" - command "*job_option ddm_method:metis_best" - } - - popdown { - position = +4 - size 30 4 - text "METIS ELEMENT BASED" - command "*job_option ddm_method:metis_element_based" - } - - popdown { - position = +4 - size 30 4 - text "METIS NODE BASED" - command "*job_option ddm_method:metis_node_based" - } - - popdown { - position = +4 - size 30 4 - text "RECURSIVE COORDINATE BISECTION" - command "*job_option ddm_method:recur_coord_bisect" - } - - popdown { - position = +4 - size 30 4 - text "VECTOR" - command "*job_option ddm_method:vector" - } - - popdown { - position = +4 - size 30 4 - text "RADIAL" - command "*job_option ddm_method:radial" - } - - popdown { - position = +4 - size 30 4 - text "ANGULAR" - command "*job_option ddm_method:angular" - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - } -} -#endif - - -#ifdef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_fea_solver_pm { - - text "JOB PARALLELIZATION" -#else -screen job_ddm_fea_solver_sc { - - menu { -#endif - - group { - units 32 120 - -#ifndef QT_MENTAT - label { - position 0 0 - size 32 4 - text "JOB PARALLELIZATION" - } -#endif - - label { - position 0 5 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - -#ifdef QT_MENTAT - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { - -#ifdef QT_MENTAT - position 0 +9 -#else - position 0 +5 -#endif - size 32 76 - text "ADVANCED DECOMPOSITION IN MARC" - border_width 1 - border_color black - - group { - -#ifdef QT_MENTAT - label { - position 1 4 - size 16 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 1 4 - size 16 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +16 = - size 14 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position 1 +4 - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method2_pm -#endif - } - - frame { - position 1 +5 - size 30 20 - group job_ddm_direction_gr - visible "or(*job_option ddm_method:vector, \ - *job_option ddm_method:radial, \ - *job_option ddm_method:angular)" - } - - toggle { - position 1 +21 - size 30 4 - text "DOMAIN ISLAND REMOVAL" - toggle "*job_option ddm_island_removal:on" - true_command "*job_option ddm_island_removal:on" - false_command "*job_option ddm_island_removal:off" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "GRAPH" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "COARSE" - "FINE" - help ddm_decomp_coarse_graph - rollers "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - commands "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "QUADRATIC ELEMENTS" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "GENUINE" - "LINEARIZED" - help job_run_ddm_decomp_linearized - rollers "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - commands "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - } - -#ifdef QT_MENTAT - label { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - help job_param - } -#else - button { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_elem_weight_factor" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } - - toggle { - position 1 +5 - size 30 4 - text "DETECT CONTACT" - toggle "*job_option ddm_detect_contact:on" - true_command "*job_option ddm_detect_contact:on" - false_command "*job_option ddm_detect_contact:off" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - help job_run_ddm_decomp_detect_contact - } - -#ifdef QT_MENTAT - label { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } -#endif - - text { - position +15 = - size 15 4 - command "*set_ddm_contact_tolerance" - display "job_param_value_ddm_contact_tolerance" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } - -#ifdef QT_MENTAT - label { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_contact_constr_factor" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } - } - } - -#ifdef QT_MENTAT - popdown { - position 0 +77 - size 32 8 - text "OK" - } -#else - frame { - position 0 +77 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return -#endif - } -#ifndef QT_MENTAT - window main_window - disable_right_mouse_button - } - - menu transform -} # job_ddm_fea_solver_sc -#else - mode permanent -} # job_ddm_fea_solver_pm -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method2_pm { - - window { - parent mentat - origin 1 22 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_direction_gr { - - button { - position 0 0 - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "*job_option ddm_method:vector" - } - - button { - position = = - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "not(*job_option ddm_method:vector)" - } - - button { - position +15 = - size 15 4 - text "FROM / TO" - command "*job_vector_from_to ddm_sort_direction_x" - } - - text { - position -15 +4 - size 10 4 - command "*job_param ddm_sort_direction_x" - display "job_param_value_ddm_sort_direction_x" - help ddm_job_decomp_user_direction_x - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_y" - display "job_param_value_ddm_sort_direction_y" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_z" - display "job_param_value_ddm_sort_direction_z" - } - - frame { - position 0 +4 - size 30 8 - group job_ddm_sort_point_gr - visible "not(*job_option ddm_method:vector)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_gr { - - label { - position 0 0 - size 14 4 - border_width 1 - border_color black - text "POINT ON AXIS" - } - - roller { - position +14 = - size 10 4 - nvalues 2 - texts "DEFAULT" - "USER" - roller "job_option ddm_sort_point" -#ifdef QT_MENTAT - commands "*job_option ddm_sort_point:default" - "*job_option ddm_sort_point:user" -#else - popmenu job_ddm_sort_point_meth_pm -#endif - } - - button { - position +10 = - size 6 4 - text "SET" - command "*job_position ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position 0 +4 - size 10 4 - command "*job_param ddm_sort_point_x" - display "job_param_value_ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_y" - display "job_param_value_ddm_sort_point_y" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_z" - display "job_param_value_ddm_sort_point_z" - visible "*job_option ddm_sort_point:user" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_sort_point_meth_pm { - - window { - parent mentat - origin 15 35 - size 14 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_sort_point_meth_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_meth_gr { - - popdown { - position 0 0 - size 14 4 - text "DEFAULT" - command "*job_option ddm_sort_point:default" - } - - popdown { - position = +4 - size 14 4 - text "USER DEFINED" - command "*job_option ddm_sort_point:user" - } - - popdown { - position = +5 - size 14 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_preprocessor_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - border_width 1 - border_color black - } - - integer { - position +10 = - size 4 4 - display valid_domains - } - - button { - position +4 = - size 30 4 - text "USER DOMAINS" -#ifdef QT_MENTAT - screen domains -#else - screen job_ddm_user_domains_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - help job_run_ddm_user_domains - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -screen job_ddm_user_domains_sc { - - menu { - - group { - units 32 120 - - label { - position 0 0 - size 32 4 - text "USER DOMAINS" - } - - frame { - position 0 5 - size 32 28 - group user_domains_gr - } - - frame { - position 0 +29 - size 32 49 - group user_domains_generate_gr - } - - frame { - position 0 +50 - size 32 8 - group user_domains_tail_gr - } - - frame { - position 0 92 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return - } - window main_window - disable_right_mouse_button - - } - - menu transform - -} # job_ddm_user_domains_sc -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_assem_recov_gr { - - toggle { - position 1 +4 - size 30 4 - text "MULTIPLE THREADS" - true_command "*job_option assem_recov_multi_threading:on" - false_command "*job_option assem_recov_multi_threading:off" - toggle "*job_option assem_recov_multi_threading:on" - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 12 4 - text "# THREADS" - visible "*job_option assem_recov_multi_threading:on" - } -#else - button { - position +2 +4 - size 12 4 - text "# THREADS" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } -#endif - - text { - position +12 = - size 4 4 - display "job_param_value_assem_recov_nthreads" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } - - label { - position +4 = - size 12 4 - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 = - size 4 4 - display "job_assem_recov_nthreads_dom" - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_matrix_solver_gr { - - label { - position 3 4 - size 12 4 - text "SOLUTION" - border_width 1 - border_color black - } - - roller { - position +12 = - size 18 4 - nvalues 2 - texts "SYMMETRIC" - "NONSYMMETRIC" - rollers job_nonsym_off - job_nonsym_on - commands "*job_option solver_nonsym:off" - "*job_option solver_nonsym:on" - help job_param_solver_method - } - - label { - position -12 +4 - size 6 4 - text "TYPE" - border_width 1 - border_color black - } - - roller { - position +6 = - size 24 4 - nvalues 9 - help job_param_solver_method - texts "MULTIFRONTAL SPARSE" - "MIXED DIRECT-ITERATIVE" - "CASI ITERATIVE" - "PARDISO DIRECT SPARSE" - "MUMPS PARALLEL DIRECT" - "HARDWARE SPARSE" - "ITERATIVE SPARSE" - "DIRECT PROFILE" - "DIRECT SPARSE" - rollers job_solver_mfront_sparse - job_solver_mixed_direct_iterative - job_solver_it_ext - job_solver_pardiso - job_solver_mumps - job_solver_sparse - job_solver_it_sparse - job_solver_dir_profile - job_solver_dir_sparse -#ifdef QT_MENTAT - commands "*job_option solver:mfront_sparse" - "*job_option solver:mixed_direct_iterative" - "*job_option solver:it_ext" - "*job_option solver:pardiso" - "*job_option solver:mumps" - "*job_option solver:sparse" - "*job_option solver:it_sparse" - "*job_option solver:dir_profile" - "*job_option solver:dir_sparse" - visibles job_allows_solver_mfront_sparse - job_allows_solver_mixed_direct_iterative - job_allows_solver_it_ext - job_allows_solver_pardiso - job_allows_solver_mumps - job_allows_solver_sparse - job_allows_solver_it_sparse - job_allows_solver_dir_profile - job_allows_solver_dir_sparse - help job_param_solver_method -#else - popmenu job_set_parallel_matrix_solver_pm -#endif - } - - button { - position +24 = - size 10 4 - text "OPTIONS" - popmenu job_parallel_matrix_solver_opt_pm - } - - frame { - position +10 = - size 14 4 - group job_run_solver_ddm_opts_gr - visible "*job_option parallel:on" - } - - frame { - position 1 +5 - size 46 8 - group job_solver_multi_procs_gr - visible solver_allows_multi_procs - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_gr - visible solver_allows_multi_threads - } - - frame { - position 1 +9 - size 46 8 - group job_solver_gpu_gr - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_set_parallel_matrix_solver_pm { - window { - parent mentat - origin 48 61 - size 24 42 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_solver_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_parallel_matrix_solver_opt_pm { - -#ifdef QT_MENTAT - text "MATRIX SOLVER OPTIONS" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 38 4 - text "MATRIX SOLVER OPTIONS" - } -#endif - - frame { - position 1 5 - size 36 23 - group job_solver_opts_gr - } - - popdown { - position 13 +25 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 41 12 - size 38 39 - border_width 1 - border_color border - background_color body - } - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -group job_run_solver_ddm_opts_gr { - - button { - position 0 0 - size 14 4 - text "\{DDM} OPTIONS" - popmenu ddm_options -# see also job_common.ms! - visible "not(or(job_solver_it_sparse, \ - job_solver_it_ext, \ - job_solver_mixed_direct_iterative, \ - job_solver_pardiso, \ - job_solver_mumps))" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_procs_parallel_off_gr - visible "*job_option parallel:off" - } - - frame { - position = = - size 46 8 - group job_solver_multi_procs_parallel_on_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - true_command "*job_option nsolver_procs_serial:on" - false_command "*job_option nsolver_procs_serial:off" - toggle "*job_option nsolver_procs_serial:on" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - visible "*job_option nsolver_procs_serial:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# PROCESSES" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - border_width 1 - border_color black - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - help job_run_multithreading - rollers "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_nsolver_procs_ddm_automatic_gr - visible "*job_option nsolver_procs_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_nsolver_procs_ddm_user_gr - visible "*job_option nsolver_procs_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nsolver_procs" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - } -} - -group job_solver_multi_threads_gr { - frame { - position 0 0 - size 30 8 - group job_solver_multi_threads_mfront_sparse_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_off_gr - visible "and(job_solver_pardiso,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_on_gr - visible "and(job_solver_pardiso,*job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option mfront_sparse_multi_threading:on" - true_command "*job_option mfront_sparse_multi_threading:on" - false_command "*job_option mfront_sparse_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option mfront_sparse_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_gpu_gr { - - toggle { - position 0 0 - size 30 4 - text "USE \{GPU(s)}" - toggle "*job_option solver_use_gpu:on" - true_command "*job_option solver_use_gpu:on" - false_command "*job_option solver_use_gpu:off" - help job_solver_gpu - } - - label { - position +2 +4 - size 16 4 - text "\{GPU} SELECTION" - border_width 1 - border_color black - visible "*job_option solver_use_gpu:on" - } - - roller { - position +16 = - size 12 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - rollers "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - visible "*job_option solver_use_gpu:on" - help job_solver_gpu - } - - text { - position +12 = - size 16 4 - display job_solver_gpus - command "*clear_job_solver_gpus *job_solver_gpus" - visible "and(*job_option solver_use_gpu:on,*job_option solver_gpus:user)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option pardiso_multi_threading:on" - true_command "*job_option pardiso_multi_threading:on" - false_command "*job_option pardiso_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option pardiso_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_pardiso_multi_threads_ddm_automatic_gr - visible "*job_option pardiso_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_pardiso_multi_threads_ddm_user_gr - visible "*job_option pardiso_multi_threading_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nthreads" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_gr { - - roller { - position 1 4 - size 30 4 - nvalues 2 - texts "SINGLE MACHINE" - "NETWORK" - help job_run_ddm_setup - roller "job_option parallel_setup" - commands "*job_option parallel_setup:single" - "*job_option parallel_setup:network" - } - - frame { - position +2 +5 - size 44 18 - group job_parallel_env_network_gr - visible "*job_option parallel_setup:network" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_gr { - - button { - position 0 0 - size 28 4 - text "HOST FILE" -#ifdef QT_MENTAT - browser host_file_browser -#else - popmenu host_file_browser_pm -#endif - settext $host_file_browser_label "SELECT HOST FILE" - set $host_file_browser_command "*job_host_file" - help job_host_file - } - - button { - position +28 = - size 8 4 - text "EDIT" - command "*job_edit_host_file" - help job_edit_host_file - visible job_host_file - } - - button { - position +8 = - size 8 4 - text "CLEAR" - command "*job_clear_host_file" - help job_clear_host_file - visible job_host_file - } - - display { - position 0 +4 - size 44 4 - display job_host_file - } - - frame { - position 0 +5 - size 44 9 - group job_parallel_env_network_ddm_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_ddm_gr { - - toggle { - position 0 0 - size 22 4 - text "COPY INPUT FILE" - toggle "*job_option copy_input_file:on" - true_command "*job_option copy_input_file:on" - false_command "*job_option copy_input_file:off" - help job_host_copy_inputfile - } - - toggle { - position +23 = - size 21 4 - text "COPY POST FILE" - toggle "*job_option copy_post_file:on" - true_command "*job_option copy_post_file:on" - false_command "*job_option copy_post_file:off" - help job_host_copy_inputfile - } - - label { - position 0 +5 - size 10 4 - text "HOSTS" - border_width 1 - border_color black - visible job_usersub_file - } - - roller { - position +10 = - size 18 4 - nvalues 2 - texts "COMPATIBLE" - "INCOMPATIBLE" - roller "job_option network_hosts" - commands "*job_option network_hosts:compatible" - "*job_option network_hosts:incompatible" - help job_host_comp - visible job_usersub_file - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu marc_integer_size_pm { - - window { - parent mentat - origin 55 32 - size 32 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group marc_integer_size_gr -} - - -#-------------------------------------------------------------------------------------------------- -group marc_integer_size_gr { - - popdown { - position 0 0 - size 32 4 - text "DEFAULT" - command "*job_option marc_integer_size:default" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "4-BYTE INTEGERS" - command "*job_option marc_integer_size:i4" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "8-BYTE INTEGERS" - command "*job_option marc_integer_size:i8" - help job_run_intsize - } - - popdown { - position = +5 - size 32 4 - text "CANCEL" - help job_run_intsize - } -} -#endif -#endif diff --git a/installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms.original b/installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms.original deleted file mode 100644 index 532c95b77..000000000 --- a/installation/mods_MarcMentat/2014/Mentat_menus/job_run.ms.original +++ /dev/null @@ -1,3082 +0,0 @@ -#ifndef AUTOFORGE -popmenu job_title_pm file jobs.ms -popdown job_title_ok file jobs.ms -#ifndef QT_MENTAT -popmenu marc_input_style_pm file job_common.ms -popmenu marc_input_style_run_adv_pm file job_common.ms -popmenu marc_version_run_pm file job_common.ms -#endif - -group job_solver_gr file job_common.ms -group user_domains_gr file domain_decomposition.ms -group user_domains_generate_gr file domain_decomposition.ms -group user_domains_tail_gr file domain_decomposition.ms -group job_solver_opts_gr file job_common.ms -popmenu ddm_options file job_common.ms - -#ifdef QT_MENTAT -browser edit_browser file file.ms -browser directory_browser file file.ms -screen domains file domain_decomposition.ms -#else -popmenu edit_browser_popmenu file file.ms -popmenu directory_browser_popmenu file file.ms -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu usersub_file_browser_pm { - - group { -#endif - - browser usersub_file_browser { - position 0 0 - size 82 72 - text "$usersub_file_browser_label" ($usersub_file_browser_label) - filter "*.f *.F" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$usersub_file_browser_command" ($usersub_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC User Subroutine File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu host_file_browser_pm { - - group { -#endif - - browser host_file_browser { - position 0 0 - size 82 72 - text "$host_file_browser_label" ($host_file_browser_label) - filter "*" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$host_file_browser_command" ($host_file_browser_command) - } -#ifndef QT_MENTAT - } - - window { - title " Select MARC Host File" - origin 30 30 - size 82 72 - } - - mode dialog - disable_right_mouse_button -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_popmenu { - -#ifdef QT_MENTAT - text "RUN JOB" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 52 4 - text "RUN JOB" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - button { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 24 4 - text "USER SUBROUTINE FILE" -#ifdef QT_MENTAT - browser usersub_file_browser -#else - popmenu usersub_file_browser_pm -#endif - settext $usersub_file_browser_label "SELECT USER SUBROUTINE FILE" - set $usersub_file_browser_command "*job_usersub_file" - help job_usersub_file - } - - toggle { - position +26 = - size 22 4 - text "SELECTED USER SUBS" - toggle job_usersubs - help job_run_seluser - visible job_usersubs - popmenu job_usersub_pm - } - - display { - position 1 +4 - size 50 4 - display job_usersub_file - } - - button { - position 1 +4 - size 12 4 - text "EDIT" - command "*job_edit_usersub_file" - visible job_usersub_file - } - - button { - position +12 = - size 12 4 - text "CLEAR" - command "*job_clear_usersub_file" - visible job_usersub_file - } - - roller { - position +12 = - size 26 4 - nvalues 3 - texts "COMPILE / NO SAVE" - "COMPILE AND SAVE" - "RUN SAVED EXECUTABLE" - help job_run_compile - roller "job_option user_source" - visible job_usersub_file -#ifdef QT_MENTAT - commands "*job_option user_source:compile_nosave" - "*job_option user_source:compile_save" - "*job_option user_source:run_saved" -#else - popmenu job_user_source_pm -#endif - } - - toggle { - position 1 +6 - size 22 4 - text "PARALLELIZATION/\{GPU}" - help job_run_parallel - toggle "or(*job_option parallel:on, \ - *job_option assem_recov_multi_threading:on, \ - solver_multi_procs, \ - solver_multi_threads, \ - and(job_solver_mfront_sparse,\ - job_nonsym_off,\ - *job_option solver_use_gpu:on))" - popmenu job_run_parallelization_pm - set $popname2 "job_run_parallelization_pm" - } - - frame { - position +22 = - size 28 16 - border_width 1 - border_color black - - group { - - display { - position 0 0 - size 28 4 - display job_ddm_domains - } - - display { - position = +4 - size 28 4 - display job_assem_recov_nthreads - } - - display { - position = +4 - size 28 4 - display job_solver_procs - visible solver_allows_multi_procs - } - - display { - position = = - size 28 4 - display job_solver_threads - visible "and(solver_allows_multi_threads,\ - not(and(job_solver_mfront_sparse,\ - *job_option parallel:on)))" - } - - display { - position = +4 - size 28 4 - display job_solver_gpu - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } - } - } - - button { - position 1 +18 - size 8 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - -# see also job_common.ms -# see also the ADVANCED JOB SUBMISSION popmenu in this file - - label { - position +10 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_pm -#endif - help job_option_input_style - } - - button { - position +20 = - size 13 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position 1 +6 - size 16 6 - text "SUBMIT (1)" - command "*submit_job 1 *monitor_job" - } - - button { - position +16 = - size 34 6 - text "ADVANCED JOB SUBMISSION" - popmenu job_submit_adv_pm - } - - button { - position 1 +6 - size 16 6 - text "UPDATE" - command "*update_job" - } - - button { - position +16 = - size 16 6 - text "MONITOR" - command "*monitor_job" - } - - button { - position +16 = - size 18 6 - text "KILL" - command "*kill_job *monitor_job" - } - - label { - position 1 +7 - size 32 4 - text "STATUS" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_status" - } - - label { - position -32 +4 - size 32 4 - text "CURRENT INCREMENT (CYCLE)" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_increment" - } - - label { - position -32 +4 - size 32 4 - text "SINGULARITY RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_singularity_ratio" - } - - label { - position -32 +4 - size 32 4 - text "CONVERGENCE RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_convergence_ratio" - } - - label { - position 1 +4 - size 32 4 - text "ANALYSIS TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_analysis_time" - } - - label { - position -32 +4 - size 32 4 - text "WALL TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_time" - } - - frame { - position 1 +4 - size 50 8 - - group { - - frame { - position 0 0 - size 50 8 - text "TOTAL" - border_width 1 - border_color black - group { - - label { - position +6 = - size 13 4 - text "CYCLES" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_cycles" - border_width 1 - border_color black - } - - label { - position -13 +4 - size 13 4 - text "SEPARATIONS" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_separations" - border_width 1 - border_color black - } - - label { - position +10 -4 - size 11 4 - text "CUT BACKS" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_cut_backs" - border_width 1 - border_color black - } - - label { - position -11 +4 - size 11 4 - text "REMESHES" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_remeshes" - border_width 1 - border_color black - } - } - } - } - } - - label { - position 1 +8 - size 19 4 - text "EXIT NUMBER" - border_width 1 - border_color black - } - - integer { - position +19 = - size 10 4 - display "job_exit" - } - - button { - position +10 = - size 21 4 - text "EXIT MESSAGE" - popmenu job_exit_msg_pm - help exit_message - } - - label { - position 1 +6 - size 7 4 - text "EDIT" - border_width 1 - border_color black - } - - button { - position +7 = - size 12 4 - text "OUTPUT FILE" - command "*job_edit_output" - } - - button { - position +12 = - size 9 4 - text "LOG FILE" - command "*job_edit_log_file" - } - - button { - position +9 = - size 12 4 - text "STATUS FILE" - command "*job_edit_status_file" - } - - button { - position +12 = - size 10 4 - text "ANY FILE" - settext $edit_browser_label "EDIT FILE" - set $edit_browser_command "*edit_file" -#ifdef QT_MENTAT - browser edit_browser -#else - popmenu edit_browser_popmenu -#endif - help edit_file - } - - popdown { - position 1 +6 - size 32 4 -#ifdef QT_MENTAT - text "OPEN POST FILE (MODEL PLOT RESULTS MENU)" - command "@popdown(job_properties_pm) @main(results) @popup(modelplot_pm) *post_open_default" -#else - text "OPEN POST FILE (RESULTS MENU)" - screen results - command "*post_open_default" -#endif - } - - button { - position 1 +6 - size 12 8 - text "RESET" - command "*job_submit_reset" - } - - popdown { - position +38 = - size 12 8 - text "OK" - } - } - - window job_run_wi { - parent mentat - origin 35 1 - size 52 115 - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_usersub_pm { - -#ifdef QT_MENTAT - text "CURRENTLY SELECTED USER SUBROUTINES" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 66 4 - text "CURRENTLY SELECTED USER SUBROUTINES" - } -#endif - - display { - position 1 +5 - size 64 86 - display "job_usersubs" - } - - popdown { - position 27 +88 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 66 102 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_submit_adv_pm { - -#ifdef QT_MENTAT - text "ADVANCED JOB SUBMISSION" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "ADVANCED JOB SUBMISSION" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - label { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 19 4 - text "INITIAL ALLOCATION" - border_width 1 - border_color black - } -#ifdef QT_MENTAT - label { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - } -#else - button { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - command "*job_param general_init_allocation" - } -#endif - text { - position +15 = - size 10 4 - display "job_param_value_general_init_allocation" - command "*job_param general_init_allocation" - help job_param_general_init_allocation - } - - label { - position +10 = - size 4 4 - text "MB" - border_width 1 - border_color black - } - - toggle { - position 1 +5 - size 32 4 - text "OUT-OF-CORE ELEMENT STORAGE" - help job_param_elsto - toggle "*job_option elsto:on" - true_command "*job_option elsto:on" - false_command "*job_option elsto:off" - } - - toggle { - position 1 +4 - size 32 4 - text "OUT-OF-CORE INCREMENTAL BACKUP" - help job_param_inc_backup_storage - toggle "*job_option inc_backup_storage:out_of_core" - true_command "*job_option inc_backup_storage:out_of_core" - false_command "*job_option inc_backup_storage:in_core" - } - - toggle { - position +34 = - size 14 4 - text "CHECK SIZES" - help job_run_check - toggle "*job_option check:on" - true_command "*job_option check:on" - false_command "*job_option check:off" - } - - label { - position 1 +6 - size 16 4 - text "INTEGER SIZE" - border_width 1 - border_color black - } - - roller { - position +16 = - size 32 4 - nvalues 3 - texts "DEFAULT" - "4-BYTE INTEGERS" - "8-BYTE INTEGERS" -#ifdef QT_MENTAT - commands "*job_option marc_integer_size:default" - "*job_option marc_integer_size:i4" - "*job_option marc_integer_size:i8" -#else - popmenu marc_integer_size_pm -#endif - help job_run_intsize - roller "job_option marc_integer_size" - } - - frame { - position 1 +6 - size 48 12 - text "MARC INPUT FILE" - border_width 1 - border_color black - - group { - - label { - position 0 4 - size 9 4 - text "VERSION" - border_width 1 - border_color black - } - - roller { - position +9 = - size 14 4 - nvalues 18 - nvisible 18 - texts "DEFAULT" -#if 0 - "2014" -#endif - "2013.1" - "2013" - "2012" - "2011" - "2010.2" - "2010" - "2008" - "2007" - "2005R3" - "2005" - "2003" - "2001" - "2000" -#if 0 - "8" -#endif - "K7" - "K6.2" - "K5" - "K4" - help job_param_version - rollers "job_input_version_default" -#if 0 - "job_input_version_2014" -#endif - "job_input_version_2013.1" - "job_input_version_2013" - "job_input_version_2012" - "job_input_version_2011" - "job_input_version_2010.2" - "job_input_version_2010" - "job_input_version_2008" - "job_input_version_2007" - "job_input_version_2005r3" - "job_input_version_2005" - "job_input_version_2003" - "job_input_version_2001" - "job_input_version_2000" -#if 0 - "job_input_version_8" -#endif - "job_input_version_k7" - "job_input_version_k6" - "job_input_version_k5" - "job_input_version_k4" -#ifdef QT_MENTAT - commands "*job_option version:default" -#if 0 - "*job_option version:2014" -#endif - "*job_option version:2013.1" - "*job_option version:2013" - "*job_option version:2012" - "*job_option version:2011" - "*job_option version:2010.2" - "*job_option version:2010" - "*job_option version:2008" - "*job_option version:2007" - "*job_option version:2005r3" - "*job_option version:2005" - "*job_option version:2003" - "*job_option version:2001" - "*job_option version:2000" -#if 0 - "*job_option version:8" -#endif - "*job_option version:k7" - "*job_option version:k6" - "*job_option version:k5" - "*job_option version:k4" - visibles "job_allows_input_version_default" -#if 0 - "job_allows_input_version_2014" -#endif - "job_allows_input_version_2013.1" - "job_allows_input_version_2013" - "job_allows_input_version_2012" - "job_allows_input_version_2011" - "job_allows_input_version_2010.2" - "job_allows_input_version_2010" - "job_allows_input_version_2008" - "job_allows_input_version_2007" - "job_allows_input_version_2005r3" - "job_allows_input_version_2005" - "job_allows_input_version_2003" - "job_allows_input_version_2001" - "job_allows_input_version_2000" -#if 0 - "job_allows_input_version_8" -#endif - "job_allows_input_version_k7" - "job_allows_input_version_k6" - "job_allows_input_version_k5" - "job_allows_input_version_k4" -#else - popmenu marc_version_run_pm -#endif - } - -# see also job_common.ms -# see also the RUN JOB popmenu in this file - - label { - position +14 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" -#ifdef QT_MENTAT - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" -#else - popmenu marc_input_style_run_adv_pm -#endif - help job_option_input_style - } - - toggle { - position 0 +4 - size 48 4 - text "EXTENDED PRECISION" - help job_run_precision - toggle "*job_option inp_file_prec:extended" - true_command "*job_option inp_file_prec:extended" - false_command "*job_option inp_file_prec:normal" - } - } - } - - button { - position 1 +14 - size 24 4 - text "SCRATCH DIRECTORY" - settext $directory_browser_label "JOB SCRATCH DIRECTORY" - set $directory_browser_command "*job_scratch_directory" -#ifdef QT_MENTAT - browser directory_browser -#else - popmenu directory_browser_popmenu -#endif - help job_scratch_directory - } - - button { - position +24 = - size 24 4 - text "CLEAR" - command "*job_clear_scratch_directory" - visible job_scratch_directory - } - - text { - position 1 +4 - size 48 4 - display job_scratch_dir - command "*job_scratch_directory" - } - -#ifdef DCOM - toggle { - position 1 +6 - size 8 4 - text "\{DCOM}" - toggle "*job_option dcom:on" - help job_run_dcom - true_command "*job_option dcom:on" - false_command "*job_option dcom:off" - visible win32_available - } - - button { - position +8 = - size 12 4 - text "HOSTNAME" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } - - text job_dcom_hostname { - position +12 = - size 28 4 - display "job_dcom_hostname" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } -#endif - - button { - position 1 +6 - size 24 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - - button { - position +24 = - size 24 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position +4 +6 - size 20 4 - text "WRITE INPUT FILE" - command "*job_write_input" - } - - button { - position = +4 - size 20 4 - text "EDIT INPUT FILE" - command "*job_edit_input" - } - - popdown { - position 1 +5 - size 20 6 - text "SUBMIT 1" - command "*submit_job 1 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 1" - command "*execute_job 1 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 2" - command "*submit_job 2 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 2" - command "*execute_job 2 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 3" - command "*submit_job 3 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 3" - command "*execute_job 3 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_exit_msg_pm { - -#ifdef QT_MENTAT - text "EXIT MESSAGE" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 86 4 - text "EXIT MESSAGE" - } - - display { - position 1 5 - size 84 74 - display "job_exit_msg" - } -#endif - -#ifdef QT_MENTAT - - text { - position 1 5 - size 84 74 - multiline - readonly - display "job_exit_msg" - } - -#endif - popdown { - position 37 +76 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 86 90 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_user_source_pm { - - window { - parent job_run_wi - origin 25 17 - size 26 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_user_source_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_user_source_gr { - popdown { - position 0 0 - size 26 4 - text "COMPILE / NO SAVE" - command "*job_option user_source:compile_nosave" - } - - popdown { - position = +4 - size 26 4 - text "COMPILE AND SAVE" - command "*job_option user_source:compile_save" - } - - popdown { - position = +4 - size 26 4 - text "RUN SAVED EXECUTABLE" - command "*job_option user_source:run_saved" - } - - popdown { - position = +5 - size 26 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_parallelization_pm { - -#ifdef QT_MENTAT - text "PARALLELIZATION/\{GPU}" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 60 4 - text "PARALLELIZATION/GPU" - } -#endif - -#ifdef QT_MENTAT - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { -#ifdef QT_MENTAT - position 1 9 -#else - position 1 5 -#endif - size 48 28 - group job_ddm_gr - text "DOMAIN DECOMPOSITION" - border_width 1 - border_color black - } - - frame { - position 1 +29 - size 36 13 - group job_assem_recov_gr - text "ASSEMBLY AND RECOVERY" - border_width 1 - border_color black - } - - frame { - position 1 +14 - size 58 31 - group job_parallel_matrix_solver_gr - text "MATRIX SOLVER" - border_width 1 - border_color black - } - - frame { - position 1 +32 - size 48 28 - group job_parallel_env_gr - text "PARALLELIZATION ENVIRONMENT" - border_width 1 - border_color black - visible "or(*job_option parallel:on, \ - solver_multi_procs)" - } - - popdown { - position 24 +30 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 1 - size 60 119 - background_color body - border_width 1 - border_color border - buffering single - } -#ifdef QT_MENTAT - mode permanent -#else - mode dialog -#endif -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_gr { - - toggle { - position 1 4 - size 30 4 - text "USE \{DDM}" - toggle "*job_option parallel:on" - help job_run_ddm_use - true_command "*job_option parallel:on" - false_command "*job_option parallel:off" - } - - frame { - position +2 +5 - size 44 18 - group job_ddm_use_gr - visible "*job_option parallel:on" - } -} - -group job_ddm_use_gr { - roller { - position 0 0 - size 30 4 - nvalues 2 - texts "DECOMPOSITION IN MARC" - "DECOMPOSITION IN MENTAT" - roller "job_option ddm_generator" -#ifdef QT_MENTAT - commands "*job_option ddm_generator:fea_solver" - "*job_option ddm_generator:preprocessor" -#else - popmenu job_ddm_generator_pm -#endif - help job_run_ddm_generator - } - - frame { - position 0 +5 - size 44 8 - group job_ddm_fea_solver_gr - visible "*job_option ddm_generator:fea_solver" - } - - frame { - position = = - size 44 8 - group job_ddm_preprocessor_gr - visible "*job_option ddm_generator:preprocessor" - } - - text { - position 0 +9 - size 22 4 -#ifdef QT_MENTAT - text "Single Input File" -#else - text "SINGLE INPUT FILE" -#endif - readonly - visible "*job_option ddm_generator:fea_solver" - } - - roller { - position = = - size 22 4 - nvalues 2 - texts "MULTIPLE INPUT FILES" - "SINGLE INPUT FILE" - roller "job_option ddm_single_input" - commands "*job_option ddm_single_input:off" - "*job_option ddm_single_input:on" - visible "*job_option ddm_generator:preprocessor" - help job_run_ddm_single_input - } - - roller { - position +23 = - size 21 4 - nvalues 2 - texts "MULTIPLE POST FILES" - "SINGLE POST FILE" - roller "job_option ddm_single_post" - commands "*job_option ddm_single_post:off" - "*job_option ddm_single_post:on" - help job_run_ddm_single_post - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_generator_pm { - - window { - parent mentat - origin 42 19 - size 30 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_generator_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_generator_gr { - - popdown { - position 0 0 - size 30 4 - text "DECOMPOSITION IN MARC" - command "*job_option ddm_generator:fea_solver" - help job_run_ddm_generator - } - - popdown { - position = +4 - size 30 4 - text "DECOMPOSITION IN MENTAT" - command "*job_option ddm_generator:preprocessor" - help job_run_ddm_generator - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - help job_run_ddm_generator - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_fea_solver_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 10 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 0 0 - size 10 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +10 = - size 4 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position +4 = - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method_pm -#endif - } - - button { - position +4 +4 - size 19 4 - text "ADVANCED SETTINGS" -#ifdef QT_MENTAT - popmenu job_ddm_fea_solver_pm -#else - screen job_ddm_fea_solver_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method_pm { - - window { - parent mentat - origin 56 24 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_method_gr { - - popdown { - position 0 0 - size 30 4 - text "METIS BEST" - command "*job_option ddm_method:metis_best" - } - - popdown { - position = +4 - size 30 4 - text "METIS ELEMENT BASED" - command "*job_option ddm_method:metis_element_based" - } - - popdown { - position = +4 - size 30 4 - text "METIS NODE BASED" - command "*job_option ddm_method:metis_node_based" - } - - popdown { - position = +4 - size 30 4 - text "RECURSIVE COORDINATE BISECTION" - command "*job_option ddm_method:recur_coord_bisect" - } - - popdown { - position = +4 - size 30 4 - text "VECTOR" - command "*job_option ddm_method:vector" - } - - popdown { - position = +4 - size 30 4 - text "RADIAL" - command "*job_option ddm_method:radial" - } - - popdown { - position = +4 - size 30 4 - text "ANGULAR" - command "*job_option ddm_method:angular" - } - - popdown { - position = +5 - size 30 4 - text "CANCEL" - } -} -#endif - - -#ifdef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_fea_solver_pm { - - text "JOB PARALLELIZATION" -#else -screen job_ddm_fea_solver_sc { - - menu { -#endif - - group { - units 32 120 - -#ifndef QT_MENTAT - label { - position 0 0 - size 32 4 - text "JOB PARALLELIZATION" - } -#endif - - label { - position 0 5 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - -#ifdef QT_MENTAT - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } -#endif - - frame { - -#ifdef QT_MENTAT - position 0 +9 -#else - position 0 +5 -#endif - size 32 76 - text "ADVANCED DECOMPOSITION IN MARC" - border_width 1 - border_color black - - group { - -#ifdef QT_MENTAT - label { - position 1 4 - size 16 4 - text "# DOMAINS" - help job_param - } -#else - button { - position 1 4 - size 16 4 - text "# DOMAINS" - command "*job_param ndomains" - } -#endif - - text { - position +16 = - size 14 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position 1 +4 - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#ifdef QT_MENTAT - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" -#else - popmenu job_ddm_method2_pm -#endif - } - - frame { - position 1 +5 - size 30 20 - group job_ddm_direction_gr - visible "or(*job_option ddm_method:vector, \ - *job_option ddm_method:radial, \ - *job_option ddm_method:angular)" - } - - toggle { - position 1 +21 - size 30 4 - text "DOMAIN ISLAND REMOVAL" - toggle "*job_option ddm_island_removal:on" - true_command "*job_option ddm_island_removal:on" - false_command "*job_option ddm_island_removal:off" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "GRAPH" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "COARSE" - "FINE" - help ddm_decomp_coarse_graph - rollers "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - commands "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "QUADRATIC ELEMENTS" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "GENUINE" - "LINEARIZED" - help job_run_ddm_decomp_linearized - rollers "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - commands "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - } - -#ifdef QT_MENTAT - label { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - help job_param - } -#else - button { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_elem_weight_factor" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } - - toggle { - position 1 +5 - size 30 4 - text "DETECT CONTACT" - toggle "*job_option ddm_detect_contact:on" - true_command "*job_option ddm_detect_contact:on" - false_command "*job_option ddm_detect_contact:off" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - help job_run_ddm_decomp_detect_contact - } - -#ifdef QT_MENTAT - label { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } -#endif - - text { - position +15 = - size 15 4 - command "*set_ddm_contact_tolerance" - display "job_param_value_ddm_contact_tolerance" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } - -#ifdef QT_MENTAT - label { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - visible "*job_option ddm_detect_contact:on" - } -#else - button { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } -#endif - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_contact_constr_factor" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } - } - } - -#ifdef QT_MENTAT - popdown { - position 0 +77 - size 32 8 - text "OK" - } -#else - frame { - position 0 +77 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return -#endif - } -#ifndef QT_MENTAT - window main_window - disable_right_mouse_button - } - - menu transform -} # job_ddm_fea_solver_sc -#else - mode permanent -} # job_ddm_fea_solver_pm -#endif - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_method2_pm { - - window { - parent mentat - origin 1 22 - size 30 33 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_method_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_direction_gr { - - button { - position 0 0 - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "*job_option ddm_method:vector" - } - - button { - position = = - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "not(*job_option ddm_method:vector)" - } - - button { - position +15 = - size 15 4 - text "FROM / TO" - command "*job_vector_from_to ddm_sort_direction_x" - } - - text { - position -15 +4 - size 10 4 - command "*job_param ddm_sort_direction_x" - display "job_param_value_ddm_sort_direction_x" - help ddm_job_decomp_user_direction_x - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_y" - display "job_param_value_ddm_sort_direction_y" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_z" - display "job_param_value_ddm_sort_direction_z" - } - - frame { - position 0 +4 - size 30 8 - group job_ddm_sort_point_gr - visible "not(*job_option ddm_method:vector)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_gr { - - label { - position 0 0 - size 14 4 - border_width 1 - border_color black - text "POINT ON AXIS" - } - - roller { - position +14 = - size 10 4 - nvalues 2 - texts "DEFAULT" - "USER" - roller "job_option ddm_sort_point" -#ifdef QT_MENTAT - commands "*job_option ddm_sort_point:default" - "*job_option ddm_sort_point:user" -#else - popmenu job_ddm_sort_point_meth_pm -#endif - } - - button { - position +10 = - size 6 4 - text "SET" - command "*job_position ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position 0 +4 - size 10 4 - command "*job_param ddm_sort_point_x" - display "job_param_value_ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_y" - display "job_param_value_ddm_sort_point_y" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_z" - display "job_param_value_ddm_sort_point_z" - visible "*job_option ddm_sort_point:user" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_sort_point_meth_pm { - - window { - parent mentat - origin 15 35 - size 14 13 - border_width 1 - border_color border - background_color body - } - - mode dialog - - group job_ddm_sort_point_meth_gr -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_meth_gr { - - popdown { - position 0 0 - size 14 4 - text "DEFAULT" - command "*job_option ddm_sort_point:default" - } - - popdown { - position = +4 - size 14 4 - text "USER DEFINED" - command "*job_option ddm_sort_point:user" - } - - popdown { - position = +5 - size 14 4 - text "CANCEL" - } -} -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_preprocessor_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - border_width 1 - border_color black - } - - integer { - position +10 = - size 4 4 - display valid_domains - } - - button { - position +4 = - size 30 4 - text "USER DOMAINS" -#ifdef QT_MENTAT - screen domains -#else - screen job_ddm_user_domains_sc - command "@popdown($popname2) @popdown($popname1)" ($popname2, $popname1) -#endif - help job_run_ddm_user_domains - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -screen job_ddm_user_domains_sc { - - menu { - - group { - units 32 120 - - label { - position 0 0 - size 32 4 - text "USER DOMAINS" - } - - frame { - position 0 5 - size 32 28 - group user_domains_gr - } - - frame { - position 0 +29 - size 32 49 - group user_domains_generate_gr - } - - frame { - position 0 +50 - size 32 8 - group user_domains_tail_gr - } - - frame { - position 0 92 - size 32 8 - group ok2_gr - } - - frame select_frame - frame inactive_return - } - window main_window - disable_right_mouse_button - - } - - menu transform - -} # job_ddm_user_domains_sc -#endif - - -#-------------------------------------------------------------------------------------------------- -group job_assem_recov_gr { - - toggle { - position 1 +4 - size 30 4 - text "MULTIPLE THREADS" - true_command "*job_option assem_recov_multi_threading:on" - false_command "*job_option assem_recov_multi_threading:off" - toggle "*job_option assem_recov_multi_threading:on" - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 12 4 - text "# THREADS" - visible "*job_option assem_recov_multi_threading:on" - } -#else - button { - position +2 +4 - size 12 4 - text "# THREADS" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } -#endif - - text { - position +12 = - size 4 4 - display "job_param_value_assem_recov_nthreads" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } - - label { - position +4 = - size 12 4 - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 = - size 4 4 - display "job_assem_recov_nthreads_dom" - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_matrix_solver_gr { - - label { - position 3 4 - size 12 4 - text "SOLUTION" - border_width 1 - border_color black - } - - roller { - position +12 = - size 18 4 - nvalues 2 - texts "SYMMETRIC" - "NONSYMMETRIC" - rollers job_nonsym_off - job_nonsym_on - commands "*job_option solver_nonsym:off" - "*job_option solver_nonsym:on" - help job_param_solver_method - } - - label { - position -12 +4 - size 6 4 - text "TYPE" - border_width 1 - border_color black - } - - roller { - position +6 = - size 24 4 - nvalues 9 - help job_param_solver_method - texts "MULTIFRONTAL SPARSE" - "MIXED DIRECT-ITERATIVE" - "CASI ITERATIVE" - "PARDISO DIRECT SPARSE" - "MUMPS PARALLEL DIRECT" - "HARDWARE SPARSE" - "ITERATIVE SPARSE" - "DIRECT PROFILE" - "DIRECT SPARSE" - rollers job_solver_mfront_sparse - job_solver_mixed_direct_iterative - job_solver_it_ext - job_solver_pardiso - job_solver_mumps - job_solver_sparse - job_solver_it_sparse - job_solver_dir_profile - job_solver_dir_sparse -#ifdef QT_MENTAT - commands "*job_option solver:mfront_sparse" - "*job_option solver:mixed_direct_iterative" - "*job_option solver:it_ext" - "*job_option solver:pardiso" - "*job_option solver:mumps" - "*job_option solver:sparse" - "*job_option solver:it_sparse" - "*job_option solver:dir_profile" - "*job_option solver:dir_sparse" - visibles job_allows_solver_mfront_sparse - job_allows_solver_mixed_direct_iterative - job_allows_solver_it_ext - job_allows_solver_pardiso - job_allows_solver_mumps - job_allows_solver_sparse - job_allows_solver_it_sparse - job_allows_solver_dir_profile - job_allows_solver_dir_sparse - help job_param_solver_method -#else - popmenu job_set_parallel_matrix_solver_pm -#endif - } - - button { - position +24 = - size 10 4 - text "OPTIONS" - popmenu job_parallel_matrix_solver_opt_pm - } - - frame { - position +10 = - size 14 4 - group job_run_solver_ddm_opts_gr - visible "*job_option parallel:on" - } - - frame { - position 1 +5 - size 46 8 - group job_solver_multi_procs_gr - visible solver_allows_multi_procs - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_gr - visible solver_allows_multi_threads - } - - frame { - position 1 +9 - size 46 8 - group job_solver_gpu_gr - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu job_set_parallel_matrix_solver_pm { - window { - parent mentat - origin 48 61 - size 24 42 - border_width 1 - border_color border - background_color body - } - mode dialog - - group job_solver_gr -} -#endif - - -#-------------------------------------------------------------------------------------------------- -popmenu job_parallel_matrix_solver_opt_pm { - -#ifdef QT_MENTAT - text "MATRIX SOLVER OPTIONS" -#endif - - group { - -#ifndef QT_MENTAT - label { - position 0 0 - size 38 4 - text "MATRIX SOLVER OPTIONS" - } -#endif - - frame { - position 1 5 - size 36 23 - group job_solver_opts_gr - } - - popdown { - position 13 +25 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 41 12 - size 38 39 - border_width 1 - border_color border - background_color body - } - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -group job_run_solver_ddm_opts_gr { - - button { - position 0 0 - size 14 4 - text "\{DDM} OPTIONS" - popmenu ddm_options -# see also job_common.ms! - visible "not(or(job_solver_it_sparse, \ - job_solver_it_ext, \ - job_solver_mixed_direct_iterative, \ - job_solver_pardiso, \ - job_solver_mumps))" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_procs_parallel_off_gr - visible "*job_option parallel:off" - } - - frame { - position = = - size 46 8 - group job_solver_multi_procs_parallel_on_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - true_command "*job_option nsolver_procs_serial:on" - false_command "*job_option nsolver_procs_serial:off" - toggle "*job_option nsolver_procs_serial:on" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - visible "*job_option nsolver_procs_serial:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# PROCESSES" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - border_width 1 - border_color black - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - help job_run_multithreading - rollers "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_nsolver_procs_ddm_automatic_gr - visible "*job_option nsolver_procs_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_nsolver_procs_ddm_user_gr - visible "*job_option nsolver_procs_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nsolver_procs" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - } -} - -group job_solver_multi_threads_gr { - frame { - position 0 0 - size 30 8 - group job_solver_multi_threads_mfront_sparse_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_off_gr - visible "and(job_solver_pardiso,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_on_gr - visible "and(job_solver_pardiso,*job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option mfront_sparse_multi_threading:on" - true_command "*job_option mfront_sparse_multi_threading:on" - false_command "*job_option mfront_sparse_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option mfront_sparse_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_gpu_gr { - - toggle { - position 0 0 - size 30 4 - text "USE \{GPU(s)}" - toggle "*job_option solver_use_gpu:on" - true_command "*job_option solver_use_gpu:on" - false_command "*job_option solver_use_gpu:off" - help job_solver_gpu - } - - label { - position +2 +4 - size 16 4 - text "\{GPU} SELECTION" - border_width 1 - border_color black - visible "*job_option solver_use_gpu:on" - } - - roller { - position +16 = - size 12 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - rollers "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - visible "*job_option solver_use_gpu:on" - help job_solver_gpu - } - - text { - position +12 = - size 16 4 - display job_solver_gpus - command "*clear_job_solver_gpus *job_solver_gpus" - visible "and(*job_option solver_use_gpu:on,*job_option solver_gpus:user)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option pardiso_multi_threading:on" - true_command "*job_option pardiso_multi_threading:on" - false_command "*job_option pardiso_multi_threading:off" - help job_run_multithreading - } - -#ifdef QT_MENTAT - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option pardiso_multi_threading:on" - help job_param - } -#else - button { - position +2 +4 - size 14 4 - text "# THREADS" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -#endif - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true -#ifdef QT_MENTAT - set $dummy dummy -#endif - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_pardiso_multi_threads_ddm_automatic_gr - visible "*job_option pardiso_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_pardiso_multi_threads_ddm_user_gr - visible "*job_option pardiso_multi_threading_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_user_gr { - -#ifdef QT_MENTAT - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } -#else - button { - position 0 0 - size 8 4 - text "VALUE" - command "*job_param nthreads" - } -#endif - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_gr { - - roller { - position 1 4 - size 30 4 - nvalues 2 - texts "SINGLE MACHINE" - "NETWORK" - help job_run_ddm_setup - roller "job_option parallel_setup" - commands "*job_option parallel_setup:single" - "*job_option parallel_setup:network" - } - - frame { - position +2 +5 - size 44 18 - group job_parallel_env_network_gr - visible "*job_option parallel_setup:network" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_gr { - - button { - position 0 0 - size 28 4 - text "HOST FILE" -#ifdef QT_MENTAT - browser host_file_browser -#else - popmenu host_file_browser_pm -#endif - settext $host_file_browser_label "SELECT HOST FILE" - set $host_file_browser_command "*job_host_file" - help job_host_file - } - - button { - position +28 = - size 8 4 - text "EDIT" - command "*job_edit_host_file" - help job_edit_host_file - visible job_host_file - } - - button { - position +8 = - size 8 4 - text "CLEAR" - command "*job_clear_host_file" - help job_clear_host_file - visible job_host_file - } - - display { - position 0 +4 - size 44 4 - display job_host_file - } - - frame { - position 0 +5 - size 44 9 - group job_parallel_env_network_ddm_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_ddm_gr { - - toggle { - position 0 0 - size 22 4 - text "COPY INPUT FILE" - toggle "*job_option copy_input_file:on" - true_command "*job_option copy_input_file:on" - false_command "*job_option copy_input_file:off" - help job_host_copy_inputfile - } - - toggle { - position +23 = - size 21 4 - text "COPY POST FILE" - toggle "*job_option copy_post_file:on" - true_command "*job_option copy_post_file:on" - false_command "*job_option copy_post_file:off" - help job_host_copy_inputfile - } - - label { - position 0 +5 - size 10 4 - text "HOSTS" - border_width 1 - border_color black - visible job_usersub_file - } - - roller { - position +10 = - size 18 4 - nvalues 2 - texts "COMPATIBLE" - "INCOMPATIBLE" - roller "job_option network_hosts" - commands "*job_option network_hosts:compatible" - "*job_option network_hosts:incompatible" - help job_host_comp - visible job_usersub_file - } -} - - -#ifndef QT_MENTAT -#-------------------------------------------------------------------------------------------------- -popmenu marc_integer_size_pm { - - window { - parent mentat - origin 55 32 - size 32 17 - border_width 1 - border_color border - background_color body - } - mode dialog - - group marc_integer_size_gr -} - - -#-------------------------------------------------------------------------------------------------- -group marc_integer_size_gr { - - popdown { - position 0 0 - size 32 4 - text "DEFAULT" - command "*job_option marc_integer_size:default" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "4-BYTE INTEGERS" - command "*job_option marc_integer_size:i4" - help job_run_intsize - } - - popdown { - position = +4 - size 32 4 - text "8-BYTE INTEGERS" - command "*job_option marc_integer_size:i8" - help job_run_intsize - } - - popdown { - position = +5 - size 32 4 - text "CANCEL" - help job_run_intsize - } -} -#endif -#endif diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask b/installation/mods_MarcMentat/2015/Marc_tools/comp_damask deleted file mode 100644 index 2d144b8a4..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_h b/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_h deleted file mode 100644 index 01464f095..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_h +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_hmp b/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_hmp deleted file mode 100644 index 36ced6543..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_hmp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_l b/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_l deleted file mode 100644 index 31b5cd175..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_l +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_lmp b/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_lmp deleted file mode 100644 index 8a0c1255d..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_lmp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRANLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_mp b/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_mp deleted file mode 100644 index 986d9ae04..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_damask_mp +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -usernoext=$user -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` -usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - -# add BLAS options for linking - BLAS="%BLAS%" - -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user on host `hostname`" -echo "program: $program" - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$usernoext.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $BLAS \ - $SYSLIBS || \ - { - echo "$0: link failed for $usernoext.o on host `hostname`" - exit 1 - } - /bin/rm $userobj - /bin/rm $DIRJOB/*.mod diff --git a/installation/mods_MarcMentat/2015/Marc_tools/comp_user.original b/installation/mods_MarcMentat/2015/Marc_tools/comp_user.original deleted file mode 100644 index 8679bb041..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/comp_user.original +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/ksh -# 1st arg: $DIR -# 2nd arg: $DIRJOB -# 3rd arg: $user -# 4th arg: $program -DIR=$1 -user=$3 -program=$4 -. $DIR/tools/include -DIRJOB=$2 -cd $DIRJOB -echo "Compiling and linking user subroutine $user.f on host `hostname`" -echo "program: $program" - $FORTRAN $user.f || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - userobj=$user.o - - - $LOAD ${program} $DIR/lib/main.o\ - $DIR/lib/blkdta.o $DIR/lib/comm?.o \ - ${userobj-} \ - $DIR/lib/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ../lib/mdsrc.a \ - ../lib/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS || \ - { - echo "$0: link failed for $user.o on host `hostname`" - exit 1 - } - /bin/rm $userobj diff --git a/installation/mods_MarcMentat/2015/Marc_tools/include_linux64 b/installation/mods_MarcMentat/2015/Marc_tools/include_linux64 deleted file mode 100644 index 2f1abe6ba..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/include_linux64 +++ /dev/null @@ -1,744 +0,0 @@ -# -# General definitions for the Marc 2014 version -# -# EM64T -# ( LP64 - i4 version) -# (ILP64 - i8 version) -# -# Linux RedHat 5.7 -# -# 64 bit MPI version -# -# Intel(R) Fortran Compiler -# Version 13.0.1 -# -# Intel(R) C Compiler -# Version 13.0.1 -# -# MKL Libraries: -# Intel(R) MKL 10.3 -# -# DATE -# -# To check the O/S level, type: -# uname -a -# -# Distributed parallel MPI libraries: -# 1) HP MPI 2.3 -# To check the mpi version, type: -# mpirun -version -# 2) Intel MPI 4.0 -# To check the mpi version, type: -# mpirun -version -# -# To check the Compiler level, type using the compiler -# installation path: -# ifort -V -# icc -V -# -# REMARKS : This file contains the definitions of variables used during -# compilation loading and use of the MARC programmes . The -# current machine type is identified by means of the variable -# MACHINE , defined below. -# -# -# MPI_ROOT: root directory in which mpi shared libraries, etc. are located -# DIRJOB : directory in which spawned jobs should look for Marc input -# MPI_ARCH: system architecture -# MPI_EPATH: path where executable resides -# -REVISION="VERSION, BUILD" -HOSTNAME=`hostname` - -# find available memory in Mbyte on the machine -# can be set explicitly -MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'` - -# set _OEM_NASTRAN to 1 for MD Nastran build -# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable -_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}" - -# uncomment the following line for an autoforge build -#AUTOFORGE=1 -AUTOFORGE=0 -export AUTOFORGE - -# integer size -if test "$MARC_INTEGER_SIZE" = "" ; then - INTEGER_PATH= -else - INTEGER_PATH=/$MARC_INTEGER_SIZE -fi - -FCOMP=ifort - -# -# settings for Metis -# -METIS="-I$METIS_SOURCE/include" -METISLIBS="$MARC_LIB/metis.a " - -# -# settings for MPI -# -# RCP and RSH are used for parallel network runs -# replace with similar commands like rsh if needed -RCP=/usr/bin/scp -RSH=/usr/bin/ssh -# - - -MPI_DEFAULT=intelmpi -MPI_OTHER=hpmpi - -MPITYPE=$MPI_DEFAULT - -if test $AUTOFORGE -then - if test $AUTOFORGE = 1 - then - MPITYPE=none - fi -fi - - -# overrule MPITYPE setting with environmental variable MARC_MPITYPE -if test $MARC_MPITYPE -then - MPITYPE=$MARC_MPITYPE -fi - -# always set MPITYPE to none for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - MPITYPE=none -fi - -# Edit following lines to build with GPGPU version of BCS Solver for -# NVIDIA platforms -#BCSGPUSOLVER=NONE -BCSGPUSOLVER=BCSGPU - -SOLVERFLAGS= -if test "$BCSGPUSOLVER" = BCSGPU -then - SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA" - BCS_DIR=bcsgpusolver - export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH - export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH -else - BCS_DIR=bcssolver -fi -# -# settings for MPI -# -DDM= -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - FCOMPMPI=mpif90 - export MPI_ROOT=$MARC_HPMPI - export MPI_REMSH=$RSH - export MPI_F77=$FCOMP - ARCHITECTURE=linux_amd64 - DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI" - MPI_CLEAN= - export MPI_EPATH=$MARC_BIN - export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH - export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1" -# Below line is moved in run_marc file -# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN" - if test -n "$MSC_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE" - fi - if test -n "$LM_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE" - fi - export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x" - RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f " - RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np " - RUN_JOB0= - fi - if test $MPITYPE = intelmpi - then - INTELMPI_VERSION=HYDRA - FCOMPMPI=mpiifort - MPI_ROOT=$MARC_INTELMPI - DDM="-I${MPI_ROOT}/include64 -DDDM" - PATH=$MPI_ROOT/bin64:$PATH - export PATH - LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - if test $INTELMPI_VERSION = HYDRA - then - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall" - else - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile " - fi - RUN_JOB0= - MPI_CLEAN= - MPI_EPATH=$MARC_BIN - MPIR_HOME=$MPI_ROOT - MPICH_F77=$FCOMP - MPICH_F77LINKER=$FCOMP - export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER - I_MPI_PIN_DOMAIN=node - export I_MPI_PIN_DOMAIN - fi -else - MPI_ROOT=$MARC_DUMMYMPI - export MPI_ROOT=$MARC_DUMMYMPI - DDM="-I$MPI_ROOT/include" -fi - -# -# variables for the "maintain" script -# - -MACHINENAME=LINUX -MACHINE64BIT=yes -MACHINE=Linux_EM64T -DEV=/dev/tape -GETLOG="whoami" -CLEAR="clear" -MY_UNAME=`uname -a` - -# Edit following 2 lines to build with VKI Solver -#VKISOLVER=VKI -VKISOLVER=NONE - -# Edit following 2 lines to build with CASI Solver -CASISOLVER=CASI -if test "$MARC_CASISOLVER" = "NONE" ; then - CASISOLVER=NONE -fi -#CASISOLVER=NONE - -# Edit following 2 lines to build with MF2 Solver -MF2SOLVER=NONE -#MF2SOLVER=SERIAL -#MF2SOLVER=MF2PARALLEL - -# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO) -#INTELSOLVER=NONE -INTELSOLVER=PARDISO - -# Edit following lines to build with MUMPS -if test "$MARC_INTEGER_SIZE" = "i4" ; then - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -else - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -fi - -# Edit following 2 lines to build MARC dynamic shared library -MARC_DLL=MARC_DLL -MARC_DLL=NONE - -# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - VKISOLVER=NONE - CASISOLVER=NONE - MF2SOLVER=NONE - INTELSOLVER=NONE - MUMPSSOLVER=NONE - BCSGPUSOLVER=NONE - MARC_DLL=NONE -fi - -# -# define Fortran and C compile syntax -# -if test "$VKISOLVER" = VKI -then - SOLVERFLAGS="$SOLVERFLAGS -DVKI" -fi - -if test "$CASISOLVER" = CASI -then - SOLVERFLAGS="$SOLVERFLAGS -DCASI" -fi - -if test "$MF2SOLVER" = MF2PARALLEL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL" -fi -if test "$MF2SOLVER" = MF2SERIAL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL" -fi - -if test "$INTELSOLVER" = PARDISO -then - SOLVERFLAGS="$SOLVERFLAGS -DPARDISO" -fi - -if test "$MUMPSSOLVER" = MUMPS -then - SOLVERFLAGS="$SOLVERFLAGS -DMUMPS" -fi - - -if test "$MARC_DLL" = MARC_DLL -then - SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL" -fi - -LINK_OPT= -DEBUG_OPT= -C_DEBUG_OPT= - -#Uncomment following line to build Marc in debuggable mode -MARCDEBUG= -#MARCDEBUG="ON" - -if test "$MARCDEBUG" = "ON" -then - LINK_OPT="-debug -traceback" - DEBUG_OPT="-debug -traceback" - C_DEBUG_OPT="-debug -traceback" -fi - - -MARCCHECK= -#MARCCHECK="ON" -if test "$MARCCHECK" = "ON" -then - DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv " - C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv " -fi - -MARCCODECOV= -#MARCCODECOV="ON" - -MARCCODEPROF= -#MARCCODEPROF="ON" - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - I8FFLAGS="-real-size 64 -integer-size 32" - I8DEFINES="-DFLOAT=8 -DINT=4" - I8CDEFINES= - I8CASIDEFS= -else - I8FFLAGS="-i8 -real-size 64 -integer-size 64" - I8DEFINES="-DI64 -DFLOAT=8 -DINT=8" - I8CDEFINES="-U_DOUBLE -D_SINGLE" - I8CASIDEFS="-DCASI_64BIT_INT=1" -fi - -MTHREAD=OPENMP -if test "$MARC_OPENMP" = "NONE" ; then - MTHREAD=NONE -fi -#MTHREAD=NONE -if test "$_OEM_NASTRAN" -ne 0 -then -MTHREAD=NONE -fi - -OMP_COMPAT=NO -OMP_COMPAT=YES -if test "$MTHREAD" = "NONE" -then -OMP_COMPAT=NO -fi - -CDEFINES= -FDEFINES= - -if test "$_OEM_NASTRAN" -ne 0 -then - CDEFINES="$CDEFINES -D_OEM_NASTRAN" - FDEFINES="$FDEFINES -D_OEM_NASTRAN" -fi - -FDEFINES="$FDEFINES -D_IMPLICITNONE" - -if test "$_OEM_NASTRAN" -eq 0 -then - FDEFINES="$FDEFINES -DMKL -DOPENMP" -fi - -if test "$OMP_COMPAT" = "YES" -then - FDEFINES="$FDEFINES -DOMP_COMPAT" -fi - -# -D_MSCMARC -FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT" -CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES" - -CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS" -if test "$_OEM_NASTRAN" -ne 0 -then - CINCL="$CINCL -I../../include" -fi - -CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - -if test "$MARCDEBUG" = "ON" -then - CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -fi - -LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel" -CCT="$CC" -CCTLOW="$CCLOW" -CCTHIGH="$CCHIGH" - -CC_CASI="$CC -std=c99 $I8CASIDEFS" -CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -CCT_CASI="$CCT -std=c99 $I8CASIDEFS" -CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -#PROFILE="-Mprof=func" -#PROFILE="-Mprof=lines" -#PROFILE="-Mprof=func,mpi" -PROFILE= -if test "$MARCCODECOV" = "ON" -then -PROFILE="-prof-gen=srcpos" -fi -if test "$MARCCODEPROF" = "ON" -then -PROFILE=" $PROFILE -pg" -fi - -FORT_OPT="-c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr -mp1 -WB" -if test "$MTHREAD" = "OPENMP" -then - FORT_OPT=" $FORT_OPT -openmp" - if test "$OMP_COMPAT" = "YES" - then - FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat" - fi -else -# FORT_OPT=" $FORT_OPT -auto " - FORT_OPT=" $FORT_OPT -save -zero" -fi - -FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -# determine DAMASK version -if test -n "$DAMASK_USER"; then - DAMASKROOT=`dirname $DAMASK_USER`/.. - read DAMASKVERSION < $DAMASKROOT/VERSION - DAMASKVERSION="'"$DAMASKVERSION"'" -else - DAMASKVERSION="'N/A'" -fi - -# DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3 -DFORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias -O2 $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - -if test "$MARCDEBUG" = "ON" -then - FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - - # DAMASK compiler calls: additional flags are in line 2 OpenMP flags in line 3 - DFORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTLOWMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTRANMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-enable sc3 -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - DFORTHIGHMP="$FCOMP -c -implicitnone -stand f08 -standard-semantics -assume nostd_mod_proc_name -safe_cray_ptr $PROFILE -zero -mp1 -WB -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -fpp -ftz -diag-disable 5268 -warn declarations -warn general -warn usage -warn interfaces -warn ignore_loc -warn alignments -DMarc4DAMASK=2015 -DDAMASKVERSION=$DAMASKVERSION \ - -openmp -openmp_report2 -openmp-threadprivate=compat\ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - -fi - -FORTLOWT="$FORTLOW" -FORTRANT="$FORTRAN" -FORTHIGHT="$FORTHIGH" - -FORTRANMNF="$FCOMP -c $FDEFINES " -CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE" - -FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main" -CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include" - - -BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL" -NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES " -NVCCLIB="ar rvl" -NVCCLD=icc -BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORT90HIGH="$BCSFORTHIGH" -if test "$MARCDEBUG" = "ON" -then - BCSFORTRAN=$BCSFORTLOW - BCSFORTHIGH=$BCSFORTLOW - BCSFORT90HIGH=$BCSFORTLOW -fi - -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - fi -# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines -# if test $MPITYPE = intelmpi -# then -# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include" -# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# fi - if test $MPITYPE = intelmpi - then - LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - fi -else - LOAD="$FCOMP $LINK_OPT -o " - LOADT="$FCOMP $LINK_OPT -o " -fi - -if test "$MARC_DLL" = MARC_DLL -then - FORTLOW="$FORTLOW -fpp -fPIC" - FORTRAN="$FORTRAN -fpp -fPIC" - FORTHIGH="$FORTHIGH -fpp -fPIC" - FORTRANMNF="$FORTRANMNF -fpp -fPIC" - CC="$CC -fPIC" - CCMNF="$CCMNF -fPIC" - CC_CASI="$CC_CASI -fPIC" - CCLOW_CASI="$CCLOW_CASI -fPIC" - CCHIGH_CASI="$CCHIGH_CASI -fPIC" - LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread" - LINK_MARC_DLL="-shared -fPIC" - LOAD_DLL=$LOAD - LOADT_DLL=$LOADT - EXT_DLL="so" -fi - - -XLIBS="-L/usr/X11/lib -lX11 " - -# -# define archive and ranlib syntax -# - -ARC="ar rvl" -ARD="ar dvl" -ARX="ar xl" -RAN="" - -# -# choose which libraries you want to use ( e.g. blas ) -# - -if test "$VKISOLVER" = VKI -then - VKISOLVERLIBS="$MARC_LIB/vkisolver.a" -else - VKISOLVERLIBS= -fi - -if test "$CASISOLVER" = CASI -then - CASISOLVERLIBS="$MARC_CASI/casilib.a" -else - CASISOLVERLIBS= -fi - -MF2SOLVERLIBS= -if test "$MF2SOLVER" = MF2PARALLEL -then - MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \ - $MARC_LIB/mf2parallel/libsym.a \ - $MARC_LIB/mf2parallel/libmet.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libnum.a \ - $MARC_LIB/mf2parallel/libutl.a \ - $MARC_LIB/mf2parallel/libr8.a \ - $MARC_LIB/mf2parallel/libz.a " -fi - -if test "$INTELSOLVER" = PARDISO -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a" - else - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a" - fi -else - INTELSOLVERLIBS= -fi - -if test "$MUMPSSOLVER" = MUMPS -then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - if test $MPITYPE = none - then - MUMPSSOLVERLIBS2= - echo hello > /dev/null - fi - if test $MPITYPE = intelmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a " - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a " - fi - fi - if test $MPITYPE = hpmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a" - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a" - fi - fi -else - MUMPSSOLVERLIBS= - MUMPSSOLVERLIBS2= -fi - -if test "$BCSGPUSOLVER" = BCSGPU -then - BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a " - MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda " - MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda " - MARCCUDALIBS=$MARCCUDALIBS1 - CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda " -else - BCSSOLVERLIBS="${MARC_LIB}/bcslib.a " -fi - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_lp64.a -Wl,--end-group" -else - MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_core.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a -Wl,--end-group" -fi - -SECLIBS="-L$MARC_LIB -llapi" - -SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${INTELSOLVERLIBS} ${MF2SOLVERLIBS} ${MUMPSSOLVERLIBS2} \ - $MKLLIB -L$MARC_MKL -liomp5 \ - $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a " - -SOLVERLIBS_DLL=${SOLVERLIBS} - -MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}" -MRCLIBSPAR="$MARC_LIB/clib.a" -STUBS="$MARC_LIB/stubs.a " -MNFLIBS="$MARC_LIB/libmnf.a" -MDUSER="$MARC_LIB/md_user.a" - -OPENMP="-openmp" - -SYSLIBS=" $OPENMP -lpthread " - -# Uncomment the following lines to turn on the trace and comment out the next 4 lines -# if test $MPITYPE = intelmpi -# then -# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \ -# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt" -# fi -if test $MPITYPE = intelmpi -then - SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt $OPENMP -threads -lpthread " -fi - -SYSLIBSPAR=" " - -MARC_DLL_CODES="runmarc.f" - - -BLAS_SRC="dzero.f icopy.f izero.f" -if test "$_OEM_NASTRAN" -ne 0 -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f" - else - BLAS_SRC="ALL" - fi -fi - -LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \ - omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \ - elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \ - cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \ - inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f" -if test "$MARC_INTEGER_SIZE" = "i8" ; then - LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f" -fi -LOW_OPT_CODES_CASI="" - -HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \ - dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \ - dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f " - - -HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c" - -MAXNUM=1000000 diff --git a/installation/mods_MarcMentat/2015/Marc_tools/include_linux64.original b/installation/mods_MarcMentat/2015/Marc_tools/include_linux64.original deleted file mode 100644 index dcda057af..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/include_linux64.original +++ /dev/null @@ -1,688 +0,0 @@ -# -# General definitions for the Marc 2014 version -# -# EM64T -# ( LP64 - i4 version) -# (ILP64 - i8 version) -# -# Linux RedHat 5.7 -# -# 64 bit MPI version -# -# Intel(R) Fortran Compiler -# Version 13.0.1 -# -# Intel(R) C Compiler -# Version 13.0.1 -# -# MKL Libraries: -# Intel(R) MKL 10.3 -# -# DATE -# -# To check the O/S level, type: -# uname -a -# -# Distributed parallel MPI libraries: -# 1) HP MPI 2.3 -# To check the mpi version, type: -# mpirun -version -# 2) Intel MPI 4.0 -# To check the mpi version, type: -# mpirun -version -# -# To check the Compiler level, type using the compiler -# installation path: -# ifort -V -# icc -V -# -# REMARKS : This file contains the definitions of variables used during -# compilation loading and use of the MARC programmes . The -# current machine type is identified by means of the variable -# MACHINE , defined below. -# -# -# MPI_ROOT: root directory in which mpi shared libraries, etc. are located -# DIRJOB : directory in which spawned jobs should look for Marc input -# MPI_ARCH: system architecture -# MPI_EPATH: path where executable resides -# -REVISION="VERSION, BUILD" -HOSTNAME=`hostname` - -# find available memory in Mbyte on the machine -# can be set explicitly -MEMLIMIT=`free -m | awk '/Mem:/ {print $2}'` - -# set _OEM_NASTRAN to 1 for MD Nastran build -# override _OEM_NASTRAN setting with MARC_MD_NASTRAN environment variable -_OEM_NASTRAN="${MARC_MD_NASTRAN:-0}" - -# uncomment the following line for an autoforge build -#AUTOFORGE=1 -AUTOFORGE=0 -export AUTOFORGE - -# integer size -if test "$MARC_INTEGER_SIZE" = "" ; then - INTEGER_PATH= -else - INTEGER_PATH=/$MARC_INTEGER_SIZE -fi - -FCOMP=ifort - -# -# settings for Metis -# -METIS="-I$METIS_SOURCE/include" -METISLIBS="$MARC_LIB/metis.a " - -# -# settings for MPI -# -# RCP and RSH are used for parallel network runs -# replace with similar commands like rsh if needed -RCP=/usr/bin/scp -RSH=/usr/bin/ssh -# - - -MPI_DEFAULT=intelmpi -MPI_OTHER=hpmpi - -MPITYPE=$MPI_DEFAULT - -if test $AUTOFORGE -then - if test $AUTOFORGE = 1 - then - MPITYPE=none - fi -fi - - -# overrule MPITYPE setting with environmental variable MARC_MPITYPE -if test $MARC_MPITYPE -then - MPITYPE=$MARC_MPITYPE -fi - -# always set MPITYPE to none for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - MPITYPE=none -fi - -# Edit following lines to build with GPGPU version of BCS Solver for -# NVIDIA platforms -#BCSGPUSOLVER=NONE -BCSGPUSOLVER=BCSGPU - -SOLVERFLAGS= -if test "$BCSGPUSOLVER" = BCSGPU -then - SOLVERFLAGS="$SOLVERFLAGS -DBCSGPU -DCUDA" - BCS_DIR=bcsgpusolver - export PATH=$MARC_CUDA/bin:$MARC_CUDA/nvvm:$PATH - export LD_LIBRARY_PATH=$MARC_CUDA/lib64:$LD_LIBRARY_PATH -else - BCS_DIR=bcssolver -fi -# -# settings for MPI -# -DDM= -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - FCOMPMPI=mpif90 - export MPI_ROOT=$MARC_HPMPI - export MPI_REMSH=$RSH - export MPI_F77=$FCOMP - ARCHITECTURE=linux_amd64 - DDM="-I$MPI_ROOT/include/64 -DDDM -DHPMPI" - MPI_CLEAN= - export MPI_EPATH=$MARC_BIN - export LD_LIBRARY_PATH=$MPI_ROOT/lib/$ARCHITECTURE:$MARC_LIB:$MARC_LIB_SHARED:$LD_LIBRARY_PATH - export MPIHPSPECIAL="-e MPI_FLAGS=E,T,y1" -# Below line is moved in run_marc file -# export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - export MPIHPSPECIAL="$MPIHPSPECIAL -e BINDIR=$MARC_BIN" - if test -n "$MSC_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e MSC_LICENSE_FILE=$MSC_LICENSE_FILE" - fi - if test -n "$LM_LICENSE_FILE" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LM_LICENSE_FILE=$LM_LICENSE_FILE" - fi - export MPIHPSPECIAL="$MPIHPSPECIAL -e MPI_LIC_CHECKER=$MPI_ROOT/bin/licensing/amd64_s8/lichk.x" - RUN_JOB2="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -f " - RUN_JOB1="$MPI_ROOT/bin/mpirun ${MPIRUNOPTIONS} -prot -w $MPIHPSPECIAL -np " - RUN_JOB0= - fi - if test $MPITYPE = intelmpi - then - INTELMPI_VERSION=HYDRA - FCOMPMPI=mpiifort - MPI_ROOT=$MARC_INTELMPI - DDM="-I${MPI_ROOT}/include64 -DDDM" - PATH=$MPI_ROOT/bin64:$PATH - export PATH - LD_LIBRARY_PATH=$MPI_ROOT/lib64:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - if test $INTELMPI_VERSION = HYDRA - then - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec.hydra -genvall -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec.hydra -genvall" - else - RUN_JOB1="${MPI_ROOT}/bin64/mpiexec -n " - RUN_JOB2="${MPI_ROOT}/bin64/mpiexec -configfile " - fi - RUN_JOB0= - MPI_CLEAN= - MPI_EPATH=$MARC_BIN - MPIR_HOME=$MPI_ROOT - MPICH_F77=$FCOMP - MPICH_F77LINKER=$FCOMP - export MPI_ROOT MPI_EPATH MPIR_HOME MPICH_F77 MPICH_F77LINKER - I_MPI_PIN_DOMAIN=node - export I_MPI_PIN_DOMAIN - fi -else - MPI_ROOT=$MARC_DUMMYMPI - export MPI_ROOT=$MARC_DUMMYMPI - DDM="-I$MPI_ROOT/include" -fi - -# -# variables for the "maintain" script -# - -MACHINENAME=LINUX -MACHINE64BIT=yes -MACHINE=Linux_EM64T -DEV=/dev/tape -GETLOG="whoami" -CLEAR="clear" -MY_UNAME=`uname -a` - -# Edit following 2 lines to build with VKI Solver -#VKISOLVER=VKI -VKISOLVER=NONE - -# Edit following 2 lines to build with CASI Solver -CASISOLVER=CASI -if test "$MARC_CASISOLVER" = "NONE" ; then - CASISOLVER=NONE -fi -#CASISOLVER=NONE - -# Edit following 2 lines to build with MF2 Solver -MF2SOLVER=NONE -#MF2SOLVER=SERIAL -#MF2SOLVER=MF2PARALLEL - -# Edit following lines to build with Intel(c) Multithreaded solver (PARDISO) -#INTELSOLVER=NONE -INTELSOLVER=PARDISO - -# Edit following lines to build with MUMPS -if test "$MARC_INTEGER_SIZE" = "i4" ; then - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -else - #MUMPSSOLVER=NONE - MUMPSSOLVER=MUMPS -fi - -# Edit following 2 lines to build MARC dynamic shared library -MARC_DLL=MARC_DLL -MARC_DLL=NONE - -# always set VKISOLVER, CASISOLVER, BCSGPUSOLVER, and MARC_DLL to NONE for MD Nastran -if test "$_OEM_NASTRAN" -ne 0 -then - VKISOLVER=NONE - CASISOLVER=NONE - MF2SOLVER=NONE - INTELSOLVER=NONE - MUMPSSOLVER=NONE - BCSGPUSOLVER=NONE - MARC_DLL=NONE -fi - -# -# define Fortran and C compile syntax -# -if test "$VKISOLVER" = VKI -then - SOLVERFLAGS="$SOLVERFLAGS -DVKI" -fi - -if test "$CASISOLVER" = CASI -then - SOLVERFLAGS="$SOLVERFLAGS -DCASI" -fi - -if test "$MF2SOLVER" = MF2PARALLEL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2PARALLEL" -fi -if test "$MF2SOLVER" = MF2SERIAL -then - SOLVERFLAGS="$SOLVERFLAGS -DMF2SERIAL" -fi - -if test "$INTELSOLVER" = PARDISO -then - SOLVERFLAGS="$SOLVERFLAGS -DPARDISO" -fi - -if test "$MUMPSSOLVER" = MUMPS -then - SOLVERFLAGS="$SOLVERFLAGS -DMUMPS" -fi - - -if test "$MARC_DLL" = MARC_DLL -then - SOLVERFLAGS="$SOLVERFLAGS -DMARC_DLL" -fi - -LINK_OPT= -DEBUG_OPT= -C_DEBUG_OPT= - -#Uncomment following line to build Marc in debuggable mode -MARCDEBUG= -#MARCDEBUG="ON" - -if test "$MARCDEBUG" = "ON" -then - LINK_OPT="-debug -traceback" - DEBUG_OPT="-debug -traceback" - C_DEBUG_OPT="-debug -traceback" -fi - - -MARCCHECK= -#MARCCHECK="ON" -if test "$MARCCHECK" = "ON" -then - DEBUG_OPT="$DEBUG_OPT -fpe0 -fp-stack-check -check all -ftrapuv " - C_DEBUG_OPT="$C_DEBUG_OPT -fp-stack-check -check-uninit -Wformat -ftrapuv " -fi - -MARCCODECOV= -#MARCCODECOV="ON" - -MARCCODEPROF= -#MARCCODEPROF="ON" - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - I8FFLAGS= - I8DEFINES= - I8CDEFINES= - I8CASIDEFS= -else - I8FFLAGS="-i8" - I8DEFINES="-DI64" - I8CDEFINES="-U_DOUBLE -D_SINGLE" - I8CASIDEFS="-DCASI_64BIT_INT=1" -fi - -MTHREAD=OPENMP -if test "$MARC_OPENMP" = "NONE" ; then - MTHREAD=NONE -fi -#MTHREAD=NONE -if test "$_OEM_NASTRAN" -ne 0 -then -MTHREAD=NONE -fi - -OMP_COMPAT=NO -OMP_COMPAT=YES -if test "$MTHREAD" = "NONE" -then -OMP_COMPAT=NO -fi - -CDEFINES= -FDEFINES= - -if test "$_OEM_NASTRAN" -ne 0 -then - CDEFINES="$CDEFINES -D_OEM_NASTRAN" - FDEFINES="$FDEFINES -D_OEM_NASTRAN" -fi - -FDEFINES="$FDEFINES -D_IMPLICITNONE" - -if test "$_OEM_NASTRAN" -eq 0 -then - FDEFINES="$FDEFINES -DMKL -DOPENMP" -fi - -if test "$OMP_COMPAT" = "YES" -then - FDEFINES="$FDEFINES -DOMP_COMPAT" -fi - -# -D_MSCMARC -FDEFINES="$FDEFINES -D_MSCMARC $DEBUG_OPT" -CDEFINES="$CDEFINES -D_MSCMARC $C_DEBUG_OPT $I8CDEFINES" - -CINCL="-I$MARC_SOURCE/mdsrc -I$MARC_SOURCE/csource $METIS" -if test "$_OEM_NASTRAN" -ne 0 -then - CINCL="$CINCL -I../../include" -fi - -CC="icc -c -O1 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCLOW="icc -c -O0 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -CCHIGH="icc -c -O3 $I8DEFINES -DLinux -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - -if test "$MARCDEBUG" = "ON" -then - CC="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCLOW="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " - CCHIGH="icc -c -DLinux $I8DEFINES -DLINUX -DLinux_intel $CDEFINES $CINCL $SOLVERFLAGS " -fi - -LOAD_CC="icc -O1 -DLinux -DLINUX -DLinux_intel" -CCT="$CC" -CCTLOW="$CCLOW" -CCTHIGH="$CCHIGH" - -CC_CASI="$CC -std=c99 $I8CASIDEFS" -CCLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -CCT_CASI="$CCT -std=c99 $I8CASIDEFS" -CCTLOW_CASI="$CCLOW -std=c99 $I8CASIDEFS" -CCTHIGH_CASI="$CCHIGH -std=c99 $I8CASIDEFS" - -#PROFILE="-Mprof=func" -#PROFILE="-Mprof=lines" -#PROFILE="-Mprof=func,mpi" -PROFILE= -if test "$MARCCODECOV" = "ON" -then -PROFILE="-prof-gen=srcpos" -fi -if test "$MARCCODEPROF" = "ON" -then -PROFILE=" $PROFILE -pg" -fi - -FORT_OPT="-c -assume byterecl -safe_cray_ptr -mp1 -WB" -if test "$MTHREAD" = "OPENMP" -then - FORT_OPT=" $FORT_OPT -openmp" - if test "$OMP_COMPAT" = "YES" - then - FORT_OPT=" $FORT_OPT -openmp-threadprivate=compat" - fi -else -# FORT_OPT=" $FORT_OPT -auto " - FORT_OPT=" $FORT_OPT -save -zero" -fi - -FORTLOW="$FCOMP $FORT_OPT $PROFILE -O0 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTRAN="$FCOMP $FORT_OPT $PROFILE -O1 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" -FORTNA="$FCOMP $FORT_OPT -fno-alias -O3 $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" - -if test "$MARCDEBUG" = "ON" -then - FORTLOW="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTRAN="$FCOMP $FORT_OPT $PROFILE $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTHIGH="$FCOMP $FORT_OPT $PROFILE -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM $SOLVERFLAGS" - FORTNA="$FCOMP $FORT_OPT -fno-alias $I8FFLAGS -I$MARC_SOURCE/common \ - -I$MARC_SOURCE/${BCS_DIR}/common -I$MARC_SOURCE/mumpssolver/include $I8DEFINES -DLinux -DLINUX -DLinux_intel $FDEFINES $DDM" -fi - -FORTLOWT="$FORTLOW" -FORTRANT="$FORTRAN" -FORTHIGHT="$FORTHIGH" - -FORTRANMNF="$FCOMP -c $FDEFINES " -CCMNF="icc -c -O1 -DLinux -DLINUX -DLinux_intel -Dport2egcs -I$MARC_SOURCE/marctoadams/mnf/include -D_LARGEFILE64_SOURCE" - -FORTRANMUMPS="$FCOMP -fpp $FORT_OPT $PROFILE -fno-alias -O1 -fp-model precise $FDEFINES -D_IMPLICITNONE $I8FFLAGS $I8DEFINES $DDM -I$MARC_SOURCE/mumpssolver/include -Dintel_ -DALLOW_NON_INIT -Dmetis -nofor_main" -CCMUMPS="icc -c -DAdd_ -Dmetis -I$MARC_SOURCE/mumpssolver/include" - - -BCSCC="icc -c -O3 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_csrc $CDEFINES $CINCL" -NVCC="nvcc -c -O3 -arch sm_20 -DLOWERCASE_ -I${MARC_SOURCE}/${BCS_DIR}/bcslib_cuda/include -I${MARC_CUDA}/include -I$MARC_SOURCE/mdsrc $I8DEFINES -Xcompiler -fvisibility=hidden -Xcompiler -fPIC $I8DEFINES " -NVCCLIB="ar rvl" -NVCCLD=icc -BCSFORTLOW="$FORTLOW -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTRAN="$FORTRAN -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORTHIGH="$FORTHIGH -I${MARC_SOURCE}/${BCS_DIR}/common" -BCSFORT90HIGH="$BCSFORTHIGH" -if test "$MARCDEBUG" = "ON" -then - BCSFORTRAN=$BCSFORTLOW - BCSFORTHIGH=$BCSFORTLOW - BCSFORT90HIGH=$BCSFORTLOW -fi - -if test $MPITYPE != none -then - if test $MPITYPE = hpmpi - then - LOAD="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin/$FCOMPMPI ${LOADOPTIONS} -L$MPI_ROOT/lib/$ARCHITECTURE $PROFILE $LINK_OPT -o " - fi -# Uncomment the following lines to turn on the tracer and commnet out the next 5 lines -# if test $MPITYPE = intelmpi -# then -# INCLUDEMPI="-I$MPI_ROOT/include64 -I$VT_ROOT/include" -# LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $INCLUDEMPI -g -t=log $LINK_OPT -o " -# fi - if test $MPITYPE = intelmpi - then - LOAD="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - LOADT="$MPI_ROOT/bin64/$FCOMPMPI $PROFILE $LINK_OPT -o " - fi -else - LOAD="$FCOMP $LINK_OPT -o " - LOADT="$FCOMP $LINK_OPT -o " -fi - -if test "$MARC_DLL" = MARC_DLL -then - FORTLOW="$FORTLOW -fpp -fPIC" - FORTRAN="$FORTRAN -fpp -fPIC" - FORTHIGH="$FORTHIGH -fpp -fPIC" - FORTRANMNF="$FORTRANMNF -fpp -fPIC" - CC="$CC -fPIC" - CCMNF="$CCMNF -fPIC" - CC_CASI="$CC_CASI -fPIC" - CCLOW_CASI="$CCLOW_CASI -fPIC" - CCHIGH_CASI="$CCHIGH_CASI -fPIC" - LINK_EXE_MARC="-L$MARC_LIB -lmarc -L$MARC_LIB_SHARED -lguide -lpthread" - LINK_MARC_DLL="-shared -fPIC" - LOAD_DLL=$LOAD - LOADT_DLL=$LOADT - EXT_DLL="so" -fi - - -XLIBS="-L/usr/X11/lib -lX11 " - -# -# define archive and ranlib syntax -# - -ARC="ar rvl" -ARD="ar dvl" -ARX="ar xl" -RAN="" - -# -# choose which libraries you want to use ( e.g. blas ) -# - -if test "$VKISOLVER" = VKI -then - VKISOLVERLIBS="$MARC_LIB/vkisolver.a" -else - VKISOLVERLIBS= -fi - -if test "$CASISOLVER" = CASI -then - CASISOLVERLIBS="$MARC_CASI/casilib.a" -else - CASISOLVERLIBS= -fi - -MF2SOLVERLIBS= -if test "$MF2SOLVER" = MF2PARALLEL -then - MF2SOLVERLIBS="$MARC_LIB/mf2parallel/libseq.a \ - $MARC_LIB/mf2parallel/libsym.a \ - $MARC_LIB/mf2parallel/libmet.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libmf2.a \ - $MARC_LIB/mf2parallel/libgauss.a \ - $MARC_LIB/mf2parallel/libnum.a \ - $MARC_LIB/mf2parallel/libutl.a \ - $MARC_LIB/mf2parallel/libr8.a \ - $MARC_LIB/mf2parallel/libz.a " -fi - -if test "$INTELSOLVER" = PARDISO -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_lp64.a" - else - INTELSOLVERLIBS="$MARC_MKL/libmkl_solver_ilp64.a" - fi -else - INTELSOLVERLIBS= -fi - -if test "$MUMPSSOLVER" = MUMPS -then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - if test $MPITYPE = none - then - MUMPSSOLVERLIBS2= - echo hello > /dev/null - fi - if test $MPITYPE = intelmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_lp64.a " - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_intelmpi_ilp64.a " - fi - fi - if test $MPITYPE = hpmpi - then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_lp64.a" - else - MUMPSSOLVERLIBS2=" $MARC_MKL/libmkl_blacs_ilp64.a" - fi - fi -else - MUMPSSOLVERLIBS= - MUMPSSOLVERLIBS2= -fi - -if test "$BCSGPUSOLVER" = BCSGPU -then - BCSSOLVERLIBS="${MARC_LIB}/bcsgpulib.a " - MARCCUDALIBS1="-L${MARC_LIB}/cuda_dummy -lmarccuda " - MARCCUDALIBS2="-L${MARC_LIB}/cuda -lmarccuda " - MARCCUDALIBS=$MARCCUDALIBS1 - CUDALIBS="-L$MARC_CUDA/lib64 -lcudart -lcublas -L/usr/lib64 -lcuda " -else - BCSSOLVERLIBS="${MARC_LIB}/bcslib.a " -fi - -if test "$MARC_INTEGER_SIZE" = "i4" ; then - MKLLIB="$MARC_MKL/libmkl_scalapack_lp64.a $MARC_MKL/libmkl_blacs_lp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_lp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group" -else - MKLLIB="$MARC_MKL/libmkl_scalapack_ilp64.a $MARC_MKL/libmkl_blacs_ilp64.a -Wl,--start-group $MARC_MKL/libmkl_intel_ilp64.a $MARC_MKL/libmkl_intel_thread.a $MARC_MKL/libmkl_core.a -Wl,--end-group" -fi - -SECLIBS="-L$MARC_LIB -llapi" - -SOLVERLIBS="${BCSSOLVERLIBS} ${VKISOLVERLIBS} ${CASISOLVERLIBS} ${INTELSOLVERLIBS} ${MF2SOLVERLIBS} ${MUMPSSOLVERLIBS2} \ - $MKLLIB -L$MARC_MKL -liomp5 \ - $MARC_LIB/blas_src.a ${ACSI_LIB}/ACSI_MarcLib.a " - -SOLVERLIBS_DLL=${SOLVERLIBS} - -MRCLIBS="$MARC_LIB/clib.a ${CASISOLVERLIBS}" -MRCLIBSPAR="$MARC_LIB/clib.a" -STUBS="$MARC_LIB/stubs.a " -MNFLIBS="$MARC_LIB/libmnf.a" -MDUSER="$MARC_LIB/md_user.a" - -OPENMP="-openmp" - -SYSLIBS=" $OPENMP -lpthread -shared-intel " - -# Uncomment the following lines to turn on the trace and comment out the next 4 lines -# if test $MPITYPE = intelmpi -# then -# SYSLIBS="-L${VT_ROOT}/lib -lVT -ldwarf -lelf -lm -lpthread \ -# -L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt" -# fi -if test $MPITYPE = intelmpi -then - SYSLIBS="-L${MPI_ROOT}/lib64 -lmpi -lmpiif -lmpigi -lrt $OPENMP -threads -lpthread -shared-intel " -fi - -SYSLIBSPAR=" " - -MARC_DLL_CODES="runmarc.f" - - -BLAS_SRC="dzero.f icopy.f izero.f" -if test "$_OEM_NASTRAN" -ne 0 -then - if test "$MARC_INTEGER_SIZE" = "i4" ; then - BLAS_SRC="$BLAS_SRC dsctr.f zsctr.f dzasum.f daxpyi.f zaxpyi.f dgthr.f zgthr.f" - else - BLAS_SRC="ALL" - fi -fi - -LOW_OPT_CODES="are163.f contro.f ndext.f omarc.f omarca.f omarcb.f omarcc.f \ - omars.f fixbc.f triang.f bet049.f norst3.f eldata.f \ - elec*.f elct*.f fmeig.f oada00.f ogeig.f updtrbe2.f cycrota.f \ - cordef.f ogpk.f ogtan.f eldam.f formrbe3.f \ - inertie.f em_sso072.f cn_fol3d_qpatch6.f cosim_begin.f" -if test "$MARC_INTEGER_SIZE" = "i8" ; then - LOW_OPT_CODES="$LOW_OPT_CODES bbcseg.f" -fi -LOW_OPT_CODES_CASI="" - -HIGH_OPT_CODES="dpsmsa1.f dpsmsa2.f dpsmsa3.f dpsmsa4.f dpsmsa5.f dpsmsa6.f \ - dpsmsa7.f dpsmsa8.f dpsmsa9.f dpsmsa10.f dpsmsa11.f dpsmsa12.f \ - dpsmsa13.f dpsmsa14.f dpsmsa15.f dpsmsa16.f dpsmsah.f tpsmsah.f cn_qsort4_11.f " - - -HIGH_OPT_CODES_CASI="arithkernels.c blockedroutines.c blockedroutines_fd.c elemmatgenkernels.c longvecroutines.c sfmultutils.c solvewithbd.c" - -MAXNUM=1000000 diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_damask b/installation/mods_MarcMentat/2015/Marc_tools/run_damask deleted file mode 100644 index ef792247a..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_damask +++ /dev/null @@ -1,4135 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -# getting user subroutine file name -found=0 -for i in "$@"; do - if test $found = 1; then - DAMASK_USER=$i - found=0 - fi - case $i in - -u* | -U*) - found=1 - ;; - esac -done -# sourcing include_linux64 (needs DAMASK_USER to be set) -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRAN $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRAN $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_h b/installation/mods_MarcMentat/2015/Marc_tools/run_damask_h deleted file mode 100644 index b77e80157..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_h +++ /dev/null @@ -1,4135 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -# getting user subroutine file name -found=0 -for i in "$@"; do - if test $found = 1; then - DAMASK_USER=$i - found=0 - fi - case $i in - -u* | -U*) - found=1 - ;; - esac -done -# sourcing include_linux64 (needs DAMASK_USER to be set) -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_h $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_h $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGH $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGH $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_hmp b/installation/mods_MarcMentat/2015/Marc_tools/run_damask_hmp deleted file mode 100644 index 270e78f17..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_hmp +++ /dev/null @@ -1,4135 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -# getting user subroutine file name -found=0 -for i in "$@"; do - if test $found = 1; then - DAMASK_USER=$i - found=0 - fi - case $i in - -u* | -U*) - found=1 - ;; - esac -done -# sourcing include_linux64 (needs DAMASK_USER to be set) -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_hmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTHIGHMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTHIGHMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_l b/installation/mods_MarcMentat/2015/Marc_tools/run_damask_l deleted file mode 100644 index 87c63f05a..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_l +++ /dev/null @@ -1,4135 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -# getting user subroutine file name -found=0 -for i in "$@"; do - if test $found = 1; then - DAMASK_USER=$i - found=0 - fi - case $i in - -u* | -U*) - found=1 - ;; - esac -done -# sourcing include_linux64 (needs DAMASK_USER to be set) -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_l $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_l $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOW $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOW $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_lmp b/installation/mods_MarcMentat/2015/Marc_tools/run_damask_lmp deleted file mode 100644 index 9c10c5229..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_lmp +++ /dev/null @@ -1,4135 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -# getting user subroutine file name -found=0 -for i in "$@"; do - if test $found = 1; then - DAMASK_USER=$i - found=0 - fi - case $i in - -u* | -U*) - found=1 - ;; - esac -done -# sourcing include_linux64 (needs DAMASK_USER to be set) -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_lmp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTLOWMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTLOWMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_mp b/installation/mods_MarcMentat/2015/Marc_tools/run_damask_mp deleted file mode 100644 index 5f34b18f5..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_damask_mp +++ /dev/null @@ -1,4135 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -# getting user subroutine file name -found=0 -for i in "$@"; do - if test $found = 1; then - DAMASK_USER=$i - found=0 - fi - case $i in - -u* | -U*) - found=1 - ;; - esac -done -# sourcing include_linux64 (needs DAMASK_USER to be set) -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usernoext= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - if test ! -f $user - then - error="$error -user subroutine file $user not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" -fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $user -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($user)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=$value - case $user in - \/*) - ;; - *) - user=`pwd`/$user - ;; - esac - usernoext=$user - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .for` - usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f90` - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# -# add DAMASK options for linking - DAMASK="-lstdc++" - - if test "$user" - then - program=$usernoext.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$usernoext.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$usermoext.o - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_damask_mp $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user on host `hostname`" - fi - userobj=$usernoext.o - if test $MACHINENAME = "CRAY" - then - $DFORTRANMP $user || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $DFORTRANMP $user -o $userobj || \ - { - echo "$0: compile failed for $user" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $DAMASK \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null -/bin/rm $DIRJOB/*.mod 2>/dev/null -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi -fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=$usernoext - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Marc_tools/run_marc.original b/installation/mods_MarcMentat/2015/Marc_tools/run_marc.original deleted file mode 100644 index 394cb874b..000000000 --- a/installation/mods_MarcMentat/2015/Marc_tools/run_marc.original +++ /dev/null @@ -1,4218 +0,0 @@ -#!/bin/ksh -############################################################################## -# # -# run_marc - run a marc job # -# ------------------------- # -# # -# usage: run_marc -j jid { options } # -# # -# where standard options are: required: defaults: # -# -------------------------- # -# # -# -j* jid job id number. ** YES ** . # -# -pr* prog program name. . marc # -# -v* y|n do or do not verify inputs. . yes # -# -q* s|l|v|b|f batch queue name or background, . short # -# foreground. # -# -b* as alternative to option -q* # -# # -# ( batch queues only : # -# -pq* intra queue priority. . . # -# -at DATE/TIME delay start of job. . . # -# format : January,1,1990,12:31 # -# or : today,5pm # -# -cpu* secs job CPU limit . . ) # -# # -# -r* rid restart file job id. . . # -# -si* sid substructure file id. . . # -# -pi* post post file job id. . . # -# -de* did defaults file . no # -# -vf vid viewfactor . no # -# # -# -u* user user subroutine. . . # -# -obj obj user objects or libraries. . . # -# -sa* y|n do or do not save load module. . no # -# -autorst auto restart flag for auto forge . no # -# -me manual remeshing control . no # -# -ml memory limit in Mbyte # -# -mo This option is deprecated. As of Marc 2015, only # -# the integer*8 version is available. # -# -mpi selects MPI version # -# each platform has a default MPI version and some # -# have an alternative version. see the include file # -# for the respective platform # -# MPI_DEFAULT defines the default MPI version # -# MPI_OTHER defines versions one can switch to # -# -dcoup for contact decoupling # -# currently not supported # -# -dir directory where the job i/o should take place. # -# defaults to current directory. # -# -sdir directory where scratch files are created # -# defaults to current directory. # -# # -# -alloc only perform memory allocation test, no analysis # -# -list y only list options in the input file, no analysis # -# -fe num set feature number "num" for the run. only one allowed # -# -dytran flag to switch from Dytran to Marc # -# dytran = 0, program will run w/o Marc-Dytran Switch # -# = 1, program will restart Marc after Dytran run # -# >= 2, Not supported yet. # -# currently not supported # -# -ou force analysis to use out-of-core control # -# =0, not used # -# =1, element storage out-of-core # -# -dll run marc using shared library libmarc.so and exe_marc # -# =1, used # -# =2, do not free streaming input memory # -# =3, run with marc input deck # -# -trk run marc for post-tracking # -# -gpuid run marc using GPGPU capability # -# specify gpuid on to be used in the analysis. Multiple # -# IDs may be assigned for DDM runs. # -# Separate a list of IDs with a colon. Each DMP # -# process will be assigned a GPU ID in round robin fastion# -# = 0 # -# = 0:1 etc... # -# # -# where parallel options are: # -# -------------------------- # -# # -# itree, host, and comp options are available for the domain # -# decomposition only. # -# MARC_NUMBER_OF_THREADS, nthread, and dir options always available. # -# # -# # -# -nprocd number of domains. # -# defaults to single domain solution. # -# -nprocds number of domains if single input file. # -# defaults to single domain solution. # -# -nps same as -nprocds. # -# -nsolver number of solver tasks for solver types 12 and 13 # -# these are distributed tasks operating via MPI # -# -nthread_elem number of threads for element assembly and recovery # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by element assembly # -# recovery. # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_elem option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_elem specified. # -# -nthread_solver number of threads for solver types 6, 8, and 11 # -# = 0: use defaults. # -# defaults to 1 for single domain solution. # -# defaults to number of domains for multi-domain # -# solution. # -# > 1: number of threads to be used by 6, 8, and 11 # -# Also can be set through MARC_NUMBER_OF_THREADS # -# environment variable. # -# if both specified, -nthread_solver option will be used. # -# defaults if neither MARC_NUMBER_OF_THREADS environment # -# variable set nor -nthread_solver specified. # -# -nthread Same as -nthread_solver. # -# -itree message passing tree type for domain decomposition. # -# for debugging purposes; should not normally be used. # -# -host hostfile name for distributed execution on network. # -# defaults to no hostfile, unless jobid.defhost exists. # -# if jobid.defhost exists, only -np(s) necessary # -# -comp* y|n to be used with user routines on a network of # -# incompatible machines. # -# if set to no, a separate executable will be created # -# for each machine on the network. # -# if set to yes, the executable located on the machine # -# from which marc is started will be used on all machines.# -# defaults to no if O/S versions different on machines. # -# # -# -ci y|n copy input files to remote hosts (default: yes) # -# if "yes", input files are automatically copied to # -# remote hosts for a network run if necessary. # -# -cr y|n copy post files from remote hosts (default: yes) # -# if "yes", post files are automatically copied back from # -# remote hosts for a network run if necessary. # -############################################################################## -# set DIR to the directory in which this script is -REALCOM="`/bin/ls -l $0 |awk '{ print $NF; }'`" -DIR=`dirname $REALCOM` -# make sure DIR has an absolute path -case $DIR in - \/*) - ;; - *) - DIR=`pwd`/$DIR - ;; -esac -DIRSCRIPT=$DIR -AWK=awk -ARCH=`uname -a | cut -f 1 -d " "` -# Sun has a bad awk, use nawk instead -if test $ARCH = "SunOS" -then - AWK=nawk -fi -BASENAME=basename -# Sun has an incorrect /bin/basename, check if /usr/ucb/basename exists -if test $ARCH = "SunOS" -then - if test -x /usr/ucb/basename - then - BASENAME=/usr/ucb/basename - fi -fi - -# echo command line in the case of ECHO_COMMAND is true -if test "$ECHO_COMMAND" = true ; then - echo command "$0" "$@" -fi - -# -# "mode" selects version, i4 or i8 -# default is i4 -# this can be changed by a file run_marc_defaults -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MODE i8 -# it can also be set by the environmental variable MARC_INTEGER_SIZE -# and by the command line option "-mo" -# -mode= -modeerror= -modeoption= -if test -f $DIRSCRIPT/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $DIRSCRIPT/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $DIRSCRIPT/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $DIRSCRIPT/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -f $HOME/run_marc_defaults; then - line=`$AWK '{if ($1 == "MARC_MODE") {print $1}}' $HOME/run_marc_defaults` - if test "$line" = "MARC_MODE"; then - echo - echo warning: the option MARC_MODE is deprecated, as of Marc 2015, only the integer*8 version is available - echo - line= - fi - line=`$AWK '{if ($1 == "MARC_MODE") {print $2}}' $HOME/run_marc_defaults` - line=`echo $line | $AWK '{print $NF}'` - if test "$line" = "i4"; then - modeerror="defaults file $HOME/run_marc_defaults used mode $line ; this must be i8" - modeoption=error - echo $modeerror - fi - if test "$line" = "i8"; then - mode=i8 - fi -fi -if test -n "$MARC_INTEGER_SIZE" ; then - mode=$MARC_INTEGER_SIZE -fi -if test -z "$mode" ; then - mode=i8 -fi -case $mode in - i4) - modeerror="bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - modeoption=error - echo $modeerror - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo "bad value for MARC_INTEGER_SIZE variable; only i8 is supported." - exit - ;; -esac - -setmode=false -for arg in $* ; do - if $setmode ; then - mode=$arg - case $mode in - i4) - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - ;; - i8) - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - ;; - *) - echo " " - echo "error, version mode must be i8" - echo " " - echo " use -mo i8 " - echo " " - exit - ;; - esac - setmode=false - fi - if [ ${arg}X = -moX -o ${arg}X = -MOX ] ; then - echo - echo warning: the option -mo is deprecated, as of Marc 2015, only the integer*8 version is available - echo - setmode=true - fi - if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - MARC_INTEGER_SIZE=i8 - export MARC_INTEGER_SIZE - fi - if [ ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - modeerror="bad value for mode option; only i8 is supported." - modeoption=error - echo - echo $modeerror - echo - fi -done - -# set to i4 version for 32 bit Linux -if test "`uname -s`" = "Linux"; then - if test "`uname -m`" = "i686"; then - mode=i4 - MARC_INTEGER_SIZE=i4 - export MARC_INTEGER_SIZE - fi -fi - - -. "$DIR/getarch" - -. $MARC_INCLUDE -# - -# -# Dynamically determine the echo syntax -# - -case "`echo '\c'`" in - '\c') - ECHO='echo -n' - ECHOTXT=' ' - ;; - *) - ECHO='echo' - ECHOTXT=' \c' - ;; -esac - -# -# Variables for the MARC environment -# - -PRODUCT="Marc" -EXITMSG=$MARC_TOOLS/MESSAGES -export EXITMSG -FLEXDIR=$DIR/../flexlm/licenses -export FLEXDIR -TIMCHK=3600 -export TIMCHK -BINDIR=$MARC_BIN -export BINDIR -AFMATDAT=$MARC_RUNTIME/AF_flowmat/ -export AFMATDAT -# -# define directory path to global unified material database -# -MATFILE= -export MATFILE - -# -# define memory limit -# first set to MEMLIMIT from include -# -ml option overrules if specified -memlimit=$MEMLIMIT -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -# -if test $MACHINENAME = "HP" -then - SHLIB_PATH=$MARC_LIB:$MARC_LIB_SHARED:$SHLIB_PATH - export SHLIB_PATH -fi -# the one for IBM is defined futher down - -LD_LIBRARY_PATH=$MARC_LIB_SHARED:$LD_LIBRARY_PATH -LD_LIBRARY_PATH=$MARC_LIB:$LD_LIBRARY_PATH -LD_LIBRARY64_PATH=$MARC_LIB:$LD_LIBRARY64_PATH -LD_LIBRARYN32_PATH=$MARC_LIB:$LD_LIBRARYN32_PATH -export LD_LIBRARY_PATH -export LD_LIBRARY64_PATH -export LD_LIBRARYN32_PATH - -atexit() { -kill -15 $$ -# -if test $MPITYPE = "myrinet" -then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi -fi -} - -trap "atexit" 2 - -# -# defaults -# - -prog=marc -exefile=marc -jid= -rid= -pid= -sid= -did= -vid= -user= -usersubname= -objs= -qid=background -cpu= -priority= -att= -trk= -verify=yes -prgsav=no -rmdll=no -cpdll=no -progdll= -pathdll= -error= -nprocd=0 -nprocdddm=1 -nprocdddmprint= -icreated=0 -nprocdarg= -nsolver=0 -nsolverarg=-ns -if test $nprocds -then - if test $nprocds -gt 1 - then - nprocdddm=$nprocds - nprocdddmprint=$nprocds - icreated=1 - nprocdarg=-nprocds - fi -fi -ntprint=0 -nt=-1 -nte=-1 -nts=-1 -ntarg=-nt -ntearg=-nte -ntsarg=-nts -nteprint= -ntsprint= -gpuids= -nauto=0 -ndcoup=0 -ndytran=0 -noutcore=0 -dllrun=0 -mesh=0 -itree=0 -iam= -link= -trkrun=0 -DIRJOB=`pwd` -DIRSCR=$DIRJOB -DIRSCRSET= -autoforge=0 -dotdat=.dat -dotdefhost=.defhost -host= -numhost= -mfile= -userhost= -makebdf= -cpinput=yes -cpresults=yes -marcdll=libmarc.$EXT_DLL -# define hostname and strip off extensions (alpha.aaa.com) -thishost=`hostname` -thishost=${thishost%%.*} -compatible=unknown -numfield=1 -justlist= -feature= -mpioption=false -MDSRCLIB=$MARC_LIB/mdsrc.a -# -# check run_marc_defaults file for default MPI setting -# located in the tools directory of the Marc installation -# or in the user's home directory -# format: -# MARC_MPI -# -value= -file= -if test -f $DIRSCRIPT/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $DIRSCRIPT/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$DIRSCRIPT/run_marc_defaults - fi -fi -if test -f $HOME/run_marc_defaults; then - value=`$AWK '{if ($1 == "MARC_MPI") {print $2}}' $HOME/run_marc_defaults` - value=`echo $value | $AWK '{print $NF}'` - if test -n "$value"; then - file=$HOME/run_marc_defaults - fi -fi -if test -n "$value"; then - MARC_MPITYPE=$value - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - echo " " - echo " error, incorrect option for MARC_MPI" - echo " defined in $file: $MARC_MPITYPE" - echo " valid options: $MPI_DEFAULT $MPI_OTHER" - echo " " - exit - fi - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - fi -fi -# -# -# allow scratch directory to be specified with environmental variable -# MARCSCRATCH -if test $MARCSCRATCH -then - if test -d $MARCSCRATCH - then - DIRSCR=$MARCSCRATCH - else - echo "error, scratch directory '$MARCSCRATCH'" - echo " specified via environmental variable MARCSCRATCH does not exist" - exit - fi -fi -# -############################################################################## -# parse input - arguments always come in pairs # -############################################################################## - -arg=$1 -if [ ${arg}X = -i8X -o ${arg}X = -I8X ] ; then - shift - arg=$1 -fi -while [ -n "$arg" ] -do - shift - value=$1 - case $arg in - -al* | -AL*) - LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - $MARC_BIN/marc -alloc 1 - exit - ;; - -li* | -LI*) - justlist=yes - ;; - -fe* | -FE*) - feature=$value - ;; - -pr* | -PR*) - if test `dirname $value` = '.' - then - prog=`$BASENAME $value .marc` - progdll=`$BASENAME $value` - else - prog=`dirname $value`/`$BASENAME $value .marc` - progdll=`dirname $value`/`$BASENAME $value` - fi - prdir=`dirname $value` - case $prdir in - \/*) - ;; - *) - prog=`pwd`/$prdir/$prog - ;; - esac - ;; - -j* | -J*) - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - ;; - -r* | -R*) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - -si* | -SI*) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - -pi* | -PI*) - if test -f $value.t19 - then - pid=`$BASENAME $value .t19` - else - pid=`$BASENAME $value .t16` - fi - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - -bdf | -BDF) - makebdf=1 - ;; - -de* | -DE*) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - -vf | -VF) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - -u* | -U*) - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user - basefile=`$BASENAME $value` - if test ${basefile##*.} = f - then - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user.f - elif test ${basefile##*.} = F - then - user=`dirname $value`/`$BASENAME $value .F` - usersubname=$user.F - elif test ${basefile##*.} = f90 - then - user=`dirname $value`/`$BASENAME $value .f90` - usersubname=$user.f90 - elif test ${basefile##*.} = F90 - then - user=`dirname $value`/`$BASENAME $value .F90` - usersubname=$user.F90 - fi - case $user in - \/*) - ;; - *) - user=`pwd`/$user - usersubname=`pwd`/$usersubname - ;; - esac - if test ! -f $usersubname - then - if test -f $usersubname.f - then - usersubname=$usersubname.f - elif test -f $usersubname.F - then - usersubname=$usersubname.F - elif test -f $usersubname.f90 - then - usersubname=$usersubname.f90 - elif test -f $usersubname.F90 - then - usersubname=$usersubname.F90 - fi - fi - ;; - -obj | -OBJ) - objs="$value" - ;; - -q* | -Q*) - qid=$value - ;; - -b* | -B*) - case $value in - y* | Y*) - qid=background - ;; - n* | N*) - qid=foreground - ;; - *) - ;; - esac - ;; - -at | -AT) - att=$value - ;; - -cpu* | -CPU*) - cpu=$value - ;; - -pq | -PQ*) - priority=$value - ;; - -v* | -V*) - verify=$value - ;; - -sa* | -SA*) - prgsav=$value - ;; - -np* | -NP*) - nprocdddm=$value - nprocdddmprint=$value - case $arg in - -nps* | -NPS* | -nprocds* | -NPROCDS*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - case $arg in - -np | -NP | -nprocd | -NPROCD) - icreated=0 - nprocdarg=-nprocd - ;; - esac - ;; - -ns* | -NS*) - nsolver=$value - ;; - -nt* | -NT*) - case $arg in - -nte | -NTE | -nthread_e* | -NTHREAD_E*) - nte=$value - ;; - esac - case $arg in - -nts | -NTS | -nthread_s* | -NTHREAD_S*) - nts=$value - ;; - esac - case $arg in - -nt | -NT | -nth* | -NTH* | -nthread* | -NTHREAD*) - nt=$value - ;; - esac - ;; - -gp* | -GP*) - gpuids=$value - ;; - -it* | -IT*) - itree=$value - ;; - -iam | -IAM) - iam=$value - ;; - -au* | -AU*) - nauto=$value - ;; - -dc* | -DC*) - ndcoup=$value - ;; - -dy* | -DY*) - ndytran=$value - ;; - -ou* | -OU*) - noutcore=$value - ;; - -dll | -DLL) - dllrun=$value - ;; - -trk | -TRK) - trkrun=$value - ;; - -me | -ME ) - mesh=$value - ;; - -ml | -ML ) - memlimit=$value - ;; - -mo | -MO ) - ;; - -mpi | -MPI ) - mpioption=true - MARC_MPITYPE=$value - if test "$value" != "$MPI_DEFAULT"; then - exefile=marc_$value - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a_$value - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a_$value" - fi - else - exefile=marc - . $MARC_INCLUDE - MDSRCLIB=$MARC_LIB/mdsrc.a - if test "$MUMPSSOLVER" = MUMPS; then - MUMPSSOLVERLIBS="$MARC_LIB/libmumps.a" - fi - fi - ;; - -dir* | -DIR*) - DIRJOB=$value - case $DIRJOB in - \/*) - ;; - *) - DIRJOB=`pwd`/$DIRJOB - ;; - esac - if test -z "$DIRSCRSET" - then - DIRSCR=$DIRJOB - fi - ;; - -sd* | -SD*) - DIRSCR=$value - DIRSCRSET=yes - case $DIRSCR in - \/*) - ;; - *) - DIRSCR=`pwd`/$DIRSCR - ;; - esac - ;; - -ho* | -HO*) - host=$value - ;; - -co* | -CO*) - compatible=$value - ;; - -ci* | -CI*) - cpinput=$value - ;; - -cr* | -CR*) - cpresults=$value - ;; - *) - error="$error -$arg: invalid option" - break - ;; - esac - case $value in - -*) - error="$error -$arg: invalid name $value" - break - ;; - esac - shift - arg=$1 - if [ ${arg}X = -i8X -o ${arg}X = -I8X -o ${arg}X = -i4X -o ${arg}X = -I4X ] ; then - shift - arg=$1 - fi -done -argc=`expr $# % 2` -if test $argc -eq 1 -then -# -# odd number of arguments -# - error="$error -argument list incomplete" -fi - -if test $nprocdddm -gt 0 -then -nprocd=$nprocdddm -fi - -if test $nsolver -gt 0 -then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi -fi -# Set defaults -if test $nt -eq -1 -then -nt=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nt -lt 0 -then -nt=0 -fi -if test $nte -eq -1 -then -nte=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nte -lt 0 -then -nte=0 -fi -if test $nts -eq -1 -then -nts=${MARC_NUMBER_OF_THREADS:-0} -fi -if test $nts -lt 0 -then -nts=0 -fi -# -# set number of element loop threads -# -ntprint=$nt -nteprint=$nte -# copy from -nprocd[s] -if test $nprocdddm -gt 1 -then - nteprint=$nprocdddm -fi -# override with -nthread_elem option -if test $nte -ne 0 -then -nteprint=$nte -fi -# check for minimum 1 threads per processes for DDM -if test $nprocdddm -gt 1 -then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi -fi -nte=$nteprint -# -# set number of Solver threads -# -ntsprint=$nts -# copy from -nthread or -nprocd[s] -if test $ntprint -ne 0 -then - ntsprint=$ntprint -else - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -fi -# override with -nthread_solver option -if test $nts -ne 0 -then - ntsprint=$nts -fi -# check for minimum 1 threads per solver process. -if test $nsolver -lt $nprocdddm -then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi -else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi -fi -if test $ntsprint -eq 1 -then - set ntsprint=0 -fi -nts=$ntsprint - -# set stack size for multi-threading. -export KMP_MONITOR_STACKSIZE=7M -export OMP_STACKSIZE=7M - -# -# deprecate -nthread option at arugment of marc -nt=0 -# Reset nprocdddmm, nsolver and threads if not given. -if test $nprocdddm -eq 0 -then - nprocdarg= -fi -if test $nprocdddm -eq 0 -then - nprocdddmprint= -fi -if test $nprocdddm -eq 0 -then - nprocdddm= -fi - -if test $nsolver -eq 0 -then - nsolverprint= -fi -# end of threads setting. -gpuoption= -if test "$gpuids" = "" ; then - gpuoption= -else - gpuoption="-gp $gpuids" -fi - -if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH -else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH -fi -# Linux 64 + HPMPI, Below code is taken from include_linux64 -if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" -then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -fi - -if test $nprocd -gt 1; then - if test -f $jid$dotdefhost; then - if test "$host" = ""; then - host=$jid$dotdefhost - fi - fi - if test -f hostfile_qa_$nprocd; then - if test "$host" = ""; then - host=hostfile_qa_$nprocd - fi - fi -fi - -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$dllrun" -eq 1 || test "$dllrun" -eq 2; then - dotdat=.inp - fi - - if test "$progdll"; then - /bin/cp ${progdll}_$marcdll $DIRJOB/$marcdll - rmdll=yes - pathdll=yes - progdll=${progdll}_$marcdll - else - progdll=$marcdll - fi - - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - pathdll=yes - fi -fi - -############################################################################## -# check parameter validity # -############################################################################## - -while test forever; do - -# -# check for input file existence -# -if test $nprocdddm -gt 1 -a $icreated -eq 0; then - if test ! -f $DIRJID/1$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/1$jid$dotdat not accessible" - fi - fi -else - if test ! -f $DIRJID/$jid$dotdat; then - if test "$jid" != "" ; then - error="$error -input file $DIRJID/$jid$dotdat not accessible" - fi - fi -fi - if test $nprocd -gt 1; then - if test "$host" ; then - if test ! -f $host; then - error="$error -host name file $host not accessible" - fi - fi - fi - -# -# check if the job is already running in the background -# -if test -f $DIRJOB/$jid.pid; then - error="$error -job is already running (the file $jid.pid exists)" -fi - -# -# if the program name is other than marc, then -# assume that this is a program in the users local directory -# - -bd=$MARC_BIN/ - -case $prog in - marc | MARC | $exefile) - program=$exefile - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$usersubname" - then - if test ! -f $usersubname - then - error="$error -user subroutine file $usersubname not accessible" - fi - fi - if test "$objs" - then - missingobjs= - for o in $objs - do - if test ! -f "$o" - then - if test -z "$missingobjs" - then - missingobjs="$o" - else - missingobjs="$missingobjs $o" - fi - fi - done - if test -n "$missingobjs" - then - error="$error -user object/library file(s) $missingobjs not accessible" - fi - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$vid" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRVID/1$vid.vfs - then - error="$error -view factor file $DIRVID/1$vid.vfs not accessible" - fi - else - if test ! -f $DIRVID/$vid.vfs - then - error="$error -view factor file $DIRVID/$vid.vfs not accessible" - fi - fi - fi - if $mpioption - then - notok=true - for i in "$MPI_OTHER"; do - if test "$MARC_MPITYPE" = "$i"; then - notok=false - fi - done - if test "$MARC_MPITYPE" = "$MPI_DEFAULT"; then - notok=false - fi - if $notok; then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE (valid: $MPI_OTHER)" - fi - fi - ;; - *) - program=$prog.marc - case $prog in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - if test "$rid" - then - if test ! -f $DIRRID/$rid.t08 - then - error="$error -restart file $DIRRID/$rid.t08 not accessible" - fi - fi - if test "$pid" - then - if test ! -f $DIRPID/$pid.t16 - then - if test ! -f $DIRPID/$pid.t19 - then - error="$error -post file $DIRPID/$pid.t16 and $DIRPID/$pid.t19 not accessible" - fi - fi - fi - if test "$user" - then - error="$error -program option may not be used with user subroutine" - fi - if test "$objs" - then - error="$error -program option may not be used with user objects or libraries" - fi - if test "$did" - then - if test $nprocdddm -gt 1 -a $icreated -eq 0 - then - if test ! -f $DIRDID/1$did$dotdat - then - error="$error -defaults file $DIRDID/1$did$dotdat not accessible" - fi - else - if test ! -f $DIRDID/$did$dotdat - then - error="$error -defaults file $DIRDID/$did$dotdat not accessible" - fi - fi - fi - if test "$nauto" - then - if test $nauto -gt 2 - then - error="$error -incorrect option for auto restart " - fi - fi - if test "$ndcoup" - then - if test $ndcoup -gt 3 - then - error="$error -incorrect option for contact decoupling " - fi - fi - if test "$ndytran" - then - if test $ndytran -gt 1 - then - error="$error -incorrect option for Marc-Dytran Switch " - fi - fi - if $mpioption - then - if test ! -x $MARC_BIN/$exefile - then - error="$error -incorrect option for -mpi option: $MARC_MPITYPE " - fi - fi - ;; -esac - -############################################################################## -# check argument integrity # -############################################################################## - -if test "$jid" -then - : -else - if test "$user" - then -# allow user sub without giving job id - qid=foreground - verify=no - else - error="$error -job id required" - fi -fi - -if test $nprocd -gt 1 -then - if test $nauto -gt 0 - then - error="$error -cannot run DDM job with auto restart (-au) option " - fi -fi -case $qid in - S* | s*) - qid=short - ;; - L* | l*) - qid=long - ;; - V* | v*) - qid=verylong - ;; - B* | b*) - qid=background - ;; - F* | f*) - qid=foreground - ;; - A* | a*) - qid=at - ;; - *) - error="$error -bad value for queue_id option" - ;; -esac - -case $prgsav in - N* | n*) - prgsav=no - ;; - Y* | y*) - prgsav=yes - ;; - *) - error="$error -bad value for save option" - ;; -esac - -case $verify in - N* | n*) - verify=no - ;; - Y* | y*) - verify=yes - ;; - *) - error="$error -bad value for verify option" - ;; -esac - -case $nprocdddm in - -* ) - error="$error -bad value for nprocd option" - ;; -esac - -case $nt in - -* ) - error="$error -bad value for nt option" - ;; -esac - -case $itree in - -* ) - error="$error -bad value for itree option" - ;; -esac -case $iam in - -* ) - error="$error -bad value for iam option" - ;; -esac -case $compatible in - N* | n*) - compatible=no - ;; - Y* | y*) - compatible=yes - ;; - unknown) - ;; - *) - error="$error -bad value for comp option" - ;; -esac -case $cpinput in - N* | n*) - cpinput=no - ;; - Y* | y*) - cpinput=yes - ;; - *) - error="$error -bad value for copy input option" - ;; -esac -case $cpresults in - N* | n*) - cpresults=no - ;; - Y* | y*) - cpresults=yes - ;; - *) - error="$error -bad value for copy results option" - ;; -esac - -# -# check for external file to run -# -if test -f $MARC_TOOLS/run_marc_check -then - . $MARC_TOOLS/run_marc_check -fi - -# -# pick up version data from bin/VERSION if it exists -# -if test -f $MARC_BIN/VERSION; then - ppp=`grep "version" $MARC_BIN/VERSION | cut -f 2- -d ":"` - if test -n "$ppp" ;then - PRODUCT=$ppp - fi - ppp=`grep "built at changelist" $MARC_BIN/VERSION | cut -f 2 -d ":"` - if test -n "$ppp" ;then - REVISION=", Build $ppp" - fi -fi -############################################################################## -# interact with the user to get the required information to run marc or # -# other marc system program # -############################################################################## - -deletelog=yes -if test $qid = background -a $verify = no -then -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $usersubname -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto " > $jid.log -deletelog=no -fi -echo \ -" -$PRODUCT $REVISION $MACHINE version ------------------------------ -Program name : $prog -Marc shared lib : $progdll -Version type : $mode -Job ID : $DIRJID/$jid -User subroutine name : $usersubname -User objects/libs : $objs -Restart file job ID : $rid -Substructure file ID : $sid -Post file job ID : $pid -Defaults file ID : $did -View Factor file ID : $vid -Save generated module: $prgsav -MPI library : $MPITYPE -DDM processes : $nprocdddmprint -Element loop threads : $nteprint -Solver processes : $nsolverprint -Solver threads : $ntsprint -GPGPU option : $gpuids -Host file name : $host -Message passing type : $itree -Run job in queue : $qid -Run directory : $DIRJOB -Scratch directory : $DIRSCR -Memory limit in Mbyte: $memlimit -Auto Restart : $nauto" - - -case $qid in - s* | S* | l* | L* | v* | V* ) - echo \ -"Queue priority : $priority -Queue CPU limit : $cpu -Queue start time : $att" - ;; -# * ) -# echo \ -#" " -# ;; -esac - -if test "$modeoption" -then - error=$modeerror -fi - -if test "$error" -then - if test $verify = yes - then - $ECHO "$error - -Please correct or quit(correct,quit,): $ECHOTXT" - error= - read answer - case $answer in - q* | Q*) - answer=quit - ;; - *) - answer=correct - ;; - esac - else - $ECHO "$error - $ECHOTXT" - echo " " - if test "$deletelog" = no - then - $ECHO "$error - $ECHOTXT" >> $jid.log - echo " " >> $jid.log - fi - answer=quit - fi -else - if test $verify = yes - then - $ECHO " -Are these parameters correct (yes,no,quit,)? $ECHOTXT" - read answer - case $answer in - q* | Q*) - answer=quit - ;; - y* | Y*) - answer=yes - ;; - *) - answer=no - ;; - esac - else - answer=yes - fi -fi - -case $answer in - no | correct) - -############################################################################## -# prompt for each value # -############################################################################## - - $ECHO " -Program name ($prog)? $ECHOTXT" - read value - if test "$value" - then - prog=$value - fi - $ECHO "Job ID ($jid)? $ECHOTXT" - read value - if test "$value" - then - jid=`$BASENAME $value $dotdat` - DIRJID=`dirname $value` - case $DIRJID in - \/*) - ;; - *) - DIRJID=`pwd`/$DIRJID - ;; - esac - fi - $ECHO "User subroutine name ($usersubname)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - user= - ;; - *) - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user - basefile=`$BASENAME $value` - if test ${basefile##*.} = f - then - user=`dirname $value`/`$BASENAME $value .f` - usersubname=$user.f - elif test ${basefile##*.} = F - then - user=`dirname $value`/`$BASENAME $value .F` - usersubname=$user.F - elif test ${basefile##*.} = f90 - then - user=`dirname $value`/`$BASENAME $value .f90` - usersubname=$user.f90 - elif test ${basefile##*.} = F90 - then - user=`dirname $value`/`$BASENAME $value .F90` - usersubname=$user.F90 - fi - case $user in - \/*) - ;; - *) - user=`pwd`/$user - usersubname=`pwd`/$usersubname - ;; - esac - if test ! -f $usersubname - then - if test -f $usersubname.f - then - usersubname=$usersubname.f - elif test -f $usersubname.F - then - usersubname=$usersubname.F - elif test -f $usersubname.f90 - then - usersubname=$usersubname.f90 - elif test -f $usersubname.F90 - then - usersubname=$usersubname.F90 - fi - fi - ;; - esac - fi - $ECHO "User objects or libraries ($objs)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - objs= - ;; - *) - objs="$value" - ;; - esac - fi - $ECHO "Restart File Job ID ($rid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - rid= - ;; - *) - rid=`$BASENAME $value .t08` - DIRRID=`dirname $value` - case $DIRRID in - \/*) - ;; - *) - DIRRID=`pwd`/$DIRRID - ;; - esac - ;; - esac - fi - $ECHO "Substructure File ID ($sid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - sid= - ;; - *) - sid=$value - DIRSID=`dirname $value` - case $DIRSID in - \/*) - ;; - *) - DIRSID=`pwd`/$DIRSID - ;; - esac - ;; - esac - fi - $ECHO "Post File Job ID ($pid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - pid= - ;; - *) - pid=$value - DIRPID=`dirname $value` - case $DIRPID in - \/*) - ;; - *) - DIRPID=`pwd`/$DIRPID - ;; - esac - ;; - esac - fi - $ECHO "Defaults File ID ($did)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - did= - ;; - *) - did=`$BASENAME $value $dotdat` - DIRDID=`dirname $value` - case $DIRDID in - \/*) - ;; - *) - DIRDID=`pwd`/$DIRDID - ;; - esac - ;; - esac - fi - $ECHO "View Factor File ID ($vid)? $ECHOTXT" - read value - if test "$value" - then - case $value in - -*) - vid= - ;; - *) - vid=`$BASENAME $value .vfs` - DIRVID=`dirname $value` - case $DIRVID in - \/*) - ;; - *) - DIRVID=`pwd`/$DIRVID - ;; - esac - ;; - esac - fi - $ECHO "Save generated module ($prgsav)? $ECHOTXT" - read value - if test "$value" - then - prgsav=$value - fi - $ECHO "Run on tasks ($nprocdddm) tasks? $ECHOTXT" - read value - if test "$value" - then - nprocdddm=$value - nprocdddmprint=$value - fi - $ECHO "Run on ($nte) Element loop threads ? $ECHOTXT" - read value - if test "$value" - then - nte=$value - fi - $ECHO "Run on ($nsolver) solvers ? $ECHOTXT" - read value - if test "$value" - then - nsolver=$value - fi - $ECHO "Run on ($nts) Solver threads ? $ECHOTXT" - read value - if test "$value" - then - nts=$value - fi -# - if test $nprocdddm -gt 0 - then - nprocd=$nprocdddm - fi - if test $nsolver -gt 0 - then - if test $nsolver -gt $nprocd - then - nprocd=$nsolver - fi - fi -# Element loop threads. - if test $nte -eq -1 - then - nte=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nte -lt 0 - then - nte=0 - fi - nteprint=$nte -# Copy from ddm - if test $nprocdddm -gt 1 - then - nteprint=$nprocdddm - fi -# override with -nthread_elem option - if test $nte -ne 0 - then - nteprint=$nte - fi -# check for minimum 1 threads per processes for DDM - if test $nprocdddm -ne 0 - then - if test $nteprint -lt $nprocdddm - then - nteprint=$nprocdddm - fi - fi - nte=$nteprint -# Solver threads. - if test $nts -eq -1 - then - nts=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nts -lt 0 - then - nts=0 - fi - ntsprint=$nts -# Copy from ddm - if test $nprocdddm -gt 1 - then - ntsprint=$nprocdddm - fi -# override with -nthread_solver option - if test $nts -ne 0 - then - ntsprint=$nts - fi -# check for minimum 1 threads per solver process. - if test $nsolver -lt $nprocdddm - then - if test $ntsprint -lt $nsolver - then - ntsprint=$nsolver - fi - else - if test $ntsprint -lt $nprocdddm - then - ntsprint=$nprocdddm - fi - fi - if test $ntsprint -eq 1 - then - set ntsprint=0 - fi - nts=$ntsprint - $ECHO "GPGPU id option ($gpuids)? $ECHOTXT" - read value - if test "$value" - then - gpuids=$value - fi - if test "$gpuids" = "" ; then - gpuoption= - else - gpuoption="-gp $gpuids" - fi - if test "$gpuids" = "" ; then - export LD_LIBRARY_PATH=$CUDALIB1:$LD_LIBRARY_PATH - else - MARCCUDALIBS=$MARCCUDALIBS2 - export LD_LIBRARY_PATH=$CUDALIB2:$LD_LIBRARY_PATH - fi - if test $MPITYPE = hpmpi -a "$ARCHITECTURE" = "linux_amd64" - then - export MPIHPSPECIAL="$MPIHPSPECIAL -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH" - fi -# - if test $nprocd -gt 1 - then - $ECHO "Message passing type ($itree)? $ECHOTXT" - read value - if test "$value" - then - itree=$value - fi - $ECHO "Host file name ($host)? $ECHOTXT" - read value - if test "$value" - then - host=$value - fi - if test $nprocdddm -gt 1 - then - $ECHO "Single input file? $ECHOTXT" - read value - case $value in - y* | Y*) - icreated=1 - nprocdarg=-nprocds - ;; - esac - $ECHO "Compatible machines for DDM ($compatible)? $ECHOTXT" - read value - if test "$value" - then - compatible=$value - fi - $ECHO "Copy input files to remote hosts ($cpinput)? $ECHOTXT" - read value - if test "$value" - then - cpinput=$value - fi - $ECHO "Copy post files from remote hosts ($cpresults)? $ECHOTXT" - read value - if test "$value" - then - cpresults=$value - fi - fi - fi - $ECHO "Run the job in the queue ($qid)? $ECHOTXT" - read value - if test "$value" - then - qid=$value - fi - case $qid in - s* | S* | l* | L* | v* | V* ) - $ECHO "Queue priority ($priority)? $ECHOTXT" - read value - if test "$value" - then - priority=$value - fi - $ECHO "Job starts at ($att)? $ECHOTXT" - read value - if test "$value" - then - att=$value - fi - $ECHO "Queue CPU limit ($cpu)? $ECHOTXT" - read value - if test "$value" - then - cpu=$value - fi - ;; - * ) - ;; - esac - $ECHO "Auto Restart option ($nauto)? $ECHOTXT" - read value - if test "$value" - then - nauto=$value - fi - $ECHO "Run directory ($DIRJOB)? $ECHOTXT" - read value - if test "$value" - then - DIRJOB=$value - DIRSCR=$DIRJOB - fi - $ECHO "Scratch directory ($DIRSCR)? $ECHOTXT" - read value - if test "$value" - then - DIRSCR=$value - fi - ;; - quit) - exit 1 - ;; - *) - break - ;; - -esac - - if test $nt -eq -1 - then - nt=${MARC_NUMBER_OF_THREADS:-0} - fi - if test $nt -lt 0 - then - nt=0 - fi - -done -# -if test $nt -eq 0 -then - ntarg= -fi -if test $nt -eq 0 -then - ntprint= -fi -if test $nt -eq 0 -then - nt= -fi - -if test $nte -eq 0 -then - ntearg= -fi -if test $nte -eq 0 -then - nteprint= -fi -if test $nte -eq 0 -then - nte= -fi - -if test $nts -eq 0 -then - ntsarg= -fi -if test $nts -eq 0 -then - ntsprint= -fi -if test $nts -eq 0 -then - nts= -fi -# -if test "$dllrun" -gt 0; then - exefile=exe_marc - prog=exe_marc - program=$exefile - bd=$MARC_BIN/ - if test "$user"; then - . $MARC_TOOLS/make_marc_user_dll $DIRJOB $user - user= - pathdll=yes - if test $prgsav = no; then - rmdll=yes - fi - if test $prgsav = yes; then - cpdll=yes - rmdll=yes - fi - fi - - if test "$pathdll"; then -# -# reset share lib path -# - if test $MACHINENAME = "HP" - then - SHLIB_PATH=$DIRJOB:$SHLIB_PATH - export SHLIB_PATH - fi - if test $MACHINENAME = "IBM" - then - LIBPATH=$DIRJOB:$LIBPATH - export LIBPATH - fi -# - LD_LIBRARY_PATH=$DIRJOB:$LD_LIBRARY_PATH - LD_LIBRARY64_PATH=$DIRJOB:$LD_LIBRARY64_PATH - LD_LIBRARYN32_PATH=$DIRJOB:$LD_LIBRARYN32_PATH - export LD_LIBRARY_PATH - export LD_LIBRARY64_PATH - export LD_LIBRARYN32_PATH - fi -fi -# end of dllrun>0 - - -if test $program = $exefile -o $program = $prog.marc -then - -# delete the old .log file unless we run in the background -if test "$deletelog" = yes -then - if test "$jid" - then - /bin/rm $jid.log 2>/dev/null - fi -else - echo - echo running the job in the background, see $jid.log - echo -fi - -# -# check if this is an autoforge or rezoning or radiation job -# -if test $nprocd -eq 1 -a "$jid" - -then - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^autoforge"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^rezoning"` - if test "$line" - then - autoforge=1 - fi - line=`$AWK '/^[eE][nN][dD]/ {exit} ; {print}' $DIRJID/${jid}$dotdat | grep -i "^radiation"` - if test "$line" - then - autoforge=1 - fi -fi -# -# check that jobname for restarted run is not the same -# as restart file basename -# -if test "$rid" -then - if test "$jid" = "$rid" - then - echo " " - echo "ERROR: job name of current run is the same as job name" - echo " of the restarted job" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "ERROR: job name of current run is the same as job name" >> $jid.log - echo " of the restarted job" >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi -fi - -# -# user objects/libraries used -# - - if test "$objs" - then - program="$DIRJOB/$jid.marc" - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# user subroutine used -# - - if test "$user" - then -# program=$user.marc - program=$DIRJOB/`$BASENAME $user .f`.marc - case $program in - \/* | \.\/*) - bd= - ;; - *) - bd=`pwd`/ - ;; - esac - link=yes - fi - -# -# Special case for IBM using POE but not an SP machine -# in this case we always need a host file, also for serial jobs. -# -if test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP -then - MP_HOSTFILE=${jid}.host - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $nprocd -gt 1 - then - numdom=$nprocd - while test $numdom -gt 0 - do - hostname -s >> $MP_HOSTFILE - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - else - hostname -s > $MP_HOSTFILE - fi -fi -# -# check ssh for all hosts in host file -# -if test $nprocd -gt 1 -then -if test $MPITYPE = "intelmpi" -a "$INTELMPI_VERSION" = "HYDRA" - then -# get host list - if test "$host" - then - line=`grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' | uniq` -# count failing hosts - counter=0 - for i in $line - do - $RSH -o BatchMode=yes -o ConnectTimeout=10 $i uname -n - status=$? - if [[ $status != 0 ]] ; then - counter=$((counter+1)) - if [ "$counter" = "1" ]; then - echo " " - echo " error - connection test failed... " - echo " " - fi - echo " " - echo " connection test with ssh failed on host $i" - echo " check the following command: ssh $i uname -n " - echo " " - fi - done -# echo error message and quit - if test $counter -ne 0 - then - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. ">> $jid.log - echo " The ssh command must be working correctly between ">> $jid.log - echo " the computers used in the analysis. Furthermore, ">> $jid.log - echo " it must be set up such that it does not prompt the ">> $jid.log - echo " user for a password. Note that this is the case ">> $jid.log - echo " also for running on a single machine. ">> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - else - counter=1 -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh `hostname` - if test $counter -ne 0 - then - line=`hostname -s` - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi -# test ssh localhost - if test $counter -ne 0 - then - line=localhost - $RSH -o BatchMode=yes -o ConnectTimeout=10 $line uname -n - status=$? - if [[ $status != 0 ]] ; then - echo ssh login failed for $line machine. > /dev/null - else - counter=0 - fi - fi - if test $counter -ne 0 - then - echo " error - connection test failed... " - echo " " - echo " ssh needs to work on the machine without asking for a password." - echo " check the following command: ssh localhost uname -n" - echo " " - echo " A parallel job using IntelMPI cannot be started. " - echo " The ssh command must be working correctly between " - echo " the computers used in the analysis. Furthermore, " - echo " it must be set up such that it does not prompt the " - echo " user for a password. Note that this is the case " - echo " also for running on a single machine. " - echo " " - if test "$deletelog" = no - then - echo " error - connection test failed... " >> $jid.log - echo " " >> $jid.log - echo " ssh needs to work on the machine without asking for a password." >> $jid.log - echo " check the following command: ssh localhost uname -n" >> $jid.log - echo " " >> $jid.log - echo " A parallel job using IntelMPI cannot be started. " >> $jid.log - echo " The ssh command must be working correctly between " >> $jid.log - echo " the computers used in the analysis. Furthermore, " >> $jid.log - echo " it must be set up such that it does not prompt the " >> $jid.log - echo " user for a password. Note that this is the case " >> $jid.log - echo " also for running on a single machine. " >> $jid.log - echo " " >> $jid.log - echo " Exit number 8" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - echo $line $nprocd > $jid.hosts - host=$jid.hosts - fi - fi -fi -fi -# -# check correctness of host file; fix for user sub -# - if test $nprocd -gt 1 - then - -# construct the path name to the executable (execpath) - execpath=$MARC_BIN/$exefile - usersub=0 - if test $program = $prog.marc - then - execpath=$prog.marc - usersub=1 - fi - if test "$objs" - then - execpath="$DIRJOB/$jid.marc" - usersub=1 - fi - if test "$user" - then - execpath=$DIRJOB/`$BASENAME $user .f`.marc - usersub=1 - fi - export execpath - execname=`$BASENAME $execpath` - - if test "$host" - then - userhost=$host - case $userhost in - \/* | \.\/*) - ;; - *) - userhost=`pwd`/$userhost - ;; - esac - -# check that the number of processes specified in the hostfile is -# equal to nprocd specified by -nprocd. - numproc=`grep -v '^#' $host | $AWK -v sum=0 '{sum=sum+$2}; END {print sum}'` - if test $nprocd -ne $numproc - then - echo " " - echo "error, the number of processes specified in the host file" - echo "must be equal to the number of processes given by -nprocd/-nsolver" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, the number of processes specified in the host file" >> $jid.log - echo "must be equal to the number of processes given by -nprocd/-nsolver" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - -# check for Myrinet that the number of processes per host is -# less than number of available user ports, 5 -# .gmpi directory must exist in user's home directory -# and must have write permission from remote hosts - if test $MPITYPE = "myrinet" - then - numproc=`grep -v '^#' $host | $AWK -v sum=1 '{if( $2 > 5) sum=6}; END {print sum}'` - if test $numproc -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes specified " - echo "in the hostfile must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes specified " >> $jid.log - echo "in the hostfile must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - if test ! -d ~/.gmpi - then - echo " " - echo "error, for Myrinet a .gmpi directory must exist " - echo "under the user's home directory" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a .gmpi directory must exist " >> $jid.log - echo "under the user's home directory" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - homedir=`echo ~` - for i in `grep -v '^#' $host | $AWK '{if (NF > 0) print $1}'` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - $RSH $i /bin/touch $homedir/.gmpi/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - echo " " - echo "error, for Myrinet a shared .gmpi directory must exist " - echo "under the user's home directory " - echo "with remote write permission" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet a shared .gmpi directory must exist " >> $jid.log - echo "under the user's home directory " >> $jid.log - echo "with remote write permission" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - else - /bin/rm tmp.$$ - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - fi - fi - done - fi - fi - -# construct the host file $jid.host which is used by mpirun -# skip lines starting with # and only consider lines with more than -# one word in them. Note that the hostfile given to this script -# has two columns: the host name and the number of shared processes -# to run on this host. mpirun wants the number of _other_ -# processes to run in addition to the one being run on the machine -# on which the job is started. hence the $2-1 for fnr == 1. - if test -f $jid.host - then - /bin/rm $jid.host 2> /dev/null - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then -# HPMPI or HP hardware MPI - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ - -v mpihpspecial="$MPIHPSPECIAL" \ -'{if ( NF > 0) {\ - fnr++ ; \ - printf("-h %s -np %s",$1,$2); \ - printf(" %s",mpihpspecial); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF >= 3 ) printf(" -e MPI_WORKDIR=%s", $3);\ - if ( NF >= 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) \ - }\ - }' > $jid.host -# end HPMPI or HP hardware MPI - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then -# IBM using hardware MPI (POE) - MP_HOSTFILE=$jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.host -# end IBM using hardware MPI (POE) -# for Intel MPI, need to create a machinefile for DMP - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then -# Intel MPI - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - /bin/cp $host $jid.host - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Intel MPI for DMP -# for Solaris HPC 7.1, need to create a machinefile for DMP - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then -# Solaris HPC 7.1 - if test -f $jid.mfile - then - /bin/rm $jid.mfile 2> /dev/null - fi - grep -v '^#' $host | $AWK '{host=$1;num=$2;for (i=1;i<=num;i++) print host}' > $jid.mfile -# end Solaris HPC 7.1 for DMP -# for Myrinet, construct a configuration file in ~/.gmpi -# this must be readable by each process -# format is (hostname) (port number) for each process - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - grep -v '^#' $host | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ -{if ( NF > 0 ) \ - for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc]); \ -}' >> ~/.gmpi/$jid.host - else -# this is for mpich-1.2.5 and later, using the -pg option -# format: host nproc executable user arguments -# the arguments are added later - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub -v user=`whoami` \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s %s\n",path,user);\ - if ( NF == 3 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s %s\n",path,user) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s %s\n",$3,en,user); else printf(" %s/bin/%s %s\n",$4,en,user) \ - }\ - }' > $jid.host - fi -# end Myrinet - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then -# Compaq MPI via Memory Channel - grep -v '^#' $host | $AWK '{if (NF > 0) print $1}' > $jid.host -# end Compaq MPI - else -# MPICH - grep -v '^#' $host | $AWK -v path=$execpath -v en=$execname -v us=$usersub \ -'{if ( NF > 0) {\ - fnr++ ; \ - if ( fnr == 1 ) printf("%s %d",$1,$2-1); \ - else printf("%s %s",$1,$2); \ - if ( NF == 2 ) printf(" %s\n",path);\ - if ( NF == 3 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s\n",path) ;\ - if ( NF == 4 ) if (us) printf(" %s/%s\n",$3,en); else printf(" %s/bin/%s\n",$4,en) \ - }\ - }' > $jid.host - fi -# define the variable host and host_filt -# host_filt is used for loops over hosts -# for Myrinet we need to use a filtered variant of userhost -# for others we can use $host - if test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - host=~/.gmpi/$jid.host - host_filt=$jid.host_tMp - grep -v '^#' $userhost | $AWK '{if (NF > 0) print $1}' > $host_filt - else - host=$jid.host - host_filt=$host - fi - else - host=$jid.host - host_filt=$host - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - host_filt=$jid.mfile - fi - fi -# figure out if the machines in the hostfile are nfs mounted -# or distributed and set the variable "dirstatus" accordingly. -# only perform the check if user subroutine is used -# or a user subroutine executable is used - - numfield=1 - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - numfield=2 - fi - DIR1=$DIRJOB - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - counter=0 - echo " " - echo "checking if local or shared directories for host" - if test "$deletelog" = no - then - echo "checking if local or shared directories for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - dirstatus[$counter]="shared" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - $RSH $i /bin/touch $DIR1/$jid.$$ 2> tmp.$$ - if test -s tmp.$$ - then - dirstatus[$counter]="local" - /bin/rm tmp.$$ - else - if test ! -f $jid.$$ - then - dirstatus[$counter]="local" - $RSH $i /bin/rm $DIR1/$jid.$$ - else - /bin/rm $jid.$$ - fi - fi - if test -f tmp.$$ - then - /bin/rm tmp.$$ - fi - if test -f $jid.$$ - then - /bin/rm $jid.$$ - fi - echo " ${dirstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${dirstatus[$counter]}" >> $jid.log - fi - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - fi - -# figure out if this is a compatible set of machines -# unless explicitly specified with flag -comp -# only perform the check if user subroutine is used -# or a user subroutine executable is used -# Myrinet does not support heterogeneous - if test $program = $prog.marc -o -n "$user" -o -n "$objs" - then - if test $compatible = "unknown" - then - thisname=$ARCH - compatible=yes - counter=0 - echo "checking if machines are compatible for host" - if test "$deletelog" = no - then - echo "checking if machines are compatible for host" >> $jid.log - fi - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]="yes" - $ECHO " $i $ECHOTXT" - if test "$deletelog" = no - then - $ECHO " $i $ECHOTXT" >> $jid.log - fi - othername=`$RSH $i uname -a | cut -f 1 -d " "` - if test $thisname != $othername - then - compatible=no - compstatus[$counter]="no" - fi - fi - echo " ${compstatus[$counter]}" - if test "$deletelog" = no - then - echo " ${compstatus[$counter]}" >> $jid.log - fi - done - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - fi - else - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - compstatus[$counter]=$compatible - fi - done - if test $compatible = "no" - then - echo "all machines assumed incompatible" - if test "$deletelog" = no - then - echo "all machines assumed incompatible" >> $jid.log - fi - else - echo "all machines compatible" - if test "$deletelog" = no - then - echo "all machines compatible" >> $jid.log - fi - fi - fi -# error out if user objects or libraries are used on incompatible machines - if test "$compatible" = "no" -a -n "$objs" - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" - if test "$deletelog" = no - then - echo "User object/libraries cannot be used in a parallel job on incompatible machines" >> $jid.log - fi - exit 1 - fi -# modify new host file if NFS mounted heterogeneous machine - doit= - if test $program = $prog.marc - then - doit=yes - fi - if test "$user" - then - doit=yes - fi - if test "$doit" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - $AWK -v hst=$i '{fnr++ ; \ -if ($1 ~ hst) {if ( fnr == 1 ) printf("%s\n",$0); else \ -printf("%s %s %s_%s\n",$1,$2,$3,$1) } else print}' $jid.host > $jid.host{$$} - /bin/mv $jid.host{$$} $jid.host - host=$jid.host - fi - fi - done - fi - fi # if test $program = $prog.marc -o $user -o $obj - - else # if test $host - # assume shared memory machine if no hostfile given and - # MPITYPE is set to mpich or Myrinet - # check for Myrinet that the total number of processes is - # less than number of available user ports, 5 - if test $MPITYPE = "mpich" -o $MPITYPE = "scali" - then - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - host=$jid.host - elif test $MPITYPE = "myrinet" - then - if test $nprocd -gt 5 - then - echo " " - echo "error, for Myrinet the number of processes " - echo "must not exceed 5 for a hostname" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error, for Myrinet the number of processes " >> $jid.log - echo "must not exceed 5 for a hostname" >> $jid.log - echo " " >> $jid.log - fi - exit 1 - fi - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - echo $nprocd > ~/.gmpi/$jid.host - echo `hostname` $nprocd | $AWK \ -'BEGIN {iport[0] = 2; \ - iport[1] = 4; \ - iport[2] = 5; \ - iport[3] = 6; \ - iport[4] = 7 \ - } \ - {for(iproc = 0; iproc < $2; iproc++) printf("%s %d\n",$1,iport[iproc])} \ -' >> ~/.gmpi/$jid.host - host=~/.gmpi/$jid.host - else - numproc=`echo $nprocd | $AWK '{sum=$1-1}; {print sum}'` - echo `hostname` $numproc $execpath > $jid.host - - fi - fi # if test myrinet - - fi # if test $host - - fi # if test $nprocd -gt 1 - -fi # if test $program = $exefile -o $program = $prog.marc - -############################################################################## -# construct run stream (Marc only) # -############################################################################## - -# set maximum message length for ddm to a large number -# for vendor provided mpi -if test $itree -eq 0 -a $MPITYPE = hardware -then - itree=100000000 - if test $MACHINENAME = SGI - then - itree=100000001 - fi -fi -if test $itree -eq 0 -a $MPITYPE = hpmpi -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = myrinet -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = nec -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = scali -then - itree=100000000 -fi -if test $itree -eq 0 -a $MPITYPE = intelmpi -then - itree=100000000 -fi -if test $nprocdddm -lt 2 -then - nprocdarg= -else - nprocdarg="$nprocdarg $nprocdddm" -fi -if test $nsolver -eq 0 -then - nsolverarg= -else - nsolverarg="$nsolverarg $nsolver" -fi -if test $nprocdddm -lt 2 -a $nsolver -eq 0 -then -nprocd=0 -fi -if test $nprocd -gt 0 -then - if test "$host" - then - if test -z "$RUN_JOB2" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - if test $MPITYPE = hpmpi -o $MACHINENAME = HP -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $host -- -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = IBM -a $MPITYPE = hardware -a "$MACHINETYPE" = NONSP - then - RUN_JOB="$RUN_JOB2 $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MPITYPE = "myrinet" - then - if test $MPIVERSION = "MPICH-GM1.2.1..7" - then - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB_TMP="$RUN_JOB2 $host $bd$program" - RUN_JOB=" -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - elif test $MACHINENAME = DEC -a $MPITYPE = hardware - then - RUN_JOB="$RUN_JOB2 $nprocd -hf $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - elif test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - numhost=`uniq $jid.mfile | wc -l` - if test "$INTELMPI_VERSION" = "HYDRA" - then - RUN_JOB_TMP="$RUN_JOB2 -machinefile $jid.mfile -configfile $jid.cfile" - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n $numhost -r $RSH -f $jid.mfile - RUN_JOB_TMP="$RUN_JOB2 $jid.cfile" - fi - -# intelmpi uses configfile. format: -# -host host1 -n n1 executable marcargs -# one such line per host -# collect the marcargs in RUN_JOB and construct the config file later -# collect the run stream in RUN_JOB_TMP - RUN_JOB="-jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - - - elif test $MACHINENAME = "SUN" -a $MPITYPE = "hardware" - then - RUN_JOB="$RUN_JOB2 $jid.mfile -n $nprocd $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB2 $host $bd$program -jid $jid -dirjid $DIRJID \ -$nprocdarg \ -$nsolverarg \ --maxnum $MAXNUM -itree $itree \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test "$userhost" - then - RUN_JOB="$RUN_JOB -mhost $userhost" - fi - if test $MPITYPE = "scali" - then -# set default working directory to /tmp to allow -# different directory names - SCAMPI_WORKING_DIRECTORY=/tmp - export SCAMPI_WORKING_DIRECTORY - fi - else - if test -z "$RUN_JOB1" - then - echo " " - echo "error: parallel job attempted on non-parallel version," - echo " or, if parallel version is installed, the include " - echo " file is probably corrupted" - echo " " - if test "$deletelog" = no - then - echo " " >> $jid.log - echo "error: parallel job attempted on non-parallel version," >> $jid.log - echo " or, if parallel version is installed, the include " >> $jid.log - echo " file is probably corrupted" >> $jid.log - echo " " >> $jid.log - fi - exit - fi - RUNNPROCD=$nprocd - if test $MACHINENAME = "IBM" -a $MPITYPE = "hardware" - then - RUNNPROCD= - MP_PROCS=$nprocd - export MP_PROCS - fi - if test $MPITYPE = "myrinet" - then - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - echo " " > /dev/null - else - export I_MPI_JOB_CONTEXT=$$ - mpdboot -n 1 -f $jid.hosts - fi - RUN_JOB="$RUN_JOB1 $RUNNPROCD $bd$program -jid $jid -dirjid $DIRJID \ - $nprocdarg \ - $nsolverarg \ - -maxnum $MAXNUM -itree $itree \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi - fi -else - if test $nauto -gt 0 -o $ndcoup -gt 0 - then - RUN_JOB="$RUN_JOB0 $BINDIR/exe_auto $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ - $ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - else -# this is for a serial job without auto restart: - RUN_JOB="$RUN_JOB0 $bd$program -jid $jid -dirjid $DIRJID \ --maxnum $MAXNUM \ -$ntearg $nte $ntsarg $nts $gpuoption -dirjob $DIRJOB " - fi -fi -if test "$rid" -then - RUN_JOB="$RUN_JOB -rid $rid -dirrid $DIRRID" -fi -if test "$pid" -then - RUN_JOB="$RUN_JOB -pid $pid -dirpid $DIRPID" -fi -if test "$sid" -then - RUN_JOB="$RUN_JOB -sid $sid -dirsid $DIRSID" -fi -if test "$did" -then - RUN_JOB="$RUN_JOB -def $did -dirdid $DIRDID" -fi -if test "$vid" -then - RUN_JOB="$RUN_JOB -vf $vid -dirvid $DIRVID" -fi -if test $nauto -gt 0 -then - RUN_JOB="$RUN_JOB -autorst $nauto " -fi -if test $ndcoup -gt 0 -then - RUN_JOB="$RUN_JOB -dcoup $ndcoup " -fi -if test $ndytran -gt 0 -then - RUN_JOB="$RUN_JOB -dytran $ndytran " -fi -if test $mesh -gt 0 -then - RUN_JOB="$RUN_JOB -me $mesh " -fi -if test $noutcore -gt 0 -then - RUN_JOB="$RUN_JOB -outcore $noutcore " -fi -if test "$dllrun" -gt 0 -then - RUN_JOB="$RUN_JOB -dll $dllrun " -fi -if test "$trkrun" -gt 0 -then - RUN_JOB="$RUN_JOB -trk $trkrun " -fi -if test "$iam" -then - RUN_JOB="$RUN_JOB -iam $iam " -fi -if test "$justlist" -then - RUN_JOB="$RUN_JOB -list 1 " -fi -if test "$feature" -then - RUN_JOB="$RUN_JOB -feature $feature " -fi -if test "$memlimit" -ne 0 -then - RUN_JOB="$RUN_JOB -ml $memlimit " -fi -if test "$cpinput" -then - RUN_JOB="$RUN_JOB -ci $cpinput " -fi -if test "$cpresults" -then - RUN_JOB="$RUN_JOB -cr $cpresults " -fi -if test "$DIRSCR" != "$DIRJOB" -then - RUN_JOB="$RUN_JOB -dirscr $DIRSCR" -else - DIRSCR=$DIRJOB -fi -if test "$makebdf" -then - RUN_JOB="$RUN_JOB -bdf $makebdf " -fi -if test $MPITYPE = "myrinet" -a "$host" -a "$MPIVERSION" != "MPICH-GM1.2.1..7" -then - # append $RUN_JOB to all lines of the host file - # and set RUN_JOB - $AWK -v args="$RUN_JOB" '{print $0,args}' $host > $host.$$ - /bin/mv $host.$$ $host - RUN_JOB=$RUN_JOB_TMP -fi -if test $MPITYPE = "intelmpi" -a "$host" -then - # construct config file, append $RUN_JOB to all lines of the config file - # and set RUN_JOB - if test "$INTELMPI_VERSION" = "HYDRA" - then - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-n %s",$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - else - grep -v '^#' $host | $AWK -v args="$RUN_JOB" -v path=$execpath -v en=$execname -v us=$usersub \ - '{if ( NF > 0) {\ - printf("-host %s -n %s",$1,$2); \ - if ( NF == 2 ) printf(" %s",path);\ - if ( NF >= 3 ) printf(" -wdir %s ",$3); \ - if ( NF >= 3 ) if (us) printf(" %s/%s",$3,en); else printf(" %s",path); \ - printf(" %s\n",args); \ - }\ - }' > $jid.cfile - fi - RUN_JOB=$RUN_JOB_TMP -fi -echo " " -echo "Final run stream value" -echo " RUNJOB="$RUN_JOB -if test "$deletelog" = no -then -echo " " >> $jid.log -echo "Final run stream value" >> $jid.log -echo " RUNJOB="$RUN_JOB >> $jid.log -fi - - -############################################################################## -# run marc using valgrind # -############################################################################## -#RUN_JOB="valgrind $RUN_JOB" -#RUN_JOB="valgrind --read-var-info=yes --gen-suppressions=yes $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=all -v $RUN_JOB" -#RUN_JOB="valgrind --gen-suppressions=yes --error-limit=no $RUN_JOB" -############################################################################## - - -############################################################################## -# run the requested program in a queue # -############################################################################## - -if test "$deletelog" = yes -then - echo - date -else - echo >> $jid.log - date >> $jid.log -fi -if [ $qid = short -o $qid = long -o $qid = verylong -o $qid = at ] -then - -/bin/rm -f $jid.runmarcscript - - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - - fi - cat > $jid.runmarcscript << END4 - if test "$user" - then - if test ${basefile##*.} = f - then - ln -sf "$user.f" "$usersub" - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - $SOLVERLIBS \ - $MARCCUDALIBS \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } -END4 -else - prgsav=yes -fi -/bin/rm $userobj 2>/dev/null - -# -# run marc -# - -cat >> $jid.runmarcscript << END5 - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -# first remove all .out files and incremental restart files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - /bin/rm $DIRJOB/$numdom${jid}_i_*.t08 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null - /bin/rm $DIRJOB/${jid}_i_*.t08 2>/dev/null -fi - -if test $nprocdddm -gt 1 -then - $RUN_JOB 2>>$jid.log -else - $RUN_JOB 2>>$jid.log -fi - -if test $dllrun -eq 0; then - if test $prgsav = no - then - /bin/rm -f $bd$program 2>/dev/null - fi -else - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes - then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test \$numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - numdom=\`echo \$numdom | $AWK '{sum=\$1-1}; {print sum}'\` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null -fi -END5 - - -# Submit to marc batch queue -# -if [ $qid = at ] -then -QUENAME=at -SUBMCMD= -else -# -# Submit to qsub queue -# -QUENAME=qsub -SUBMCMD="-q $qid -o /dev/null -e $jid.batch_err_log -x -r $jid" -if test "$priority" -then - SUBMCMD=$SUBMCMD" -p $priority" -fi -if test "$att" -then - SUBMCMD=$SUBMCMD" -a $att" -fi -if test "$cpu" -then - SUBMCMD=$SUBMCMD" -lt $cpu" -fi - -fi -echo $QUENAME $SUBMCMD -#cat $jid.runmarcscript -$QUENAME $SUBMCMD < $jid.runmarcscript - -/bin/rm -f $jid.runmarcscript - -############################################################################## -# run the requested program in the background # -############################################################################## - -else -if test $qid = background -then - -# -# first remove all old .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi -# -# compile user subroutine if present -# -( -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user.f $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user.f on host $i" - echo " $PRODUCT Exit number 3" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser.f 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user.f on host `hostname`" - fi - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - echo " $PRODUCT Exit number 3" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null - -# -# run marc - -# - -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi - -$RUN_JOB & - -marcpid=$! -echo $marcpid > $DIRJOB/$jid.pid -wait $marcpid - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - fi - fi - fi -fi - - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi - fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi -) 1>>$jid.log 2>&1 & - - -############################################################################## -# run the requested program in the foreground # -############################################################################## - -else - -# -# compile user subroutine if present -# -if test "$link" -then - if test "$user" - then - # compile and link on other hosts in $host if compstatus=no - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${compstatus[$counter]} = "no" - then - DIR1=$DIRJOB - DIR2=$DIR - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - marcdir=`echo $line | $AWK '{print $4}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - if test -n "$marcdir" - then - DIR2=$marcdir - fi - # first copy over the user sub if local directories - if test ${dirstatus[$counter]} = "local" - then - $RCP $user.f $i:$DIR1/ - fi - # do the compilation on the other machine - if test ${dirstatus[$counter]} = "shared" - then - hname=_$ibase - else - hname= - fi - remoteprog=$DIR1/${execname}$hname - remoteuser=$DIR1/`$BASENAME $user` - $RSH $i /bin/rm $remoteprog 2> /dev/null - echo - $RSH $i $DIR2/tools/comp_user $DIR2 $DIR1 $remoteuser $remoteprog - # check if successful, the new executable should be there - line=`$RSH $i /bin/ls $remoteprog 2> /dev/null` - if test "$line" - then - echo compilation and linking successful on host $i - else - echo "$0: compile failed for $user.f on host $i" - exit 1 - fi - # remove the user subroutine on remote machine - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $remoteuser.f 2> /dev/null - fi - fi - fi - done - fi - fi - if test "$userhost" - then - echo - echo "Compiling and linking user subroutine $user.f on host `hostname`" - fi - userobj=$DIRJOB/`$BASENAME $user .f`.o - basefile=`$BASENAME $usersubname` - if test ${basefile##*.} = f - then - usersub=$DIRJOB/`$BASENAME $user .f`.F - ln -sf "$user.f" "$usersub" - else - usersub=$usersubname - fi - if test $MACHINENAME = "CRAY" - then - $FORTRAN $usersub || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - else - $FORTRAN $usersub -o $userobj || \ - { - echo "$0: compile failed for $user.f" - exit 1 - } - /bin/rm $program 2>/dev/null - fi - if test ${basefile##*.} = f - then - /bin/rm -f "$usersub" - fi - fi # if test $user - - - $LOAD $bd${program} $MARC_LIB/main.o \ - $MARC_LIB/blkdta.o $MARC_LIB/comm?.o \ - ${userobj-} \ - $objs \ - $MARC_LIB/srclib.a \ - $MNFLIBS \ - $MDUSER \ - ${MUMPSSOLVERLIBS} \ - $MDSRCLIB \ - $MARC_LIB/mcvfit.a \ - $STUBS \ - ${SOLVERLIBS} \ - ${MARCCUDALIBS} \ - $TKLIBS \ - $MRCLIBS \ - $METISLIBS \ - $SYSLIBS \ - $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 - } - # copy user subroutine executable for hosts using local working dir - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - if test ${dirstatus[$counter]} = "local" -a ${compstatus[$counter]} = "yes" - then - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - echo "Copying executable to host ${i}" - $RCP $program ${i}:${DIR1}/ - fi - fi - done - fi - fi -else # if test $link - prgsav=yes -fi # if test $link -/bin/rm $userobj 2>/dev/null - -# done if no job id given -if test -z "$jid" -then - echo - echo only compilation requested - echo - exit -fi -# -# run marc -# -# Define share library path based on platforms -# This is required for using the Patran Mesher -if test $MACHINENAME = "IBM" -then - LIBPATH=$MARC_LIB:$MARC_LIB_SHARED:$LIBPATH - export LIBPATH -fi -# first remove all .out files -# the ones for ddm are removed in the code -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRJOB/$numdom$jid.out 2>/dev/null - /bin/rm $DIRJOB/$numdom$jid.log 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done -else - /bin/rm $DIRJOB/$jid.out 2>/dev/null -fi - -$RUN_JOB - -if test $nprocd -gt 1 -then - if test $MACHINENAME = "LINUX" -a $MPITYPE = "intelmpi" - then - if test "$INTELMPI_VERSION" = "HYDRA" - then - if test "$host" - then - /bin/rm $jid.mfile 2> /dev/null - /bin/rm $jid.hosts 2> /dev/null - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.cfile 2> /dev/null - else - echo " " > /dev/null - fi - else - if test "$host" - then - mpdcleanup -a -f $jid.mfile - /bin/rm $jid.host 2> /dev/null - /bin/rm $jid.mfile 2> /dev/null - else - mpdcleanup -a -f $jid.hosts - /bin/rm $jid.hosts 2> /dev/null - fi - fi - fi -fi - -if test $dllrun -eq 0; then -if test $prgsav = no -then - /bin/rm -f $bd$program 2>/dev/null - # for network run, remove executable on remote machines - # and executables with modified name - if test $nprocd -gt 1 - then - if test "$userhost" - then - counter=0 - if test -f "$host_filt" - then - for i in `$AWK -v n=$numfield '{print $n}' $host_filt` - do - ibase=${i%%.*} - if test $ibase != $thishost - then - counter=$((counter+1)) - DIR1=$DIRJOB - line=`grep -v '^#' $userhost | grep "^$ibase "` - workdir=`echo $line | $AWK '{print $3}'` - if test -n "$workdir" - then - DIR1=$workdir - fi - # if an incompatible host uses shared directory, - # then the root machine deletes the executable - if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" - then - hname=_$ibase - /bin/rm ${execname}$hname - fi - # if local directory used, the remote machine - # deletes the executable - if test ${dirstatus[$counter]} = "local" - then - $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null - fi - fi - done - fi - fi - fi -fi -else -#dllrun >0 - if test $cpdll = yes; then - filename=`basename $usersubname .f` - /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null - fi - if test $rmdll = yes;then - /bin/rm -f $DIRJOB/$marcdll 2>/dev/null - fi -fi - -if test $nprocdddm -gt 1 -then - numdom=$nprocdddm - while test $numdom -gt 0 - do - /bin/rm $DIRSCR/$numdom$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t74 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t75 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t76 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t77 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t78 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t79 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t84 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t85 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t86 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t87 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t88 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.t90 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sle 2>/dev/null - /bin/rm $DIRSCR/$numdom$jid.sin 2>/dev/null - numdom=`echo $numdom | $AWK '{sum=$1-1}; {print sum}'` - done - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - if test $MPITYPE = "myrinet" - then - if test -f "$host_filt" - then - /bin/rm $host_filt - fi - fi -else - /bin/rm $DIRSCR/$jid.t02 2>/dev/null - /bin/rm $DIRSCR/$jid.t03 2>/dev/null - /bin/rm $DIRSCR/$jid.t11 2>/dev/null - /bin/rm $DIRSCR/$jid.t12 2>/dev/null - /bin/rm $DIRSCR/$jid.t13 2>/dev/null - /bin/rm $DIRSCR/$jid.t14 2>/dev/null - /bin/rm $DIRSCR/$jid.t15 2>/dev/null - /bin/rm $DIRSCR/$jid.t22 2>/dev/null - /bin/rm $DIRSCR/$jid.t23 2>/dev/null - /bin/rm $DIRSCR/$jid.t32 2>/dev/null - /bin/rm $DIRSCR/$jid.t33 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t81* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t82* 2>/dev/null - /bin/rm $DIRSCR/$jid.*.t83* 2>/dev/null - /bin/rm $DIRSCR/$jid.t84 2>/dev/null - /bin/rm $DIRJOB/$jid.pid 2>/dev/null - /bin/rm $DIRJOB/$jid.sle 2>/dev/null - /bin/rm $DIRJOB/$jid.sin 2>/dev/null -fi - - -fi -fi diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/edit_window b/installation/mods_MarcMentat/2015/Mentat_bin/edit_window deleted file mode 100644 index b732a7694..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/edit_window +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -# This script opens a window running an editor. -# The command to invoke the editor is specified during DAMASK installation - -%EDITOR% $* \ No newline at end of file diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/edit_window.original b/installation/mods_MarcMentat/2015/Mentat_bin/edit_window.original deleted file mode 100644 index 64c0a68d0..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/edit_window.original +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -# This script opens a window running an editor. The default window is an -# xterm, and the default editor is vi. These may be customized. - -dir= -for d in /usr/bin /usr/bin/X11; do - if test -x "$d/xterm"; then - dir="$d" - break - fi -done - -if test -z "$dir"; then - echo "$0: Could not find xterm" - exit 1 -fi - -"$dir/xterm" -T "vi $*" -n "vi $*" -e vi $* diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill1.original b/installation/mods_MarcMentat/2015/Mentat_bin/kill1.original deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill1.original +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill4 b/installation/mods_MarcMentat/2015/Mentat_bin/kill4 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill4 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill5 b/installation/mods_MarcMentat/2015/Mentat_bin/kill5 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill5 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill6 b/installation/mods_MarcMentat/2015/Mentat_bin/kill6 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill6 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill7 b/installation/mods_MarcMentat/2015/Mentat_bin/kill7 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill7 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill8 b/installation/mods_MarcMentat/2015/Mentat_bin/kill8 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill8 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/kill9 b/installation/mods_MarcMentat/2015/Mentat_bin/kill9 deleted file mode 100644 index 6d1ff84bf..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/kill9 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "$1" = "" ]; then - echo "usage: $0 job_name" - exit 1 -fi - -echo STOP > $1.cnt diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit1.original b/installation/mods_MarcMentat/2015/Mentat_bin/submit1.original deleted file mode 100644 index 192e47a35..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit1.original +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=/msc/marc2015 -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_marc" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit4 b/installation/mods_MarcMentat/2015/Mentat_bin/submit4 deleted file mode 100644 index f25a2004e..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit4 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_hmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit5 b/installation/mods_MarcMentat/2015/Mentat_bin/submit5 deleted file mode 100644 index 786f6efc5..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit5 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_mp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit6 b/installation/mods_MarcMentat/2015/Mentat_bin/submit6 deleted file mode 100644 index 6a5d9d79f..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit6 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_lmp" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit7 b/installation/mods_MarcMentat/2015/Mentat_bin/submit7 deleted file mode 100644 index d0e3be475..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit7 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_h" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit8 b/installation/mods_MarcMentat/2015/Mentat_bin/submit8 deleted file mode 100644 index d466fc6ab..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit8 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_bin/submit9 b/installation/mods_MarcMentat/2015/Mentat_bin/submit9 deleted file mode 100644 index 207a61803..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_bin/submit9 +++ /dev/null @@ -1,187 +0,0 @@ -#!/bin/sh -# -# The exit status of this script is read by Mentat. -# Normal exit status is 0. -# - -DIR=%INSTALLDIR%/marc%VERSION% -if test $MARCDIR1 -then - DIR=$MARCDIR1 -fi - -if test -z "$DIR"; then - REALCOM="`ls -l $0 |awk '{ print $NF; }'`" - DIRSCRIPT=`dirname $REALCOM` - case $DIRSCRIPT in - \/*) - ;; - *) - DIRSCRIPT=`pwd`/$DIRSCRIPT - ;; - esac - . $DIRSCRIPT/getarch - - DIR="$MENTAT_MARCDIR" -fi - -SRCEXT=.f -SRCEXTC=.F -RSTEXT=.t08 -PSTEXT=.t19 -PSTEXTB=.t16 -VWFCEXT=.vfs - -slv=$1 -version=$2 -ndom_fea_solver=$3 -ndom_preprocessor=$4 -hostfile=$5 -compat=$6 -job=$7 -srcfile=$8 -srcmeth=$9 -shift 9 # cannot use $10, $11, ... -restart=$1 -postfile=$2 -viewfactorsfile=$3 -autorst=$4 -copy_datfile="-ci $5" -copy_postfile="-cr $6" -scr_dir=$7 -dcoup=$8 -assem_recov_nthread=$9 -shift 9 # cannot use $10, $11, ... -nthread=$1 -nsolver=$2 -mode=$3 -gpu=$4 - -if [ "$slv" != "" -a "$slv" != "marc" ]; then - slv="-iam sfm" -else - slv="" -fi - -if [ "$ndom_fea_solver" != "" -a "$ndom_fea_solver" != "1" ]; then - nprocds="-nprocds $ndom_fea_solver" -else - nprocd="" - if [ "$ndom_preprocessor" != "" -a "$ndom_preprocessor" != "1" ]; then - nprocd="-nprocd $ndom_preprocessor" - else - nprocd="" - fi -fi - -if [ "$srcfile" != "" -a "$srcfile" != "-" ]; then - srcfile=`echo $srcfile | sed "s/$SRCEXT$//" | sed "s/$SRCEXTC$//"` - case "$srcmeth" in - -) - srcfile="-u $srcfile" - ;; - compsave) - srcfile="-u $srcfile -save y" - ;; - runsaved) - srcfile=${srcfile%.*}".marc" - srcfile="-prog $srcfile" - ;; - esac -else - srcfile="" -fi - -if [ "$restart" != "" -a "$restart" != "-" ]; then - restart=`echo $restart | sed "s/$RSTEXT$//"` - restart="-r $restart" -else - restart="" -fi - -if [ "$postfile" != "" -a "$postfile" != "-" ]; then - postfile=`echo $postfile | sed "s/$PSTEXT$//"` - postfile=`echo $postfile | sed "s/$PSTEXTB$//"` - postfile="-pid $postfile" -else - postfile="" -fi - -if [ "$viewfactorsfile" != "" -a "$viewfactorsfile" != "-" ]; then - viewfactorsfile=`echo $viewfactorsfile | sed "s/$VWFCEXT$//"` - viewfactorsfile="-vf $viewfactorsfile" -else - viewfactorsfile="" -fi - -if [ "$hostfile" != "" -a "$hostfile" != "-" ]; then - hostfile="-ho $hostfile" -else - hostfile="" -fi - -if [ "$compat" != "" -a "$compat" != "-" ]; then - compat="-co $compat" -else - compat="" -fi - -if [ "$scr_dir" != "" -a "$scr_dir" != "-" ]; then - scr_dir="-sd $scr_dir" -else - scr_dir="" -fi - -if [ "$dcoup" != "" -a "$dcoup" != "0" ]; then - dcoup="-dcoup $dcoup" -else - dcoup="" -fi - -if [ "$assem_recov_nthread" != "" -a "$assem_recov_nthread" != "1" ]; then - assem_recov_nthread="-nthread_elem $assem_recov_nthread" -else - assem_recov_nthread="" -fi - -if [ "$nthread" != "" -a "$nthread" != "0" -a "$nthread" != "1" ]; then - nthread="-nthread $nthread" -else - nthread="" -fi - -if [ "$nsolver" != "" -a "$nsolver" != "0" ]; then - nsolver="-nsolver $nsolver" -else - nsolver="" -fi - -case "$mode" in - 4) mode="-mo i4" ;; - 8) mode="-mo i8" ;; - *) mode= ;; -esac - -if [ "$gpu" != "" -a "$gpu" != "-" ]; then - gpu="-gpu $gpu" -else - gpu="" -fi - -rm -f $job.cnt -rm -f $job.sts -rm -f $job.out -rm -f $job.log - -# To prevent a mismatch with the python version used by the solver -# do *not* prepend $MENTAT_INSTALL_DIR/python/bin to environment variable PATH -# unset environment variables PYTHONHOME and PYTHONPATH -unset PYTHONHOME -unset PYTHONPATH - -"${DIR}/tools/run_damask_l" $slv -j $job -v n -b y $nprocds $nprocd -autorst $autorst \ - $srcfile $restart $postfile $viewfactorsfile $hostfile \ - $compat $copy_datfile $copy_postfile $scr_dir $dcoup \ - $assem_recov_nthread $nthread $nsolver $mode $gpu > /dev/null 2>&1 -sleep 1 -exit 0 diff --git a/installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms b/installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms deleted file mode 100644 index 76d719930..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms +++ /dev/null @@ -1,2655 +0,0 @@ -#ifndef AUTOFORGE -popmenu job_title_pm file jobs.ms -popdown job_title_ok file jobs.ms - -group job_solver_gr file job_common.ms -group user_domains_gr file domain_decomposition.ms -group user_domains_generate_gr file domain_decomposition.ms -group user_domains_tail_gr file domain_decomposition.ms -group job_solver_opts_gr file job_common.ms -popmenu ddm_options file job_common.ms - -browser edit_browser file file.ms -browser directory_browser file file.ms -screen domains file domain_decomposition.ms - - - - browser usersub_file_browser { - position 0 0 - size 82 72 - text "$usersub_file_browser_label" ($usersub_file_browser_label) - filter "*.f *.F *.f90 *.F90" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$usersub_file_browser_command" ($usersub_file_browser_command) - } - - - - browser host_file_browser { - position 0 0 - size 82 72 - text "$host_file_browser_label" ($host_file_browser_label) - filter "*" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$host_file_browser_command" ($host_file_browser_command) - } - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_popmenu { - - text "RUN JOB" - - group { - - - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - button { - position 1 9 - size 24 4 - text "USER SUBROUTINE FILE" - browser usersub_file_browser - settext $usersub_file_browser_label "SELECT USER SUBROUTINE FILE" - set $usersub_file_browser_command "*job_usersub_file" - help job_usersub_file - } - - toggle { - position +26 = - size 22 4 - text "SELECTED USER SUBS" - toggle job_usersubs - help job_run_seluser - visible job_usersubs - popmenu job_usersub_pm - } - - display { - position 1 +4 - size 50 4 - display job_usersub_file - } - - button { - position 1 +4 - size 12 4 - text "EDIT" - command "*job_edit_usersub_file" - visible job_usersub_file - } - - button { - position +12 = - size 12 4 - text "CLEAR" - command "*job_clear_usersub_file" - visible job_usersub_file - } - - roller { - position +12 = - size 26 4 - nvalues 3 - texts "COMPILE / NO SAVE" - "COMPILE AND SAVE" - "RUN SAVED EXECUTABLE" - help job_run_compile - roller "job_option user_source" - visible job_usersub_file - commands "*job_option user_source:compile_nosave" - "*job_option user_source:compile_save" - "*job_option user_source:run_saved" - } - - toggle { - position 1 +6 - size 22 4 - text "PARALLELIZATION/\{GPU}" - help job_run_parallel - toggle "or(*job_option parallel:on, \ - *job_option assem_recov_multi_threading:on, \ - solver_multi_procs, \ - solver_multi_threads, \ - and(job_solver_mfront_sparse,\ - job_nonsym_off,\ - *job_option solver_use_gpu:on))" - popmenu job_run_parallelization_pm - set $popname2 "job_run_parallelization_pm" - } - - frame { - position +22 = - size 28 16 - border_width 1 - border_color black - - group { - - display { - position 0 0 - size 28 4 - display job_ddm_domains - } - - display { - position = +4 - size 28 4 - display job_assem_recov_nthreads - } - - display { - position = +4 - size 28 4 - display job_solver_procs - visible solver_allows_multi_procs - } - - display { - position = = - size 28 4 - display job_solver_threads - visible "and(solver_allows_multi_threads,\ - not(and(job_solver_mfront_sparse,\ - *job_option parallel:on)))" - } - - display { - position = +4 - size 28 4 - display job_solver_gpu - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } - } - } - - button { - position 1 +18 - size 8 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - -# see also job_common.ms -# see also the ADVANCED JOB SUBMISSION popmenu in this file - - label { - position +10 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" - help job_option_input_style - } - - button { - position +20 = - size 13 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position 1 +6 - size 16 6 - text "SUBMIT (1)" - command "*submit_job 1 *monitor_job" - } - - button { - position +16 = - size 16 6 - text "ADVANCED JOB SUBMISSION" - popmenu job_submit_adv_pm - } - - button { - position +16 = - size 18 6 - text "DAMASK" - popmenu damask - } - - button { - position 1 +6 - size 16 6 - text "UPDATE" - command "*update_job" - } - - button { - position +16 = - size 16 6 - text "MONITOR" - command "*monitor_job" - } - - button { - position +16 = - size 18 6 - text "KILL" - command "*kill_job *monitor_job" - } - - label { - position 1 +7 - size 32 4 - text "STATUS" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_status" - } - - label { - position -32 +4 - size 32 4 - text "CURRENT INCREMENT (CYCLE)" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_increment" - } - - label { - position -32 +4 - size 32 4 - text "SINGULARITY RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_singularity_ratio" - } - - label { - position -32 +4 - size 32 4 - text "CONVERGENCE RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_convergence_ratio" - } - - label { - position 1 +4 - size 32 4 - text "ANALYSIS TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_analysis_time" - } - - label { - position -32 +4 - size 32 4 - text "WALL TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_time" - } - - frame { - position 1 +4 - size 50 8 - - group { - - frame { - position 0 0 - size 50 8 - text "TOTAL" - border_width 1 - border_color black - group { - - label { - position +6 = - size 13 4 - text "CYCLES" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_cycles" - border_width 1 - border_color black - } - - label { - position -13 +4 - size 13 4 - text "SEPARATIONS" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_separations" - border_width 1 - border_color black - } - - label { - position +10 -4 - size 11 4 - text "CUT BACKS" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_cut_backs" - border_width 1 - border_color black - } - - label { - position -11 +4 - size 11 4 - text "REMESHES" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_remeshes" - border_width 1 - border_color black - } - } - } - } - } - - label { - position 1 +8 - size 19 4 - text "EXIT NUMBER" - border_width 1 - border_color black - } - - integer { - position +19 = - size 10 4 - display "job_exit" - } - - button { - position +10 = - size 21 4 - text "EXIT MESSAGE" - popmenu job_exit_msg_pm - help exit_message - } - - label { - position 1 +6 - size 7 4 - text "EDIT" - border_width 1 - border_color black - } - - button { - position +7 = - size 12 4 - text "OUTPUT FILE" - command "*job_edit_output" - } - - button { - position +12 = - size 9 4 - text "LOG FILE" - command "*job_edit_log_file" - } - - button { - position +9 = - size 12 4 - text "STATUS FILE" - command "*job_edit_status_file" - } - - button { - position +12 = - size 10 4 - text "ANY FILE" - settext $edit_browser_label "EDIT FILE" - set $edit_browser_command "*edit_file" - browser edit_browser - help edit_file - } - - popdown { - position 1 +6 - size 32 4 - text "OPEN POST FILE (MODEL PLOT RESULTS MENU)" - command "@popdown(job_properties_pm) @main(results) @popup(modelplot_pm) *post_open_default" - } - - button { - position 1 +6 - size 12 8 - text "RESET" - command "*job_submit_reset" - } - - popdown { - position +38 = - size 12 8 - text "OK" - } - } - - window job_run_wi { - parent mentat - origin 35 1 - size 52 115 - background_color body - border_width 1 - border_color border - buffering single - } - - mode permanent -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_usersub_pm { - - text "CURRENTLY SELECTED USER SUBROUTINES" - - group { - - - display { - position 1 +5 - size 64 86 - display "job_usersubs" - } - - popdown { - position 27 +88 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 66 102 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_submit_adv_pm { - - text "ADVANCED JOB SUBMISSION" - - group { - - - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - label { - position 1 9 - size 19 4 - text "INITIAL ALLOCATION" - border_width 1 - border_color black - } - label { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - } - text { - position +15 = - size 10 4 - display "job_param_value_general_init_allocation" - command "*job_param general_init_allocation" - help job_param_general_init_allocation - } - - label { - position +10 = - size 4 4 - text "MB" - border_width 1 - border_color black - } - - toggle { - position 1 +5 - size 32 4 - text "OUT-OF-CORE ELEMENT STORAGE" - help job_param_elsto - toggle "*job_option elsto:on" - true_command "*job_option elsto:on" - false_command "*job_option elsto:off" - } - - toggle { - position 1 +4 - size 32 4 - text "OUT-OF-CORE INCREMENTAL BACKUP" - help job_param_inc_backup_storage - toggle "*job_option inc_backup_storage:out_of_core" - true_command "*job_option inc_backup_storage:out_of_core" - false_command "*job_option inc_backup_storage:in_core" - } - - toggle { - position +34 = - size 14 4 - text "CHECK SIZES" - help job_run_check - toggle "*job_option check:on" - true_command "*job_option check:on" - false_command "*job_option check:off" - } - - label { - position 1 +6 - size 16 4 - text "INTEGER SIZE" - border_width 1 - border_color black - } - - roller { - position +16 = - size 32 4 - nvalues 3 - texts "DEFAULT" - "4-BYTE INTEGERS" - "8-BYTE INTEGERS" - commands "*job_option marc_integer_size:default" - "*job_option marc_integer_size:i4" - "*job_option marc_integer_size:i8" - help job_run_intsize - roller "job_option marc_integer_size" - } - - frame { - position 1 +6 - size 48 12 - text "MARC INPUT FILE" - border_width 1 - border_color black - - group { - - label { - position 0 4 - size 9 4 - text "VERSION" - border_width 1 - border_color black - } - - roller { - position +9 = - size 14 4 - nvalues 21 - nvisible 21 - texts "DEFAULT" -#if 0 - "2015" -#endif - "2014.2" - "2014.1" - "2014" - "2013.1" - "2013" - "2012" - "2011" - "2010.2" - "2010" - "2008" - "2007" - "2005R3" - "2005" - "2003" - "2001" - "2000" -#if 0 - "8" -#endif - "K7" - "K6.2" - "K5" - "K4" - help job_param_version - rollers "job_input_version_default" -#if 0 - "job_input_version_2015" -#endif - "job_input_version_2014.2" - "job_input_version_2014.1" - "job_input_version_2014" - "job_input_version_2013.1" - "job_input_version_2013" - "job_input_version_2012" - "job_input_version_2011" - "job_input_version_2010.2" - "job_input_version_2010" - "job_input_version_2008" - "job_input_version_2007" - "job_input_version_2005r3" - "job_input_version_2005" - "job_input_version_2003" - "job_input_version_2001" - "job_input_version_2000" -#if 0 - "job_input_version_8" -#endif - "job_input_version_k7" - "job_input_version_k6" - "job_input_version_k5" - "job_input_version_k4" - commands "*job_option version:default" -#if 0 - "*job_option version:2015" -#endif - "*job_option version:2014.2" - "*job_option version:2014.1" - "*job_option version:2014" - "*job_option version:2013.1" - "*job_option version:2013" - "*job_option version:2012" - "*job_option version:2011" - "*job_option version:2010.2" - "*job_option version:2010" - "*job_option version:2008" - "*job_option version:2007" - "*job_option version:2005r3" - "*job_option version:2005" - "*job_option version:2003" - "*job_option version:2001" - "*job_option version:2000" -#if 0 - "*job_option version:8" -#endif - "*job_option version:k7" - "*job_option version:k6" - "*job_option version:k5" - "*job_option version:k4" - visibles "job_allows_input_version_default" -#if 0 - "job_allows_input_version_2015" -#endif - "job_allows_input_version_2014.2" - "job_allows_input_version_2014.1" - "job_allows_input_version_2014" - "job_allows_input_version_2013.1" - "job_allows_input_version_2013" - "job_allows_input_version_2012" - "job_allows_input_version_2011" - "job_allows_input_version_2010.2" - "job_allows_input_version_2010" - "job_allows_input_version_2008" - "job_allows_input_version_2007" - "job_allows_input_version_2005r3" - "job_allows_input_version_2005" - "job_allows_input_version_2003" - "job_allows_input_version_2001" - "job_allows_input_version_2000" -#if 0 - "job_allows_input_version_8" -#endif - "job_allows_input_version_k7" - "job_allows_input_version_k6" - "job_allows_input_version_k5" - "job_allows_input_version_k4" - } - -# see also job_common.ms -# see also the RUN JOB popmenu in this file - - label { - position +14 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" - help job_option_input_style - } - - toggle { - position 0 +4 - size 48 4 - text "EXTENDED PRECISION" - help job_run_precision - toggle "*job_option inp_file_prec:extended" - true_command "*job_option inp_file_prec:extended" - false_command "*job_option inp_file_prec:normal" - } - } - } - - button { - position 1 +14 - size 24 4 - text "SCRATCH DIRECTORY" - settext $directory_browser_label "JOB SCRATCH DIRECTORY" - set $directory_browser_command "*job_scratch_directory" - browser directory_browser - help job_scratch_directory - } - - button { - position +24 = - size 24 4 - text "CLEAR" - command "*job_clear_scratch_directory" - visible job_scratch_directory - } - - text { - position 1 +4 - size 48 4 - display job_scratch_dir - command "*job_scratch_directory" - } - -#ifdef DCOM - toggle { - position 1 +6 - size 8 4 - text "\{DCOM}" - toggle "*job_option dcom:on" - help job_run_dcom - true_command "*job_option dcom:on" - false_command "*job_option dcom:off" - visible win32_available - } - - button { - position +8 = - size 12 4 - text "HOSTNAME" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } - - text job_dcom_hostname { - position +12 = - size 28 4 - display "job_dcom_hostname" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } -#endif - - button { - position 1 +6 - size 24 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - - button { - position +24 = - size 24 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position +4 +6 - size 20 4 - text "WRITE INPUT FILE" - command "*job_write_input" - } - - button { - position = +4 - size 20 4 - text "EDIT INPUT FILE" - command "*job_edit_input" - } - - popdown { - position 1 +5 - size 20 6 - text "SUBMIT 1" - command "*submit_job 1 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 1" - command "*execute_job 1 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 2" - command "*submit_job 2 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 2" - command "*execute_job 2 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 3" - command "*submit_job 3 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 3" - command "*execute_job 3 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - - mode permanent -} - -#-------------------------------------------------------------------------------------------------- -popmenu damask { - -#ifdef QT_MENTAT - text "DAMASK.MPIE.DE" -#endif - - group { -#ifndef QT_MENTAT - label { - position 0 0 - size 50 4 - text "DAMASK.MPIE.DE" - } -#endif - - label { - position 1 6 - size 13 6 - text "Optimzation" - border_width 1 - border_color black - } - - label { - position +13 = - size 20 6 - text "write Input" - border_width 1 - border_color black - } - - label { - position +18 = - size 30 6 - text "do not write Inp." - border_width 1 - border_color black - } - - label { - position -32 +6 - size 12 6 - text "O2 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 4 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 4 *monitor_job" - } - - label { - position -32 +6 - size 12 6 - text "O1 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 5 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 5 *monitor_job" - } - - label { - position -32 +6 - size 12 6 - text "O0 / OpenMP" - border_width 1 - border_color black - } - - popdown { - position +12 = - size 20 6 - text "Submit" - command "*submit_job 6 *monitor_job" - } - - popdown { - position +20 = - size 20 6 - text "Execute" - command "*execute_job 6 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "CANCEL" - } -} - - - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - mode permanent -} - -#-------------------------------------------------------------------------------------------------- -popmenu job_exit_msg_pm { - - text "EXIT MESSAGE" - - group { - - - - text { - position 1 5 - size 84 74 - multiline - readonly - display "job_exit_msg" - } - - popdown { - position 37 +76 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 86 90 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_parallelization_pm { - - text "PARALLELIZATION/\{GPU}" - - group { - - - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - frame { - position 1 9 - size 48 28 - group job_ddm_gr - text "DOMAIN DECOMPOSITION" - border_width 1 - border_color black - } - - frame { - position 1 +29 - size 36 13 - group job_assem_recov_gr - text "ASSEMBLY AND RECOVERY" - border_width 1 - border_color black - } - - frame { - position 1 +14 - size 58 31 - group job_parallel_matrix_solver_gr - text "MATRIX SOLVER" - border_width 1 - border_color black - } - - frame { - position 1 +32 - size 48 28 - group job_parallel_env_gr - text "PARALLELIZATION ENVIRONMENT" - border_width 1 - border_color black - visible "or(*job_option parallel:on, \ - solver_multi_procs)" - } - - popdown { - position 24 +30 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 1 - size 60 119 - background_color body - border_width 1 - border_color border - buffering single - } - mode permanent -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_gr { - - toggle { - position 1 4 - size 30 4 - text "USE \{DDM}" - toggle "*job_option parallel:on" - help job_run_ddm_use - true_command "*job_option parallel:on" - false_command "*job_option parallel:off" - active "not(job_solver_it_ext)" - } - - frame { - position +2 +5 - size 44 18 - group job_ddm_use_gr - visible "*job_option parallel:on" - } -} - -group job_ddm_use_gr { - roller { - position 0 0 - size 30 4 - nvalues 2 - texts "DECOMPOSITION IN MARC" - "DECOMPOSITION IN MENTAT" - roller "job_option ddm_generator" - commands "*job_option ddm_generator:fea_solver" - "*job_option ddm_generator:preprocessor" - help job_run_ddm_generator - } - - frame { - position 0 +5 - size 44 8 - group job_ddm_fea_solver_gr - visible "*job_option ddm_generator:fea_solver" - } - - frame { - position = = - size 44 8 - group job_ddm_preprocessor_gr - visible "*job_option ddm_generator:preprocessor" - } - - text { - position 0 +9 - size 22 4 - text "Single Input File" - readonly - visible "*job_option ddm_generator:fea_solver" - } - - roller { - position = = - size 22 4 - nvalues 2 - texts "MULTIPLE INPUT FILES" - "SINGLE INPUT FILE" - roller "job_option ddm_single_input" - commands "*job_option ddm_single_input:off" - "*job_option ddm_single_input:on" - visible "*job_option ddm_generator:preprocessor" - help job_run_ddm_single_input - } - - roller { - position +23 = - size 21 4 - nvalues 2 - texts "MULTIPLE POST FILES" - "SINGLE POST FILE" - roller "job_option ddm_single_post" - commands "*job_option ddm_single_post:off" - "*job_option ddm_single_post:on" - help job_run_ddm_single_post - } -} - - - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_fea_solver_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - help job_param - } - - text { - position +10 = - size 4 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position +4 = - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - } - - button { - position +4 +4 - size 19 4 - text "ADVANCED SETTINGS" - popmenu job_ddm_fea_solver_pm - } -} - - - - -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_fea_solver_pm { - - text "JOB PARALLELIZATION" - - group { - units 32 120 - - - label { - position 0 5 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - frame { - - position 0 +9 - size 32 76 - text "ADVANCED DECOMPOSITION IN MARC" - border_width 1 - border_color black - - group { - - label { - position 1 4 - size 16 4 - text "# DOMAINS" - help job_param - } - - text { - position +16 = - size 14 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position 1 +4 - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - } - - frame { - position 1 +5 - size 30 20 - group job_ddm_direction_gr - visible "or(*job_option ddm_method:vector, \ - *job_option ddm_method:radial, \ - *job_option ddm_method:angular)" - } - - toggle { - position 1 +21 - size 30 4 - text "DOMAIN ISLAND REMOVAL" - toggle "*job_option ddm_island_removal:on" - true_command "*job_option ddm_island_removal:on" - false_command "*job_option ddm_island_removal:off" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "GRAPH" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "COARSE" - "FINE" - help ddm_decomp_coarse_graph - rollers "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - commands "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "QUADRATIC ELEMENTS" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "GENUINE" - "LINEARIZED" - help job_run_ddm_decomp_linearized - rollers "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - commands "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - } - - label { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - help job_param - } - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_elem_weight_factor" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } - - toggle { - position 1 +5 - size 30 4 - text "DETECT CONTACT" - toggle "*job_option ddm_detect_contact:on" - true_command "*job_option ddm_detect_contact:on" - false_command "*job_option ddm_detect_contact:off" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - help job_run_ddm_decomp_detect_contact - } - - label { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - visible "*job_option ddm_detect_contact:on" - } - - text { - position +15 = - size 15 4 - command "*set_ddm_contact_tolerance" - display "job_param_value_ddm_contact_tolerance" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } - - label { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - visible "*job_option ddm_detect_contact:on" - } - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_contact_constr_factor" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } - } - } - - popdown { - position 0 +77 - size 32 8 - text "OK" - } - } - mode permanent -} # job_ddm_fea_solver_pm - - - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_direction_gr { - - button { - position 0 0 - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "*job_option ddm_method:vector" - } - - button { - position = = - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "not(*job_option ddm_method:vector)" - } - - button { - position +15 = - size 15 4 - text "FROM / TO" - command "*job_vector_from_to ddm_sort_direction_x" - } - - text { - position -15 +4 - size 10 4 - command "*job_param ddm_sort_direction_x" - display "job_param_value_ddm_sort_direction_x" - help ddm_job_decomp_user_direction_x - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_y" - display "job_param_value_ddm_sort_direction_y" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_z" - display "job_param_value_ddm_sort_direction_z" - } - - frame { - position 0 +4 - size 30 8 - group job_ddm_sort_point_gr - visible "not(*job_option ddm_method:vector)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_gr { - - label { - position 0 0 - size 14 4 - border_width 1 - border_color black - text "POINT ON AXIS" - } - - roller { - position +14 = - size 10 4 - nvalues 2 - texts "DEFAULT" - "USER" - roller "job_option ddm_sort_point" - commands "*job_option ddm_sort_point:default" - "*job_option ddm_sort_point:user" - } - - button { - position +10 = - size 6 4 - text "SET" - command "*job_position ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position 0 +4 - size 10 4 - command "*job_param ddm_sort_point_x" - display "job_param_value_ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_y" - display "job_param_value_ddm_sort_point_y" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_z" - display "job_param_value_ddm_sort_point_z" - visible "*job_option ddm_sort_point:user" - } -} - - - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_preprocessor_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - border_width 1 - border_color black - } - - integer { - position +10 = - size 4 4 - display valid_domains - } - - button { - position +4 = - size 30 4 - text "USER DOMAINS" - popmenu domains_pm - help job_run_ddm_user_domains - } -} - - - - -#-------------------------------------------------------------------------------------------------- -group job_assem_recov_gr { - - toggle { - position 1 +4 - size 30 4 - text "MULTIPLE THREADS" - true_command "*job_option assem_recov_multi_threading:on" - false_command "*job_option assem_recov_multi_threading:off" - toggle "*job_option assem_recov_multi_threading:on" - } - - label { - position +2 +4 - size 12 4 - text "# THREADS" - visible "*job_option assem_recov_multi_threading:on" - } - - text { - position +12 = - size 4 4 - display "job_param_value_assem_recov_nthreads" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } - - label { - position +4 = - size 12 4 - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 = - size 4 4 - display "job_assem_recov_nthreads_dom" - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_matrix_solver_gr { - - label { - position 3 4 - size 12 4 - text "SOLUTION" - border_width 1 - border_color black - } - - roller { - position +12 = - size 18 4 - nvalues 2 - texts "SYMMETRIC" - "NONSYMMETRIC" - rollers job_nonsym_off - job_nonsym_on - commands "*job_option solver_nonsym:off" - "*job_option solver_nonsym:on" - help job_param_solver_method - } - - label { - position -12 +4 - size 6 4 - text "TYPE" - border_width 1 - border_color black - } - - roller { - position +6 = - size 24 4 - nvalues 9 - help job_param_solver_method - texts "MULTIFRONTAL SPARSE" - "MIXED DIRECT-ITERATIVE" - "CASI ITERATIVE" - "PARDISO DIRECT SPARSE" - "MUMPS PARALLEL DIRECT" - "HARDWARE SPARSE" - "ITERATIVE SPARSE" - "DIRECT PROFILE" - "DIRECT SPARSE" - rollers job_solver_mfront_sparse - job_solver_mixed_direct_iterative - job_solver_it_ext - job_solver_pardiso - job_solver_mumps - job_solver_sparse - job_solver_it_sparse - job_solver_dir_profile - job_solver_dir_sparse - commands "*job_option solver:mfront_sparse" - "*job_option solver:mixed_direct_iterative" - "*job_option solver:it_ext" - "*job_option solver:pardiso" - "*job_option solver:mumps" - "*job_option solver:sparse" - "*job_option solver:it_sparse" - "*job_option solver:dir_profile" - "*job_option solver:dir_sparse" - visibles job_allows_solver_mfront_sparse - job_allows_solver_mixed_direct_iterative - job_allows_solver_it_ext - job_allows_solver_pardiso - job_allows_solver_mumps - job_allows_solver_sparse - job_allows_solver_it_sparse - job_allows_solver_dir_profile - job_allows_solver_dir_sparse - help job_param_solver_method - } - - button { - position +24 = - size 10 4 - text "OPTIONS" - popmenu job_parallel_matrix_solver_opt_pm - } - - frame { - position +10 = - size 14 4 - group job_run_solver_ddm_opts_gr - visible "*job_option parallel:on" - } - - frame { - position 1 +5 - size 46 8 - group job_solver_multi_procs_gr - visible solver_allows_multi_procs - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_gr - visible solver_allows_multi_threads - } - - frame { - position 1 +9 - size 46 8 - group job_solver_gpu_gr - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } -} - - - - -#-------------------------------------------------------------------------------------------------- -popmenu job_parallel_matrix_solver_opt_pm { - - text "MATRIX SOLVER OPTIONS" - - group { - - - frame { - position 1 5 - size 36 23 - group job_solver_opts_gr - } - - popdown { - position 13 +25 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 41 12 - size 38 39 - border_width 1 - border_color border - background_color body - } - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -group job_run_solver_ddm_opts_gr { - - button { - position 0 0 - size 14 4 - text "\{DDM} OPTIONS" - popmenu ddm_options -# see also job_common.ms! - visible "not(or(job_solver_it_sparse, \ - job_solver_it_ext, \ - job_solver_mixed_direct_iterative, \ - job_solver_pardiso, \ - job_solver_mumps))" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_procs_parallel_off_gr - visible "*job_option parallel:off" - } - - frame { - position = = - size 46 8 - group job_solver_multi_procs_parallel_on_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - true_command "*job_option nsolver_procs_serial:on" - false_command "*job_option nsolver_procs_serial:off" - toggle "*job_option nsolver_procs_serial:on" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - visible "*job_option nsolver_procs_serial:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - help job_run_multithreading - toggle true - set $dummy dummy - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - border_width 1 - border_color black - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - help job_run_multithreading - rollers "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_nsolver_procs_ddm_automatic_gr - visible "*job_option nsolver_procs_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_nsolver_procs_ddm_user_gr - visible "*job_option nsolver_procs_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_user_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } - - text { - position +8 = - size 8 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - } -} - -group job_solver_multi_threads_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_off_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_on_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_off_gr - visible "and(job_solver_pardiso,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_on_gr - visible "and(job_solver_pardiso,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_it_ext_off_gr - visible "and(job_solver_it_ext,*job_option parallel:off)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option mfront_sparse_multi_threading:on" - true_command "*job_option mfront_sparse_multi_threading:on" - false_command "*job_option mfront_sparse_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option mfront_sparse_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true - set $dummy dummy - } - - label { - position +30 0 - size 12 4 - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 0 - size 4 4 - display "job_mfront_sparse_nthreads_dom" - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - } - - label { - position 2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_automatic_gr - visible "*job_option mfront_sparse_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_user_gr - visible "*job_option mfront_sparse_multi_threading_ddm:user" - } -} -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_user_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - } - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - - - -#-------------------------------------------------------------------------------------------------- -group job_solver_gpu_gr { - - toggle { - position 0 0 - size 30 4 - text "USE \{GPU(s)}" - toggle "*job_option solver_use_gpu:on" - true_command "*job_option solver_use_gpu:on" - false_command "*job_option solver_use_gpu:off" - help job_solver_gpu - } - - label { - position +2 +4 - size 16 4 - text "\{GPU} SELECTION" - border_width 1 - border_color black - visible "*job_option solver_use_gpu:on" - } - - roller { - position +16 = - size 12 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - rollers "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - visible "*job_option solver_use_gpu:on" - help job_solver_gpu - } - - text { - position +12 = - size 16 4 - display job_solver_gpus - command "*clear_job_solver_gpus *job_solver_gpus" - visible "and(*job_option solver_use_gpu:on,*job_option solver_gpus:user)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option pardiso_multi_threading:on" - true_command "*job_option pardiso_multi_threading:on" - false_command "*job_option pardiso_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option pardiso_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true - set $dummy dummy - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_pardiso_multi_threads_ddm_automatic_gr - visible "*job_option pardiso_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_pardiso_multi_threads_ddm_user_gr - visible "*job_option pardiso_multi_threading_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_user_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_it_ext_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option it_ext_multi_threading:on" - true_command "*job_option it_ext_multi_threading:on" - false_command "*job_option it_ext_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option it_ext_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option it_ext_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_gr { - - roller { - position 1 4 - size 30 4 - nvalues 2 - texts "SINGLE MACHINE" - "NETWORK" - help job_run_ddm_setup - roller "job_option parallel_setup" - commands "*job_option parallel_setup:single" - "*job_option parallel_setup:network" - } - - frame { - position +2 +5 - size 44 18 - group job_parallel_env_network_gr - visible "*job_option parallel_setup:network" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_gr { - - button { - position 0 0 - size 28 4 - text "HOST FILE" - browser host_file_browser - settext $host_file_browser_label "SELECT HOST FILE" - set $host_file_browser_command "*job_host_file" - help job_host_file - } - - button { - position +28 = - size 8 4 - text "EDIT" - command "*job_edit_host_file" - help job_edit_host_file - visible job_host_file - } - - button { - position +8 = - size 8 4 - text "CLEAR" - command "*job_clear_host_file" - help job_clear_host_file - visible job_host_file - } - - display { - position 0 +4 - size 44 4 - display job_host_file - } - - frame { - position 0 +5 - size 44 9 - group job_parallel_env_network_ddm_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_ddm_gr { - - toggle { - position 0 0 - size 22 4 - text "COPY INPUT FILE" - toggle "*job_option copy_input_file:on" - true_command "*job_option copy_input_file:on" - false_command "*job_option copy_input_file:off" - help job_host_copy_inputfile - } - - toggle { - position +23 = - size 21 4 - text "COPY POST FILE" - toggle "*job_option copy_post_file:on" - true_command "*job_option copy_post_file:on" - false_command "*job_option copy_post_file:off" - help job_host_copy_inputfile - } - - label { - position 0 +5 - size 10 4 - text "HOSTS" - border_width 1 - border_color black - visible job_usersub_file - } - - roller { - position +10 = - size 18 4 - nvalues 2 - texts "COMPATIBLE" - "INCOMPATIBLE" - roller "job_option network_hosts" - commands "*job_option network_hosts:compatible" - "*job_option network_hosts:incompatible" - help job_host_comp - visible job_usersub_file - } -} - - -#endif diff --git a/installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms.original b/installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms.original deleted file mode 100644 index a0dc4ff7f..000000000 --- a/installation/mods_MarcMentat/2015/Mentat_menus/job_run.ms.original +++ /dev/null @@ -1,2518 +0,0 @@ -#ifndef AUTOFORGE -popmenu job_title_pm file jobs.ms -popdown job_title_ok file jobs.ms - -group job_solver_gr file job_common.ms -group user_domains_gr file domain_decomposition.ms -group user_domains_generate_gr file domain_decomposition.ms -group user_domains_tail_gr file domain_decomposition.ms -group job_solver_opts_gr file job_common.ms -popmenu ddm_options file job_common.ms - -browser edit_browser file file.ms -browser directory_browser file file.ms -screen domains file domain_decomposition.ms - - - - browser usersub_file_browser { - position 0 0 - size 82 72 - text "$usersub_file_browser_label" ($usersub_file_browser_label) - filter "*.f *.F *.f90 *.F90" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$usersub_file_browser_command" ($usersub_file_browser_command) - } - - - - browser host_file_browser { - position 0 0 - size 82 72 - text "$host_file_browser_label" ($host_file_browser_label) - filter "*" - nvisible 10 - select_files true - cancel_action popdown - ok_action popdown - command "$host_file_browser_command" ($host_file_browser_command) - } - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_popmenu { - - text "RUN JOB" - - group { - - - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - button { - position 1 9 - size 24 4 - text "USER SUBROUTINE FILE" - browser usersub_file_browser - settext $usersub_file_browser_label "SELECT USER SUBROUTINE FILE" - set $usersub_file_browser_command "*job_usersub_file" - help job_usersub_file - } - - toggle { - position +26 = - size 22 4 - text "SELECTED USER SUBS" - toggle job_usersubs - help job_run_seluser - visible job_usersubs - popmenu job_usersub_pm - } - - display { - position 1 +4 - size 50 4 - display job_usersub_file - } - - button { - position 1 +4 - size 12 4 - text "EDIT" - command "*job_edit_usersub_file" - visible job_usersub_file - } - - button { - position +12 = - size 12 4 - text "CLEAR" - command "*job_clear_usersub_file" - visible job_usersub_file - } - - roller { - position +12 = - size 26 4 - nvalues 3 - texts "COMPILE / NO SAVE" - "COMPILE AND SAVE" - "RUN SAVED EXECUTABLE" - help job_run_compile - roller "job_option user_source" - visible job_usersub_file - commands "*job_option user_source:compile_nosave" - "*job_option user_source:compile_save" - "*job_option user_source:run_saved" - } - - toggle { - position 1 +6 - size 22 4 - text "PARALLELIZATION/\{GPU}" - help job_run_parallel - toggle "or(*job_option parallel:on, \ - *job_option assem_recov_multi_threading:on, \ - solver_multi_procs, \ - solver_multi_threads, \ - and(job_solver_mfront_sparse,\ - job_nonsym_off,\ - *job_option solver_use_gpu:on))" - popmenu job_run_parallelization_pm - set $popname2 "job_run_parallelization_pm" - } - - frame { - position +22 = - size 28 16 - border_width 1 - border_color black - - group { - - display { - position 0 0 - size 28 4 - display job_ddm_domains - } - - display { - position = +4 - size 28 4 - display job_assem_recov_nthreads - } - - display { - position = +4 - size 28 4 - display job_solver_procs - visible solver_allows_multi_procs - } - - display { - position = = - size 28 4 - display job_solver_threads - visible "and(solver_allows_multi_threads,\ - not(and(job_solver_mfront_sparse,\ - *job_option parallel:on)))" - } - - display { - position = +4 - size 28 4 - display job_solver_gpu - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } - } - } - - button { - position 1 +18 - size 8 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - -# see also job_common.ms -# see also the ADVANCED JOB SUBMISSION popmenu in this file - - label { - position +10 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" - help job_option_input_style - } - - button { - position +20 = - size 13 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position 1 +6 - size 16 6 - text "SUBMIT (1)" - command "*submit_job 1 *monitor_job" - } - - button { - position +16 = - size 34 6 - text "ADVANCED JOB SUBMISSION" - popmenu job_submit_adv_pm - } - - button { - position 1 +6 - size 16 6 - text "UPDATE" - command "*update_job" - } - - button { - position +16 = - size 16 6 - text "MONITOR" - command "*monitor_job" - } - - button { - position +16 = - size 18 6 - text "KILL" - command "*kill_job *monitor_job" - } - - label { - position 1 +7 - size 32 4 - text "STATUS" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_status" - } - - label { - position -32 +4 - size 32 4 - text "CURRENT INCREMENT (CYCLE)" - border_width 1 - border_color black - } - - display { - position +32 = - size 18 4 - display "job_increment" - } - - label { - position -32 +4 - size 32 4 - text "SINGULARITY RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_singularity_ratio" - } - - label { - position -32 +4 - size 32 4 - text "CONVERGENCE RATIO" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_convergence_ratio" - } - - label { - position 1 +4 - size 32 4 - text "ANALYSIS TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_analysis_time" - } - - label { - position -32 +4 - size 32 4 - text "WALL TIME" - border_width 1 - border_color black - } - - float { - position +32 = - size 18 4 - display "job_time" - } - - frame { - position 1 +4 - size 50 8 - - group { - - frame { - position 0 0 - size 50 8 - text "TOTAL" - border_width 1 - border_color black - group { - - label { - position +6 = - size 13 4 - text "CYCLES" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_cycles" - border_width 1 - border_color black - } - - label { - position -13 +4 - size 13 4 - text "SEPARATIONS" - border_width 1 - border_color black - } - - integer { - position +13 = - size 10 4 - display "acc_job_separations" - border_width 1 - border_color black - } - - label { - position +10 -4 - size 11 4 - text "CUT BACKS" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_cut_backs" - border_width 1 - border_color black - } - - label { - position -11 +4 - size 11 4 - text "REMESHES" - border_width 1 - border_color black - } - - integer { - position +11 = - size 10 4 - display "acc_job_remeshes" - border_width 1 - border_color black - } - } - } - } - } - - label { - position 1 +8 - size 19 4 - text "EXIT NUMBER" - border_width 1 - border_color black - } - - integer { - position +19 = - size 10 4 - display "job_exit" - } - - button { - position +10 = - size 21 4 - text "EXIT MESSAGE" - popmenu job_exit_msg_pm - help exit_message - } - - label { - position 1 +6 - size 7 4 - text "EDIT" - border_width 1 - border_color black - } - - button { - position +7 = - size 12 4 - text "OUTPUT FILE" - command "*job_edit_output" - } - - button { - position +12 = - size 9 4 - text "LOG FILE" - command "*job_edit_log_file" - } - - button { - position +9 = - size 12 4 - text "STATUS FILE" - command "*job_edit_status_file" - } - - button { - position +12 = - size 10 4 - text "ANY FILE" - settext $edit_browser_label "EDIT FILE" - set $edit_browser_command "*edit_file" - browser edit_browser - help edit_file - } - - popdown { - position 1 +6 - size 32 4 - text "OPEN POST FILE (MODEL PLOT RESULTS MENU)" - command "@popdown(job_properties_pm) @main(results) @popup(modelplot_pm) *post_open_default" - } - - button { - position 1 +6 - size 12 8 - text "RESET" - command "*job_submit_reset" - } - - popdown { - position +38 = - size 12 8 - text "OK" - } - } - - window job_run_wi { - parent mentat - origin 35 1 - size 52 115 - background_color body - border_width 1 - border_color border - buffering single - } - - mode permanent -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_usersub_pm { - - text "CURRENTLY SELECTED USER SUBROUTINES" - - group { - - - display { - position 1 +5 - size 64 86 - display "job_usersubs" - } - - popdown { - position 27 +88 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 66 102 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_submit_adv_pm { - - text "ADVANCED JOB SUBMISSION" - - group { - - - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - label { - position 1 9 - size 19 4 - text "INITIAL ALLOCATION" - border_width 1 - border_color black - } - label { - position +19 = - size 15 4 - text "GENERAL MEMORY" - help job_param_general_init_allocation - } - text { - position +15 = - size 10 4 - display "job_param_value_general_init_allocation" - command "*job_param general_init_allocation" - help job_param_general_init_allocation - } - - label { - position +10 = - size 4 4 - text "MB" - border_width 1 - border_color black - } - - toggle { - position 1 +5 - size 32 4 - text "OUT-OF-CORE ELEMENT STORAGE" - help job_param_elsto - toggle "*job_option elsto:on" - true_command "*job_option elsto:on" - false_command "*job_option elsto:off" - } - - toggle { - position 1 +4 - size 32 4 - text "OUT-OF-CORE INCREMENTAL BACKUP" - help job_param_inc_backup_storage - toggle "*job_option inc_backup_storage:out_of_core" - true_command "*job_option inc_backup_storage:out_of_core" - false_command "*job_option inc_backup_storage:in_core" - } - - toggle { - position +34 = - size 14 4 - text "CHECK SIZES" - help job_run_check - toggle "*job_option check:on" - true_command "*job_option check:on" - false_command "*job_option check:off" - } - - label { - position 1 +6 - size 16 4 - text "INTEGER SIZE" - border_width 1 - border_color black - } - - roller { - position +16 = - size 32 4 - nvalues 3 - texts "DEFAULT" - "4-BYTE INTEGERS" - "8-BYTE INTEGERS" - commands "*job_option marc_integer_size:default" - "*job_option marc_integer_size:i4" - "*job_option marc_integer_size:i8" - help job_run_intsize - roller "job_option marc_integer_size" - } - - frame { - position 1 +6 - size 48 12 - text "MARC INPUT FILE" - border_width 1 - border_color black - - group { - - label { - position 0 4 - size 9 4 - text "VERSION" - border_width 1 - border_color black - } - - roller { - position +9 = - size 14 4 - nvalues 21 - nvisible 21 - texts "DEFAULT" -#if 0 - "2015" -#endif - "2014.2" - "2014.1" - "2014" - "2013.1" - "2013" - "2012" - "2011" - "2010.2" - "2010" - "2008" - "2007" - "2005R3" - "2005" - "2003" - "2001" - "2000" -#if 0 - "8" -#endif - "K7" - "K6.2" - "K5" - "K4" - help job_param_version - rollers "job_input_version_default" -#if 0 - "job_input_version_2015" -#endif - "job_input_version_2014.2" - "job_input_version_2014.1" - "job_input_version_2014" - "job_input_version_2013.1" - "job_input_version_2013" - "job_input_version_2012" - "job_input_version_2011" - "job_input_version_2010.2" - "job_input_version_2010" - "job_input_version_2008" - "job_input_version_2007" - "job_input_version_2005r3" - "job_input_version_2005" - "job_input_version_2003" - "job_input_version_2001" - "job_input_version_2000" -#if 0 - "job_input_version_8" -#endif - "job_input_version_k7" - "job_input_version_k6" - "job_input_version_k5" - "job_input_version_k4" - commands "*job_option version:default" -#if 0 - "*job_option version:2015" -#endif - "*job_option version:2014.2" - "*job_option version:2014.1" - "*job_option version:2014" - "*job_option version:2013.1" - "*job_option version:2013" - "*job_option version:2012" - "*job_option version:2011" - "*job_option version:2010.2" - "*job_option version:2010" - "*job_option version:2008" - "*job_option version:2007" - "*job_option version:2005r3" - "*job_option version:2005" - "*job_option version:2003" - "*job_option version:2001" - "*job_option version:2000" -#if 0 - "*job_option version:8" -#endif - "*job_option version:k7" - "*job_option version:k6" - "*job_option version:k5" - "*job_option version:k4" - visibles "job_allows_input_version_default" -#if 0 - "job_allows_input_version_2015" -#endif - "job_allows_input_version_2014.2" - "job_allows_input_version_2014.1" - "job_allows_input_version_2014" - "job_allows_input_version_2013.1" - "job_allows_input_version_2013" - "job_allows_input_version_2012" - "job_allows_input_version_2011" - "job_allows_input_version_2010.2" - "job_allows_input_version_2010" - "job_allows_input_version_2008" - "job_allows_input_version_2007" - "job_allows_input_version_2005r3" - "job_allows_input_version_2005" - "job_allows_input_version_2003" - "job_allows_input_version_2001" - "job_allows_input_version_2000" -#if 0 - "job_allows_input_version_8" -#endif - "job_allows_input_version_k7" - "job_allows_input_version_k6" - "job_allows_input_version_k5" - "job_allows_input_version_k4" - } - -# see also job_common.ms -# see also the RUN JOB popmenu in this file - - label { - position +14 = - size 7 4 - text "STYLE" - border_width 1 - border_color black - } - - roller { - position +7 = - size 18 4 - nvalues 3 - texts "TABLE-DRIVEN" - "MULTI-PHYSICS" - "OLD" - rollers "job_input_style_table_driven" - "job_input_style_multi_physics" - "job_input_style_old" - commands "*job_option input_style:new *job_option input_physics_style:old" - "*job_option input_physics_style:new *job_option input_style:new" - "*job_option input_style:old *job_option input_physics_style:old" - visibles "job_allows_input_style_table_driven" - "job_allows_input_style_multi_physics" - "job_allows_input_style_old" - help job_option_input_style - } - - toggle { - position 0 +4 - size 48 4 - text "EXTENDED PRECISION" - help job_run_precision - toggle "*job_option inp_file_prec:extended" - true_command "*job_option inp_file_prec:extended" - false_command "*job_option inp_file_prec:normal" - } - } - } - - button { - position 1 +14 - size 24 4 - text "SCRATCH DIRECTORY" - settext $directory_browser_label "JOB SCRATCH DIRECTORY" - set $directory_browser_command "*job_scratch_directory" - browser directory_browser - help job_scratch_directory - } - - button { - position +24 = - size 24 4 - text "CLEAR" - command "*job_clear_scratch_directory" - visible job_scratch_directory - } - - text { - position 1 +4 - size 48 4 - display job_scratch_dir - command "*job_scratch_directory" - } - -#ifdef DCOM - toggle { - position 1 +6 - size 8 4 - text "\{DCOM}" - toggle "*job_option dcom:on" - help job_run_dcom - true_command "*job_option dcom:on" - false_command "*job_option dcom:off" - visible win32_available - } - - button { - position +8 = - size 12 4 - text "HOSTNAME" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } - - text job_dcom_hostname { - position +12 = - size 28 4 - display "job_dcom_hostname" - command "*job_dcom_hostname" - visible "and(win32_available, *job_option dcom:on)" - } -#endif - - button { - position 1 +6 - size 24 4 - text "TITLE" - popmenu job_title_pm - command "*job_title" - } - - button { - position +24 = - size 24 4 - text "SAVE MODEL" - command "*save_model" - } - - button { - position +4 +6 - size 20 4 - text "WRITE INPUT FILE" - command "*job_write_input" - } - - button { - position = +4 - size 20 4 - text "EDIT INPUT FILE" - command "*job_edit_input" - } - - popdown { - position 1 +5 - size 20 6 - text "SUBMIT 1" - command "*submit_job 1 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 1" - command "*execute_job 1 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 2" - command "*submit_job 2 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 2" - command "*execute_job 2 *monitor_job" - } - - popdown { - position -28 +6 - size 20 6 - text "SUBMIT 3" - command "*submit_job 3 *monitor_job" - } - - popdown { - position +28 = - size 20 6 - text "EXECUTE 3" - command "*execute_job 3 *monitor_job" - } - - popdown { - position 19 +8 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 -#ifdef DCOM - size 50 100 -#else - size 50 94 -#endif - background_color body - border_width 1 - border_color border - buffering single - } - - mode permanent -} - - -#-------------------------------------------------------------------------------------------------- -popmenu job_exit_msg_pm { - - text "EXIT MESSAGE" - - group { - - - - text { - position 1 5 - size 84 74 - multiline - readonly - display "job_exit_msg" - } - - popdown { - position 37 +76 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 8 - size 86 90 - background_color body - border_width 1 - border_color border - buffering single - } - - mode dialog -} - - - - -#-------------------------------------------------------------------------------------------------- -popmenu job_run_parallelization_pm { - - text "PARALLELIZATION/\{GPU}" - - group { - - - label { - position 0 0 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - frame { - position 1 9 - size 48 28 - group job_ddm_gr - text "DOMAIN DECOMPOSITION" - border_width 1 - border_color black - } - - frame { - position 1 +29 - size 36 13 - group job_assem_recov_gr - text "ASSEMBLY AND RECOVERY" - border_width 1 - border_color black - } - - frame { - position 1 +14 - size 58 31 - group job_parallel_matrix_solver_gr - text "MATRIX SOLVER" - border_width 1 - border_color black - } - - frame { - position 1 +32 - size 48 28 - group job_parallel_env_gr - text "PARALLELIZATION ENVIRONMENT" - border_width 1 - border_color black - visible "or(*job_option parallel:on, \ - solver_multi_procs)" - } - - popdown { - position 24 +30 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 38 1 - size 60 119 - background_color body - border_width 1 - border_color border - buffering single - } - mode permanent -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_gr { - - toggle { - position 1 4 - size 30 4 - text "USE \{DDM}" - toggle "*job_option parallel:on" - help job_run_ddm_use - true_command "*job_option parallel:on" - false_command "*job_option parallel:off" - active "not(job_solver_it_ext)" - } - - frame { - position +2 +5 - size 44 18 - group job_ddm_use_gr - visible "*job_option parallel:on" - } -} - -group job_ddm_use_gr { - roller { - position 0 0 - size 30 4 - nvalues 2 - texts "DECOMPOSITION IN MARC" - "DECOMPOSITION IN MENTAT" - roller "job_option ddm_generator" - commands "*job_option ddm_generator:fea_solver" - "*job_option ddm_generator:preprocessor" - help job_run_ddm_generator - } - - frame { - position 0 +5 - size 44 8 - group job_ddm_fea_solver_gr - visible "*job_option ddm_generator:fea_solver" - } - - frame { - position = = - size 44 8 - group job_ddm_preprocessor_gr - visible "*job_option ddm_generator:preprocessor" - } - - text { - position 0 +9 - size 22 4 - text "Single Input File" - readonly - visible "*job_option ddm_generator:fea_solver" - } - - roller { - position = = - size 22 4 - nvalues 2 - texts "MULTIPLE INPUT FILES" - "SINGLE INPUT FILE" - roller "job_option ddm_single_input" - commands "*job_option ddm_single_input:off" - "*job_option ddm_single_input:on" - visible "*job_option ddm_generator:preprocessor" - help job_run_ddm_single_input - } - - roller { - position +23 = - size 21 4 - nvalues 2 - texts "MULTIPLE POST FILES" - "SINGLE POST FILE" - roller "job_option ddm_single_post" - commands "*job_option ddm_single_post:off" - "*job_option ddm_single_post:on" - help job_run_ddm_single_post - } -} - - - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_fea_solver_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - help job_param - } - - text { - position +10 = - size 4 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position +4 = - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - } - - button { - position +4 +4 - size 19 4 - text "ADVANCED SETTINGS" - popmenu job_ddm_fea_solver_pm - } -} - - - - -#-------------------------------------------------------------------------------------------------- -popmenu job_ddm_fea_solver_pm { - - text "JOB PARALLELIZATION" - - group { - units 32 120 - - - label { - position 0 5 - size 6 4 - text "NAME" - } - - display { - position +6 = - size 26 4 - display "job_name" - } - - label { - position 0 +4 - size 6 4 - text "TYPE" - } - - display { - position +6 = - size 26 4 - display job_class_label - } - - frame { - - position 0 +9 - size 32 76 - text "ADVANCED DECOMPOSITION IN MARC" - border_width 1 - border_color black - - group { - - label { - position 1 4 - size 16 4 - text "# DOMAINS" - help job_param - } - - text { - position +16 = - size 14 4 - display "job_param_value_ndomains" - command "*job_param ndomains" - } - - label { - position 1 +4 - size 7 4 - text "METHOD" - border_width 1 - border_color black - } - - roller { - position +7 = - size 23 4 - nvalues 7 - texts "METIS BEST" - "METIS ELEMENT" - "METIS NODE" - "REC. COORD. BISECTION" - "VECTOR" - "RADIAL" - "ANGULAR" - help set_job_decomp_type - rollers "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - commands "*job_option ddm_method:metis_best" - "*job_option ddm_method:metis_element_based" - "*job_option ddm_method:metis_node_based" - "*job_option ddm_method:recur_coord_bisect" - "*job_option ddm_method:vector" - "*job_option ddm_method:radial" - "*job_option ddm_method:angular" - } - - frame { - position 1 +5 - size 30 20 - group job_ddm_direction_gr - visible "or(*job_option ddm_method:vector, \ - *job_option ddm_method:radial, \ - *job_option ddm_method:angular)" - } - - toggle { - position 1 +21 - size 30 4 - text "DOMAIN ISLAND REMOVAL" - toggle "*job_option ddm_island_removal:on" - true_command "*job_option ddm_island_removal:on" - false_command "*job_option ddm_island_removal:off" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "GRAPH" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "COARSE" - "FINE" - help ddm_decomp_coarse_graph - rollers "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - commands "*job_option ddm_graph:coarse" - "*job_option ddm_graph:fine" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - } - - label { - position 1 +4 - size 15 4 - border_width 1 - border_color black - text "QUADRATIC ELEMENTS" - } - - roller { - position +15 = - size 15 4 - nvalues 2 - texts "GENUINE" - "LINEARIZED" - help job_run_ddm_decomp_linearized - rollers "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - commands "*job_option ddm_quadr_elems:genuine" - "*job_option ddm_quadr_elems:linearized" - } - - label { - position 1 +5 - size 15 4 - text "ELEMENT WEIGHT FACTOR" - help job_param - } - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_elem_weight_factor" - command "*job_param ddm_elem_weight_factor" - help job_run_ddm_decomp_element_weight_factor - } - - toggle { - position 1 +5 - size 30 4 - text "DETECT CONTACT" - toggle "*job_option ddm_detect_contact:on" - true_command "*job_option ddm_detect_contact:on" - false_command "*job_option ddm_detect_contact:off" - visible "or(*job_option ddm_method:metis_best, \ - *job_option ddm_method:metis_element_based, \ - *job_option ddm_method:metis_node_based)" - help job_run_ddm_decomp_detect_contact - } - - label { - position = +5 - size 15 4 - text "CONTACT TOLERANCE" - visible "*job_option ddm_detect_contact:on" - } - - text { - position +15 = - size 15 4 - command "*set_ddm_contact_tolerance" - display "job_param_value_ddm_contact_tolerance" - command "*job_param ddm_contact_tolerance" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_tolerance - } - - label { - position -15 +4 - size 15 4 - text "CONTACT CONSTR FACTOR" - visible "*job_option ddm_detect_contact:on" - } - - text { - position +15 = - size 15 4 - display "job_param_value_ddm_contact_constr_factor" - command "*job_param ddm_contact_constr_factor" - visible "*job_option ddm_detect_contact:on" - help job_run_ddm_decomp_contact_constraint_factor - } - } - } - - popdown { - position 0 +77 - size 32 8 - text "OK" - } - } - mode permanent -} # job_ddm_fea_solver_pm - - - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_direction_gr { - - button { - position 0 0 - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "*job_option ddm_method:vector" - } - - button { - position = = - size 15 4 - text "DIRECTION" - command "*job_vector ddm_sort_direction_x" - visible "not(*job_option ddm_method:vector)" - } - - button { - position +15 = - size 15 4 - text "FROM / TO" - command "*job_vector_from_to ddm_sort_direction_x" - } - - text { - position -15 +4 - size 10 4 - command "*job_param ddm_sort_direction_x" - display "job_param_value_ddm_sort_direction_x" - help ddm_job_decomp_user_direction_x - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_y" - display "job_param_value_ddm_sort_direction_y" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_direction_z" - display "job_param_value_ddm_sort_direction_z" - } - - frame { - position 0 +4 - size 30 8 - group job_ddm_sort_point_gr - visible "not(*job_option ddm_method:vector)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_sort_point_gr { - - label { - position 0 0 - size 14 4 - border_width 1 - border_color black - text "POINT ON AXIS" - } - - roller { - position +14 = - size 10 4 - nvalues 2 - texts "DEFAULT" - "USER" - roller "job_option ddm_sort_point" - commands "*job_option ddm_sort_point:default" - "*job_option ddm_sort_point:user" - } - - button { - position +10 = - size 6 4 - text "SET" - command "*job_position ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position 0 +4 - size 10 4 - command "*job_param ddm_sort_point_x" - display "job_param_value_ddm_sort_point_x" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_y" - display "job_param_value_ddm_sort_point_y" - visible "*job_option ddm_sort_point:user" - } - - text { - position +10 = - size 10 4 - command "*job_param ddm_sort_point_z" - display "job_param_value_ddm_sort_point_z" - visible "*job_option ddm_sort_point:user" - } -} - - - - -#-------------------------------------------------------------------------------------------------- -group job_ddm_preprocessor_gr { - - label { - position 0 0 - size 10 4 - text "# DOMAINS" - border_width 1 - border_color black - } - - integer { - position +10 = - size 4 4 - display valid_domains - } - - button { - position +4 = - size 30 4 - text "USER DOMAINS" - popmenu domains_pm - help job_run_ddm_user_domains - } -} - - - - -#-------------------------------------------------------------------------------------------------- -group job_assem_recov_gr { - - toggle { - position 1 +4 - size 30 4 - text "MULTIPLE THREADS" - true_command "*job_option assem_recov_multi_threading:on" - false_command "*job_option assem_recov_multi_threading:off" - toggle "*job_option assem_recov_multi_threading:on" - } - - label { - position +2 +4 - size 12 4 - text "# THREADS" - visible "*job_option assem_recov_multi_threading:on" - } - - text { - position +12 = - size 4 4 - display "job_param_value_assem_recov_nthreads" - command "*job_param assem_recov_nthreads" - visible "*job_option assem_recov_multi_threading:on" - } - - label { - position +4 = - size 12 4 - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 = - size 4 4 - display "job_assem_recov_nthreads_dom" - visible "and(*job_option assem_recov_multi_threading:on, \ - *job_option parallel:on)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_matrix_solver_gr { - - label { - position 3 4 - size 12 4 - text "SOLUTION" - border_width 1 - border_color black - } - - roller { - position +12 = - size 18 4 - nvalues 2 - texts "SYMMETRIC" - "NONSYMMETRIC" - rollers job_nonsym_off - job_nonsym_on - commands "*job_option solver_nonsym:off" - "*job_option solver_nonsym:on" - help job_param_solver_method - } - - label { - position -12 +4 - size 6 4 - text "TYPE" - border_width 1 - border_color black - } - - roller { - position +6 = - size 24 4 - nvalues 9 - help job_param_solver_method - texts "MULTIFRONTAL SPARSE" - "MIXED DIRECT-ITERATIVE" - "CASI ITERATIVE" - "PARDISO DIRECT SPARSE" - "MUMPS PARALLEL DIRECT" - "HARDWARE SPARSE" - "ITERATIVE SPARSE" - "DIRECT PROFILE" - "DIRECT SPARSE" - rollers job_solver_mfront_sparse - job_solver_mixed_direct_iterative - job_solver_it_ext - job_solver_pardiso - job_solver_mumps - job_solver_sparse - job_solver_it_sparse - job_solver_dir_profile - job_solver_dir_sparse - commands "*job_option solver:mfront_sparse" - "*job_option solver:mixed_direct_iterative" - "*job_option solver:it_ext" - "*job_option solver:pardiso" - "*job_option solver:mumps" - "*job_option solver:sparse" - "*job_option solver:it_sparse" - "*job_option solver:dir_profile" - "*job_option solver:dir_sparse" - visibles job_allows_solver_mfront_sparse - job_allows_solver_mixed_direct_iterative - job_allows_solver_it_ext - job_allows_solver_pardiso - job_allows_solver_mumps - job_allows_solver_sparse - job_allows_solver_it_sparse - job_allows_solver_dir_profile - job_allows_solver_dir_sparse - help job_param_solver_method - } - - button { - position +24 = - size 10 4 - text "OPTIONS" - popmenu job_parallel_matrix_solver_opt_pm - } - - frame { - position +10 = - size 14 4 - group job_run_solver_ddm_opts_gr - visible "*job_option parallel:on" - } - - frame { - position 1 +5 - size 46 8 - group job_solver_multi_procs_gr - visible solver_allows_multi_procs - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_gr - visible solver_allows_multi_threads - } - - frame { - position 1 +9 - size 46 8 - group job_solver_gpu_gr - visible "and(job_solver_mfront_sparse,job_nonsym_off)" - } -} - - - - -#-------------------------------------------------------------------------------------------------- -popmenu job_parallel_matrix_solver_opt_pm { - - text "MATRIX SOLVER OPTIONS" - - group { - - - frame { - position 1 5 - size 36 23 - group job_solver_opts_gr - } - - popdown { - position 13 +25 - size 12 8 - text "OK" - } - } - - window { - parent mentat - origin 41 12 - size 38 39 - border_width 1 - border_color border - background_color body - } - mode dialog -} - - -#-------------------------------------------------------------------------------------------------- -group job_run_solver_ddm_opts_gr { - - button { - position 0 0 - size 14 4 - text "\{DDM} OPTIONS" - popmenu ddm_options -# see also job_common.ms! - visible "not(or(job_solver_it_sparse, \ - job_solver_it_ext, \ - job_solver_mixed_direct_iterative, \ - job_solver_pardiso, \ - job_solver_mumps))" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_procs_parallel_off_gr - visible "*job_option parallel:off" - } - - frame { - position = = - size 46 8 - group job_solver_multi_procs_parallel_on_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - true_command "*job_option nsolver_procs_serial:on" - false_command "*job_option nsolver_procs_serial:off" - toggle "*job_option nsolver_procs_serial:on" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - visible "*job_option nsolver_procs_serial:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - visible "*job_option nsolver_procs_serial:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_procs_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE SOLVER PROCESSES" - help job_run_multithreading - toggle true - set $dummy dummy - } - - label { - position +2 +4 - size 14 4 - text "# PROCESSES" - border_width 1 - border_color black - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - help job_run_multithreading - rollers "*job_option nsolver_procs_ddm:automatic" - "*job_option nsolver_procs_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_nsolver_procs_ddm_automatic_gr - visible "*job_option nsolver_procs_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_nsolver_procs_ddm_user_gr - visible "*job_option nsolver_procs_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_nsolver_procs_ddm_user_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } - - text { - position +8 = - size 8 4 - display "job_param_value_nsolver_procs" - command "*job_param nsolver_procs" - } -} - -group job_solver_multi_threads_gr { - frame { - position 0 0 - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_off_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_mfront_sparse_parallel_on_gr - visible "and(job_solver_mfront_sparse,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_off_gr - visible "and(job_solver_pardiso,*job_option parallel:off)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_pardiso_parallel_on_gr - visible "and(job_solver_pardiso,*job_option parallel:on)" - } - - frame { - position = = - size 46 8 - group job_solver_multi_threads_it_ext_off_gr - visible "and(job_solver_it_ext,*job_option parallel:off)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option mfront_sparse_multi_threading:on" - true_command "*job_option mfront_sparse_multi_threading:on" - false_command "*job_option mfront_sparse_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option mfront_sparse_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option mfront_sparse_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_mfront_sparse_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true - set $dummy dummy - } - - label { - position +30 0 - size 12 4 - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - text "PER DOMAIN" - border_width 1 - border_color black - } - - display { - position +12 0 - size 4 4 - display "job_mfront_sparse_nthreads_dom" - visible "and( not(*job_option ddm_precond:direct)\ - *job_option parallel:on)" - } - - label { - position 2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option mfront_sparse_multi_threading_ddm:automatic" - "*job_option mfront_sparse_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_automatic_gr - visible "*job_option mfront_sparse_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_mfront_sparse_multi_threads_ddm_user_gr - visible "*job_option mfront_sparse_multi_threading_ddm:user" - } -} -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_mfront_sparse_multi_threads_ddm_user_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - } - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - - - -#-------------------------------------------------------------------------------------------------- -group job_solver_gpu_gr { - - toggle { - position 0 0 - size 30 4 - text "USE \{GPU(s)}" - toggle "*job_option solver_use_gpu:on" - true_command "*job_option solver_use_gpu:on" - false_command "*job_option solver_use_gpu:off" - help job_solver_gpu - } - - label { - position +2 +4 - size 16 4 - text "\{GPU} SELECTION" - border_width 1 - border_color black - visible "*job_option solver_use_gpu:on" - } - - roller { - position +16 = - size 12 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - rollers "*job_option solver_gpus:automatic" - "*job_option solver_gpus:user" - visible "*job_option solver_use_gpu:on" - help job_solver_gpu - } - - text { - position +12 = - size 16 4 - display job_solver_gpus - command "*clear_job_solver_gpus *job_solver_gpus" - visible "and(*job_option solver_use_gpu:on,*job_option solver_gpus:user)" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option pardiso_multi_threading:on" - true_command "*job_option pardiso_multi_threading:on" - false_command "*job_option pardiso_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option pardiso_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option pardiso_multi_threading:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_pardiso_parallel_on_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - help job_run_multithreading - toggle true - set $dummy dummy - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - border_color black - border_width 1 - } - - roller { - position +14 = - size 14 4 - nvalues 2 - texts "AUTOMATIC" - "USER" - commands "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - help job_run_multithreading - rollers "*job_option pardiso_multi_threading_ddm:automatic" - "*job_option pardiso_multi_threading_ddm:user" - } - - frame { - position +14 = - size 16 4 - group job_pardiso_multi_threads_ddm_automatic_gr - visible "*job_option pardiso_multi_threading_ddm:automatic" - } - - frame { - position = = - size 16 4 - group job_pardiso_multi_threads_ddm_user_gr - visible "*job_option pardiso_multi_threading_ddm:user" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_automatic_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - border_width 1 - border_color black - } - - integer { - position +8 = - size 8 4 - display valid_domains - visible "*job_option ddm_generator:preprocessor" - } - - integer { - position = = - size 8 4 - display "job_param_ndomains" - visible "*job_option ddm_generator:fea_solver" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_pardiso_multi_threads_ddm_user_gr { - - label { - position 0 0 - size 8 4 - text "VALUE" - help job_param - } - - text { - position +8 = - size 8 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_solver_multi_threads_it_ext_off_gr { - - toggle { - position 0 0 - size 30 4 - text "MULTIPLE THREADS" - toggle "*job_option it_ext_multi_threading:on" - true_command "*job_option it_ext_multi_threading:on" - false_command "*job_option it_ext_multi_threading:off" - help job_run_multithreading - } - - label { - position +2 +4 - size 14 4 - text "# THREADS" - visible "*job_option it_ext_multi_threading:on" - help job_param - } - - text { - position +14 = - size 14 4 - display "job_param_value_nthreads" - command "*job_param nthreads" - visible "*job_option it_ext_multi_threading:on" - } -} - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_gr { - - roller { - position 1 4 - size 30 4 - nvalues 2 - texts "SINGLE MACHINE" - "NETWORK" - help job_run_ddm_setup - roller "job_option parallel_setup" - commands "*job_option parallel_setup:single" - "*job_option parallel_setup:network" - } - - frame { - position +2 +5 - size 44 18 - group job_parallel_env_network_gr - visible "*job_option parallel_setup:network" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_gr { - - button { - position 0 0 - size 28 4 - text "HOST FILE" - browser host_file_browser - settext $host_file_browser_label "SELECT HOST FILE" - set $host_file_browser_command "*job_host_file" - help job_host_file - } - - button { - position +28 = - size 8 4 - text "EDIT" - command "*job_edit_host_file" - help job_edit_host_file - visible job_host_file - } - - button { - position +8 = - size 8 4 - text "CLEAR" - command "*job_clear_host_file" - help job_clear_host_file - visible job_host_file - } - - display { - position 0 +4 - size 44 4 - display job_host_file - } - - frame { - position 0 +5 - size 44 9 - group job_parallel_env_network_ddm_gr - visible "*job_option parallel:on" - } -} - - -#-------------------------------------------------------------------------------------------------- -group job_parallel_env_network_ddm_gr { - - toggle { - position 0 0 - size 22 4 - text "COPY INPUT FILE" - toggle "*job_option copy_input_file:on" - true_command "*job_option copy_input_file:on" - false_command "*job_option copy_input_file:off" - help job_host_copy_inputfile - } - - toggle { - position +23 = - size 21 4 - text "COPY POST FILE" - toggle "*job_option copy_post_file:on" - true_command "*job_option copy_post_file:on" - false_command "*job_option copy_post_file:off" - help job_host_copy_inputfile - } - - label { - position 0 +5 - size 10 4 - text "HOSTS" - border_width 1 - border_color black - visible job_usersub_file - } - - roller { - position +10 = - size 18 4 - nvalues 2 - texts "COMPATIBLE" - "INCOMPATIBLE" - roller "job_option network_hosts" - commands "*job_option network_hosts:compatible" - "*job_option network_hosts:incompatible" - help job_host_comp - visible job_usersub_file - } -} - - -#endif From 8eeec5c0f1a6c164a93c066a898520dfecfc3e76 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 12:05:14 +0200 Subject: [PATCH 33/54] also Abaqus works with openMP now/again? --- installation/mods_Abaqus/abaqus_v6.env | 4 ++-- installation/mods_Abaqus/abaqus_v6_debug.env | 1 - src/numerics.f90 | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/installation/mods_Abaqus/abaqus_v6.env b/installation/mods_Abaqus/abaqus_v6.env index fb243e987..d09257a9d 100644 --- a/installation/mods_Abaqus/abaqus_v6.env +++ b/installation/mods_Abaqus/abaqus_v6.env @@ -19,7 +19,7 @@ fortCmd = "ifort" # -free to use free-format FORTRAN 90 syntax # -O <0-3> optimization level # -fpp use FORTRAN preprocessor on source code -# -openmp build with openMP support +# -fopenmp build with openMP support # -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) # -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) # -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) @@ -32,7 +32,7 @@ fortCmd = "ifort" # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + - "-I%I -free -O3 -fpp " + + "-I%I -free -O3 -fpp -fopenmp " + "-ftz -diag-disable 5268 " + "-implicitnone -standard-semantics " + "-assume nostd_mod_proc_name " + diff --git a/installation/mods_Abaqus/abaqus_v6_debug.env b/installation/mods_Abaqus/abaqus_v6_debug.env index 2b112f29a..51bb9505d 100644 --- a/installation/mods_Abaqus/abaqus_v6_debug.env +++ b/installation/mods_Abaqus/abaqus_v6_debug.env @@ -19,7 +19,6 @@ fortCmd = "ifort" # -free to use free-format FORTRAN 90 syntax # -O <0-3> optimization level # -fpp use FORTRAN preprocessor on source code -# -openmp build with openMP support # -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) # -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) # -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) diff --git a/src/numerics.f90 b/src/numerics.f90 index 27b04cd67..8de664248 100644 --- a/src/numerics.f90 +++ b/src/numerics.f90 @@ -217,12 +217,12 @@ subroutine numerics_init #include use petscsys #endif -#if defined(Spectral) || defined(FEM) -!$ use OMP_LIB, only: omp_set_num_threads ! Use the standard conforming module file for omp if using the spectral solver +#if !defined(Marc4DAMASK) +!$ use OMP_LIB, only: omp_set_num_threads ! Standard conforming module implicit none #else implicit none -!$ include "omp_lib.h" ! use the not F90 standard conforming include file to prevent crashes with some versions of MSC.Marc +!$ include "omp_lib.h" ! MSC.Marc includes this file on !its own, avoid conflict with the OMP_LIB module #endif integer(pInt), parameter :: FILEUNIT = 300_pInt !$ integer :: gotDAMASK_NUM_THREADS = 1 From 57c0fc091b98f2707e4c72b142a520661b6412a3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 13:16:00 +0200 Subject: [PATCH 34/54] Abaqus with debug options does not work, seems to be related to a bug in Intel 16.0 --- installation/mods_Abaqus/abaqus_v6_debug.env | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installation/mods_Abaqus/abaqus_v6_debug.env b/installation/mods_Abaqus/abaqus_v6_debug.env index 51bb9505d..76d90b7f7 100644 --- a/installation/mods_Abaqus/abaqus_v6_debug.env +++ b/installation/mods_Abaqus/abaqus_v6_debug.env @@ -19,6 +19,7 @@ fortCmd = "ifort" # -free to use free-format FORTRAN 90 syntax # -O <0-3> optimization level # -fpp use FORTRAN preprocessor on source code +# -fopenmp build with openMP support # -w90 -w95 suppress messages about use of non-standard Fortran (previous version of abaqus_v6.env only) # -WB turn a compile-time bounds check into a warning (previous version of abaqus_v6.env only) # -mP2OPT_hpo_vec_divbyzero=F inofficial compiler switch, proposed by abaqus but highly dubios (previous version of abaqus_v6.env only) @@ -30,6 +31,7 @@ fortCmd = "ifort" # -real-size 64 -DFLOAT=8 assume size of real to be 8 bytes, matches our definition of pReal # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt +#-fopenmp crashes in config.f90 since presence of default string is not recognized# compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + "-I%I -free -O0 -fpp " + "-ftz -diag-disable 5268 " + From 485fbb3f0702f70c0b5a173123d554bfdcb3a6f3 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 13:17:25 +0200 Subject: [PATCH 35/54] updated tests --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index e6ce7728e..9168c6ef9 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit e6ce7728e38b89cc5b78b4a463346333b01ffb24 +Subproject commit 9168c6ef9b48e374ef1b59a19a5f66ab754bc783 From b1a7eca528eaa4bdf24d46a91eade164ba0d54c0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 19:32:31 +0200 Subject: [PATCH 36/54] array access out of bounds --- src/DAMASK_abaqus_exp.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DAMASK_abaqus_exp.f b/src/DAMASK_abaqus_exp.f index cfd02cbed..147754553 100644 --- a/src/DAMASK_abaqus_exp.f +++ b/src/DAMASK_abaqus_exp.f @@ -256,7 +256,7 @@ subroutine vumat(nBlock, nDir, nshr, nStateV, nFieldV, nProps, lAnneal, & endif cp_en = mesh_FEasCP('elem',nBlock(4_pInt+n)) - mesh_ipCoordinates(1:3,n,cp_en) = mesh_unitlength * coordMp(n,1:3) + mesh_ipCoordinates(1:3,nblock(2),cp_en) = mesh_unitlength * coordMp(n,1:3) call CPFEM_general(computationMode,.false.,defgrd0,defgrd1,temp,timeInc,cp_en,nBlock(2),stress,ddsdde) From bebcd534456c8c52324ba6a7c8274a0c8c026043 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 3 Jul 2018 15:26:11 -0400 Subject: [PATCH 37/54] more commenting, clearer variable naming, stress_mask as param --- src/spectral_mech_Basic.f90 | 45 ++++++++++++++++-------------- src/spectral_mech_Polarisation.f90 | 35 ++++++++++++----------- src/spectral_utilities.f90 | 5 ++-- 3 files changed, 45 insertions(+), 40 deletions(-) diff --git a/src/spectral_mech_Basic.f90 b/src/spectral_mech_Basic.f90 index b2b5e8173..9911eef21 100644 --- a/src/spectral_mech_Basic.f90 +++ b/src/spectral_mech_Basic.f90 @@ -62,8 +62,6 @@ module spectral_mech_basic integer(pInt), private :: & totalIter = 0_pInt !< total iteration in current increment - real(pReal), private, dimension(3,3) :: mask_stress = 0.0_pReal - public :: & basic_init, & basic_solution, & @@ -234,12 +232,12 @@ type(tSolutionState) function basic_solution(incInfoIn,timeinc,timeinc_old,stres !-------------------------------------------------------------------------------------------------- ! input data for solution - character(len=*), intent(in) :: & + character(len=*), intent(in) :: & incInfoIn - real(pReal), intent(in) :: & + real(pReal), intent(in) :: & timeinc, & !< increment time for current solution timeinc_old !< increment time of last successful increment - type(tBoundaryCondition), intent(in) :: & + type(tBoundaryCondition), intent(in) :: & stress_BC real(pReal), dimension(3,3), intent(in) :: rotation_BC @@ -261,7 +259,7 @@ type(tSolutionState) function basic_solution(incInfoIn,timeinc,timeinc_old,stres !-------------------------------------------------------------------------------------------------- ! set module wide availabe data - mask_stress = stress_BC%maskFloat + params%stress_mask = stress_BC%maskFloat params%stress_BC = stress_BC%values params%rotation_BC = rotation_BC params%timeinc = timeinc @@ -287,7 +285,11 @@ end function basic_solution !-------------------------------------------------------------------------------------------------- !> @brief forms the basic residual vector !-------------------------------------------------------------------------------------------------- -subroutine Basic_formResidual(in,x_scal,f_scal,dummy,ierr) +subroutine Basic_formResidual(in, & ! DMDA info (needs to be named "in" for XRANGE, etc. macros to work) + F, & ! defgrad field on grid + residuum, & ! residuum field on grid + dummy, & + ierr) use numerics, only: & itmax, & itmin @@ -316,9 +318,9 @@ subroutine Basic_formResidual(in,x_scal,f_scal,dummy,ierr) implicit none DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: in PetscScalar, & - dimension(3,3, XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: x_scal !< what is this? + dimension(3,3, XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: F PetscScalar, & - dimension(3,3, X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: f_scal !< what is this? + dimension(3,3, X_RANGE,Y_RANGE,Z_RANGE), intent(out) :: residuum PetscInt :: & PETScIter, & nfuncs @@ -347,28 +349,29 @@ subroutine Basic_formResidual(in,x_scal,f_scal,dummy,ierr) !-------------------------------------------------------------------------------------------------- ! evaluate constitutive response - call Utilities_constitutiveResponse(f_scal,P_av,C_volAvg,C_minMaxAvg, & - x_scal,params%timeinc, params%rotation_BC) + call Utilities_constitutiveResponse(residuum, & ! "residuum" gets field of first PK stress (to save memory) + P_av,C_volAvg,C_minMaxAvg, & + F,params%timeinc,params%rotation_BC) call MPI_Allreduce(MPI_IN_PLACE,terminallyIll,1,MPI_LOGICAL,MPI_LOR,PETSC_COMM_WORLD,ierr) !-------------------------------------------------------------------------------------------------- ! stress BC handling deltaF_aim = math_mul3333xx33(S, P_av - params%stress_BC) F_aim = F_aim - deltaF_aim - err_BC = maxval(abs(mask_stress * (P_av - params%stress_BC))) ! mask = 0.0 when no stress bc + err_BC = maxval(abs(params%stress_mask * (P_av - params%stress_BC))) ! mask = 0.0 when no stress bc !-------------------------------------------------------------------------------------------------- ! updated deformation gradient using fix point algorithm of basic scheme tensorField_real = 0.0_pReal - tensorField_real(1:3,1:3,1:grid(1),1:grid(2),1:grid3) = f_scal + tensorField_real(1:3,1:3,1:grid(1),1:grid(2),1:grid3) = residuum ! store fPK field for subsequent FFT forward transform call utilities_FFTtensorForward() ! FFT forward of global "tensorField_real" - err_div = Utilities_divergenceRMS() ! divRMS of tensorField_fourier + err_div = Utilities_divergenceRMS() ! divRMS of tensorField_fourier for later use call utilities_fourierGammaConvolution(math_rotate_backward33(deltaF_aim,params%rotation_BC)) ! convolution of Gamma and tensorField_fourier, with arg call utilities_FFTtensorBackward() ! FFT backward of global tensorField_fourier !-------------------------------------------------------------------------------------------------- ! constructing residual - f_scal = tensorField_real(1:3,1:3,1:grid(1),1:grid(2),1:grid3) ! Gamma*P gives correction towards div(P) = 0, so needs to be zero, too + residuum = tensorField_real(1:3,1:3,1:grid(1),1:grid(2),1:grid3) ! Gamma*P gives correction towards div(P) = 0, so needs to be zero, too end subroutine Basic_formResidual @@ -391,9 +394,9 @@ subroutine Basic_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason,dummy,i SNES :: snes_local PetscInt :: PETScIter PetscReal :: & - xnorm, & - snorm, & - fnorm + xnorm, & ! not used + snorm, & ! not used + fnorm ! not used SNESConvergedReason :: reason PetscObject :: dummy PetscErrorCode :: ierr @@ -457,16 +460,16 @@ subroutine Basic_forward(guess,timeinc,timeinc_old,loadCaseTime,deformation_BC,s restartWrite implicit none - logical, intent(in) :: & + logical, intent(in) :: & guess - real(pReal), intent(in) :: & + real(pReal), intent(in) :: & timeinc_old, & timeinc, & loadCaseTime !< remaining time of current load case type(tBoundaryCondition), intent(in) :: & stress_BC, & deformation_BC - real(pReal), dimension(3,3), intent(in) ::& + real(pReal), dimension(3,3), intent(in) :: & rotation_BC PetscErrorCode :: ierr PetscScalar, dimension(:,:,:,:), pointer :: F diff --git a/src/spectral_mech_Polarisation.f90 b/src/spectral_mech_Polarisation.f90 index 9e567f0c9..9518452fa 100644 --- a/src/spectral_mech_Polarisation.f90 +++ b/src/spectral_mech_Polarisation.f90 @@ -27,7 +27,6 @@ module spectral_mech_Polarisation !-------------------------------------------------------------------------------------------------- ! derived types type(tSolutionParams), private :: params - real(pReal), private, dimension(3,3) :: mask_stress = 0.0_pReal !-------------------------------------------------------------------------------------------------- ! PETSc data @@ -289,7 +288,7 @@ type(tSolutionState) function Polarisation_solution(incInfoIn,timeinc,timeinc_ol !-------------------------------------------------------------------------------------------------- ! set module wide availabe data - mask_stress = stress_BC%maskFloat + params%stress_mask = stress_BC%maskFloat params%stress_BC = stress_BC%values params%rotation_BC = rotation_BC params%timeinc = timeinc @@ -315,7 +314,11 @@ end function Polarisation_solution !-------------------------------------------------------------------------------------------------- !> @brief forms the Polarisation residual vector !-------------------------------------------------------------------------------------------------- -subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr) +subroutine Polarisation_formResidual(in, & ! DMDA info (needs to be named "in" for XRANGE, etc. macros to work) + FandF_tau, & ! defgrad fields on grid + residuum, & ! residuum fields on grid + dummy, & + ierr) use numerics, only: & itmax, & itmin, & @@ -352,9 +355,9 @@ subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr) implicit none DMDALocalInfo, dimension(DMDA_LOCAL_INFO_SIZE) :: in PetscScalar, & - target, dimension(3,3,2, XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: x_scal + target, dimension(3,3,2, XG_RANGE,YG_RANGE,ZG_RANGE), intent(in) :: FandF_tau PetscScalar, & - target, dimension(3,3,2, X_RANGE, Y_RANGE, Z_RANGE), intent(out) :: f_scal + target, dimension(3,3,2, X_RANGE, Y_RANGE, Z_RANGE), intent(out) :: residuum PetscScalar, pointer, dimension(:,:,:,:,:) :: & F, & F_tau, & @@ -368,20 +371,20 @@ subroutine Polarisation_formResidual(in,x_scal,f_scal,dummy,ierr) integer(pInt) :: & i, j, k, e - F => x_scal(1:3,1:3,1,& - XG_RANGE,YG_RANGE,ZG_RANGE) - F_tau => x_scal(1:3,1:3,2,& - XG_RANGE,YG_RANGE,ZG_RANGE) - residual_F => f_scal(1:3,1:3,1,& - X_RANGE, Y_RANGE, Z_RANGE) - residual_F_tau => f_scal(1:3,1:3,2,& - X_RANGE, Y_RANGE, Z_RANGE) + F => FandF_tau(1:3,1:3,1,& + XG_RANGE,YG_RANGE,ZG_RANGE) + F_tau => FandF_tau(1:3,1:3,2,& + XG_RANGE,YG_RANGE,ZG_RANGE) + residual_F => residuum(1:3,1:3,1,& + X_RANGE, Y_RANGE, Z_RANGE) + residual_F_tau => residuum(1:3,1:3,2,& + X_RANGE, Y_RANGE, Z_RANGE) F_av = sum(sum(sum(F,dim=5),dim=4),dim=3) * wgt call MPI_Allreduce(MPI_IN_PLACE,F_av,9,MPI_DOUBLE,MPI_SUM,PETSC_COMM_WORLD,ierr) call SNESGetNumberFunctionEvals(snes,nfuncs,ierr); CHKERRQ(ierr) - call SNESGetIterationNumber(snes,PETScIter,ierr); CHKERRQ(ierr) + call SNESGetIterationNumber(snes,PETScIter,ierr); CHKERRQ(ierr) if (nfuncs == 0 .and. PETScIter == 0) totalIter = -1_pInt ! new increment !-------------------------------------------------------------------------------------------------- @@ -494,8 +497,8 @@ subroutine Polarisation_converged(snes_local,PETScIter,xnorm,snorm,fnorm,reason, !-------------------------------------------------------------------------------------------------- ! stress BC handling F_aim = F_aim - math_mul3333xx33(S, ((P_av - params%stress_BC))) ! S = 0.0 for no bc - err_BC = maxval(abs((1.0_pReal-mask_stress) * math_mul3333xx33(C_scale,F_aim-F_av) + & - mask_stress * (P_av-params%stress_BC))) ! mask = 0.0 for no bc + err_BC = maxval(abs((1.0_pReal-params%stress_mask) * math_mul3333xx33(C_scale,F_aim-F_av) + & + params%stress_mask * (P_av-params%stress_BC))) ! mask = 0.0 for no bc !-------------------------------------------------------------------------------------------------- ! error calculation diff --git a/src/spectral_utilities.f90 b/src/spectral_utilities.f90 index b209ab2ea..f9902ae41 100644 --- a/src/spectral_utilities.f90 +++ b/src/spectral_utilities.f90 @@ -96,11 +96,10 @@ module spectral_utilities integer(kind(FIELD_UNDEFINED_ID)), allocatable :: ID(:) end type tLoadCase - type, public :: tSolutionParams !< @todo use here the type definition for a full loadcase including mask - real(pReal), dimension(3,3) :: stress_BC, rotation_BC + type, public :: tSolutionParams !< @todo use here the type definition for a full loadcase + real(pReal), dimension(3,3) :: stress_mask, stress_BC, rotation_BC real(pReal) :: timeinc real(pReal) :: timeincOld - real(pReal) :: density end type tSolutionParams type, public :: phaseFieldDataBin !< set of parameters defining a phase field From efee9d98e72e025d1b2a7aa49e78a20f70f13e22 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 3 Jul 2018 21:58:28 +0200 Subject: [PATCH 38/54] elseif contained only debug statements, not needed --- src/homogenization.f90 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 23c2ccad5..75330e86c 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -720,11 +720,6 @@ subroutine materialpoint_stressAndItsTangent(updateJaco,dt) hydrogenfluxState(mappingHomogenization(2,i,e))%State( :,mappingHomogenization(1,i,e))! ...internal hydrogen transport state materialpoint_subF0(1:3,1:3,i,e) = materialpoint_subF(1:3,1:3,i,e) ! ...def grad !$OMP FLUSH(materialpoint_subF0) - elseif (materialpoint_requested(i,e)) then steppingNeeded ! already at final time (??) - if (iand(debug_level(debug_homogenization), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionHomog) - !$OMP END CRITICAL (distributionHomog) - endif endif steppingNeeded else converged From 3c1012ef38672c7be3b5203cf73719289dafe387 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Tue, 3 Jul 2018 22:12:25 +0200 Subject: [PATCH 39/54] cut out more now useless pieces --- src/crystallite.f90 | 55 +++++---------------------------------------- 1 file changed, 5 insertions(+), 50 deletions(-) diff --git a/src/crystallite.f90 b/src/crystallite.f90 index dc8751978..29fda16ed 100644 --- a/src/crystallite.f90 +++ b/src/crystallite.f90 @@ -921,11 +921,6 @@ subroutine crystallite_stressAndItsTangent(updateJaco) else ! this crystallite just converged for the entire timestep crystallite_todo(c,i,e) = .false. ! so done here !$OMP FLUSH(crystallite_todo) - if (iand(debug_level(debug_crystallite),debug_levelBasic) /= 0_pInt & - .and. formerSubStep > 0.0_pReal) then - !$OMP CRITICAL (distributionCrystallite) - !$OMP END CRITICAL (distributionCrystallite) - endif endif ! --- cutback --- @@ -1488,13 +1483,7 @@ subroutine crystallite_integrateStateRK4() ! --- SET CONVERGENCE FLAG --- do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains - if (crystallite_todo(g,i,e)) then - crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionState) - !$OMP END CRITICAL (distributionState) - endif - endif + crystallite_converged(g,i,e) = crystallite_todo(g,i,e) .or. crystallite_converged(g,i,e) ! if still "to do" then converged per definitionem enddo; enddo; enddo @@ -1989,13 +1978,7 @@ subroutine crystallite_integrateStateRKCK45() ! --- SET CONVERGENCE FLAG --- !$OMP DO do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains - if (crystallite_todo(g,i,e)) then - crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definition - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionState) - !$OMP END CRITICAL (distributionState) - endif - endif + crystallite_converged(g,i,e) = crystallite_todo(g,i,e) .or. crystallite_converged(g,i,e) ! if still "to do" then converged per definition enddo; enddo; enddo !$OMP ENDDO @@ -2344,13 +2327,7 @@ subroutine crystallite_integrateStateAdaptiveEuler() !$OMP PARALLEL DO do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains - if (crystallite_todo(g,i,e)) then - crystallite_converged(g,i,e) = .true. ! ... converged per definitionem - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionState) - !$OMP END CRITICAL (distributionState) - endif - endif + crystallite_converged(g,i,e) = crystallite_todo(g,i,e) .or. crystallite_converged(g,i,e) ! ... converged per definitionem enddo; enddo; enddo !$OMP END PARALLEL DO @@ -2566,13 +2543,7 @@ eIter = FEsolving_execElem(1:2) !$OMP DO do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains - if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) then - crystallite_converged(g,i,e) = .true. ! if still "to do" then converged per definitionem - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionState) - !$OMP END CRITICAL (distributionState) - endif - endif + crystallite_converged(g,i,e) = crystallite_todo(g,i,e) .or. crystallite_converged(g,i,e) ! if still "to do" then converged per definitionem enddo; enddo; enddo !$OMP ENDDO @@ -2979,14 +2950,8 @@ subroutine crystallite_integrateStateFPI() .or. abs(sourceStateResiduum(1:mySizeSourceDotState,mySource)) < & rTol_crystalliteState * abs(tempSourceState(1:mySizeSourceDotState,mySource))) enddo - if (converged) then - crystallite_converged(g,i,e) = .true. ! ... converged per definition + if (converged) crystallite_converged(g,i,e) = .true. ! ... converged per definition - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionState) - !$OMP END CRITICAL (distributionState) - endif - endif plasticState(p)%state(1:mySizePlasticDotState,c) = & tempPlasticState(1:mySizePlasticDotState) do mySource = 1_pInt, phase_Nsources(p) @@ -3520,11 +3485,6 @@ logical function crystallite_integrateStress(& enddo LpLoop - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionStress) - !$OMP END CRITICAL (distributionStress) - endif - !* calculate intermediate velocity gradient and its tangent from constitutive law call constitutive_LiAndItsTangent(Li_constitutive, dLi_dT3333, dLi_dFi3333, & @@ -3605,11 +3565,6 @@ logical function crystallite_integrateStress(& Liguess = Liguess + steplengthLi * deltaLi enddo LiLoop - if (iand(debug_level(debug_crystallite), debug_levelBasic) /= 0_pInt) then - !$OMP CRITICAL (distributionStress) - !$OMP END CRITICAL (distributionStress) - endif - !* calculate new plastic and elastic deformation gradient invFp_new = math_mul33x33(invFp_current,B) From 63057998fe293cfd0b1631f6e442f13a9e0f7e88 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Tue, 3 Jul 2018 22:58:49 +0200 Subject: [PATCH 40/54] array of size 0 seems to be a common source for segmentation fault --- src/material.f90 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/material.f90 b/src/material.f90 index 2b83c9967..d71fbb37a 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -692,7 +692,7 @@ subroutine material_parseMicrostructure implicit none character(len=65536), dimension(:), allocatable :: & - str + strings integer(pInt), allocatable, dimension(:) :: chunkPos integer(pInt) :: e, m, c, i character(len=65536) :: & @@ -719,21 +719,22 @@ subroutine material_parseMicrostructure allocate(microstructure_texture (microstructure_maxNconstituents,size(config_microstructure)),source=0_pInt) allocate(microstructure_fraction(microstructure_maxNconstituents,size(config_microstructure)),source=0.0_pReal) + allocate(strings(1)) ! Intel 16.0 Bug do m=1_pInt, size(config_microstructure) - str = config_microstructure(m)%getStrings('(constituent)',raw=.true.) - do c = 1_pInt, size(str) - chunkPos = IO_stringPos(str(c)) + strings = config_microstructure(m)%getStrings('(constituent)',raw=.true.) + do c = 1_pInt, size(strings) + chunkPos = IO_stringPos(strings(c)) do i = 1_pInt,5_pInt,2_pInt - tag = IO_stringValue(str(c),chunkPos,i) + tag = IO_stringValue(strings(c),chunkPos,i) select case (tag) case('phase') - microstructure_phase(c,m) = IO_intValue(str(c),chunkPos,i+1_pInt) + microstructure_phase(c,m) = IO_intValue(strings(c),chunkPos,i+1_pInt) case('texture') - microstructure_texture(c,m) = IO_intValue(str(c),chunkPos,i+1_pInt) + microstructure_texture(c,m) = IO_intValue(strings(c),chunkPos,i+1_pInt) case('fraction') - microstructure_fraction(c,m) = IO_floatValue(str(c),chunkPos,i+1_pInt) + microstructure_fraction(c,m) = IO_floatValue(strings(c),chunkPos,i+1_pInt) end select enddo From 69cb9de9c8cd063fff6349954ebd80e0677cf92e Mon Sep 17 00:00:00 2001 From: Test User Date: Wed, 4 Jul 2018 00:52:12 +0200 Subject: [PATCH 41/54] [skip ci] updated version information after successful test of v2.0.2-172-gb1a7eca5 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4c8721172..3ce2ff828 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-162-g2b15468f +v2.0.2-172-gb1a7eca5 From 1eb82b99dab9c0abab4253431d3c700106c14377 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 4 Jul 2018 06:31:45 +0200 Subject: [PATCH 42/54] polishing as a result of discussing merge request of branch 25 with Philip --- lib/damask/config/material.py | 103 ++++++++++++++++------------------ 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index d18bf203e..1f97561af 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -15,10 +15,7 @@ class Section(): } self.parameters = {} for key in data: - if type(data[key]) is not list: - self.parameters[key] = [data[key]] #this is creating a dictionary. So this is a way to create elements in a dictionary - else: - self.parameters[key] = data[key] + self.parameters[key] = data[key] if isinstance(data[key], list) else [data[key]] if '__order__' not in self.parameters: self.parameters['__order__'] = list(self.parameters.keys()) @@ -30,8 +27,7 @@ class Section(): multiKey = '(%s)'%key if multiKey not in self.parameters: self.parameters[multiKey] = [] if multiKey not in self.parameters['__order__']: self.parameters['__order__'] += [multiKey] - if type(data) == list: self.parameters[multiKey] += [[item] for item in data] - else: self.parameters[multiKey] += [[data]] + self.parameters[multiKey] += [[item] for item in data] if isinstance(data, list) else [[data]] def data(self): return self.parameters @@ -63,14 +59,8 @@ class Texture(Section): def add_component(self,theType,properties): - if 'scatter' not in list(map(str.lower,list(properties.keys()))): - scatter = 0.0 - else: - scatter = properties['scatter'] - if 'fraction' not in list(map(str.lower,list(properties.keys()))): - fraction = 1.0 - else: - fraction = properties['fraction'] + scatter = properties['scatter'] if 'scatter' in list(map(str.lower,list(properties.keys()))) else 0.0 + fraction = properties['fraction'] if 'fraction' in list(map(str.lower,list(properties.keys()))) else 1.0 try: multiKey = theType.lower() @@ -122,22 +112,28 @@ class Material(): self.verbose = verbose def __repr__(self): - """Returns current configuration to be used as material.config""" + """Returns current data structure in material.config format""" me = [] for part in self.parts: - if self.verbose: print('doing '+part) - me += ['','#-----------------------------#','<%s>'%part,'#-----------------------------#',] + if self.verbose: print('processing <{}>'.format(part)) + me += ['', + '#-----------------------------#', + '<{}>'.format(part), + '#-----------------------------#', + ] for section in self.data[part]['__order__']: - me += ['','[%s] %s'%(section,'-'*max(0,27-len(section))),'',] + me += ['', + '[{}] {}'.format(section,'#'*max(0,27-len(section))), + '', + ] for key in self.data[part][section]['__order__']: if key.startswith('(') and key.endswith(')'): # multiple (key) - me += ['%s\t%s'%(key,' '.join(values)) for values in self.data[part][section][key]] + me += ['{}\t{}'.format(key,' '.join(values)) for values in self.data[part][section][key]] else: # plain key - me += ['%s\t%s'%(key,' '.join(map(str,self.data[part][section][key])))] - - return '\n'.join(me) + me += ['{}\t{}'.format(key,' '.join(map(str,self.data[part][section][key])))] + return '\n'.join(me) + '\n' - def parse_data(self, part=None, sections=[], content=None): + def parse(self, part=None, sections=[], content=None): re_part = re.compile(r'^<(.+)>$') # pattern for part re_sec = re.compile(r'^\[(.+)\]$') # pattern for section @@ -149,10 +145,10 @@ class Material(): line = line.split('#')[0].strip() # kill comments and extra whitespace line = line.split('/echo/')[0].strip() # remove '/echo/' tags line = line.lower() # be case insensitive - print(line) + if line: # content survives... match_part = re_part.match(line) - if match_part: # found separator + if match_part: # found <...> separator active = (match_part.group(1) == part) # only active in continue if active: @@ -164,7 +160,7 @@ class Material(): self.data[part][name_section] = {'__order__':[]} continue - if sections == [] or name_section in sections: # respect subset + if sections == [] or name_section in sections: # possibly restrict to subset items = line.split() if items[0] not in self.data[part][name_section]: # first encounter of key? self.data[part][name_section][items[0]] = [] # create item @@ -176,45 +172,41 @@ class Material(): - def read(self,file=None): + def read(self,filename=None): - def readInclude(filename): + def recursiveRead(filename): result = [] re_include = re.compile(r'^{(.+)}$') - with open(filename) as f: myData = f.readlines() - for line in myData: + with open(filename) as f: lines = f.readlines() + for line in lines: match = re_include.match(line.split()[0]) if line.strip() else False - if match: - result += readInclude(match.group(1) if match.group(1).startswith('/') else - os.path.normpath(os.path.join(os.path.dirname(filename),match.group(1)))) - else: - result.append(line) + result += [line] if match else recursiveRead(match.group(1) if match.group(1).startswith('/') else + os.path.normpath(os.path.join(os.path.dirname(filename),match.group(1)))) return result - c = readInclude(file) + c = recursiveRead(filename) for p in self.parts: - self.parse_data(part=p, content=c) + self.parse(part=p, content=c) - def write(self,file='material.config', overwrite=False): + def write(self,filename='material.config', overwrite=False): i = 0 - saveFile = file - while not overwrite and os.path.exists(saveFile): + outname = filename + while os.path.exists(outname) and not overwrite: i += 1 - saveFile = file+'_%i'%i + outname = '{}_{}'.format(filename,i) - if self.verbose: print('Writing material data to file %s'%saveFile) - f=open(saveFile,'w') - f.write(str(self)+'\n') #newline at end - f.close() - return saveFile + if self.verbose: print('Writing material data to {}'.format(outname)) + with open(outname,'w') as f: + f.write(str(self)) + return outname - def add_section(self, part=None, section=None, initialData=None, merge = False): + def add_section(self, part=None, section=None, initialData=None, merge=False): """adding/updating""" part = part.lower() section = section.lower() - if part not in self.parts: raise Exception('invalid part %s'%part) + if part not in self.parts: raise Exception('invalid part {}'.format(part)) - if type(initialData) is not dict: + if not isinstance(initialData, dict): initialData = initialData.data() if section not in self.data[part]: self.data[part]['__order__'] += [section] @@ -244,17 +236,17 @@ class Material(): components=dict((k.lower(), v) for k,v in components.items()) for key in ['phase','texture','fraction','crystallite']: - if type(components[key]) is not list: - try: - components[key] = [components[key].lower()] - except AttributeError: - components[key] = [components[key]] - else: + if isinstance(components[key], list): for i, x in enumerate(components[key]): try: components[key][i] = x.lower() except AttributeError: pass + else: + try: + components[key] = [components[key].lower()] + except AttributeError: + components[key] = [components[key]] for (phase,texture,fraction,crystallite) in zip(components['phase'],components['texture'], components['fraction'],components['crystallite']): @@ -283,3 +275,4 @@ class Material(): if newlen is not oldlen: print('Length of value was changed from %i to %i!'%(oldlen,newlen)) + From 88d71afb6bcb32d2be1cad0b2c5fc2e60f093a6c Mon Sep 17 00:00:00 2001 From: Test User Date: Wed, 4 Jul 2018 19:57:13 +0200 Subject: [PATCH 43/54] [skip ci] updated version information after successful test of v2.0.2-175-g346a0b72 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4c8721172..86e58742b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-162-g2b15468f +v2.0.2-175-g346a0b72 From 528dfcb80ce13772238504ef610ccc3a6b0d18b4 Mon Sep 17 00:00:00 2001 From: Test User Date: Thu, 5 Jul 2018 08:24:00 +0200 Subject: [PATCH 44/54] [skip ci] updated version information after successful test of v2.0.2-184-gcb71e940 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3ce2ff828..43532a7e5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-172-gb1a7eca5 +v2.0.2-184-gcb71e940 From cebdecfa70a99a88ee93497ae7dd03f4a1064b37 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Jul 2018 11:04:39 +0200 Subject: [PATCH 45/54] if-else got reversed more readable now: --- lib/damask/config/material.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/damask/config/material.py b/lib/damask/config/material.py index 1f97561af..bb184b4d2 100644 --- a/lib/damask/config/material.py +++ b/lib/damask/config/material.py @@ -173,15 +173,17 @@ class Material(): def read(self,filename=None): - + """Reads material.config file""" def recursiveRead(filename): + """Takes care of include statements like '{}'""" result = [] re_include = re.compile(r'^{(.+)}$') with open(filename) as f: lines = f.readlines() for line in lines: match = re_include.match(line.split()[0]) if line.strip() else False - result += [line] if match else recursiveRead(match.group(1) if match.group(1).startswith('/') else - os.path.normpath(os.path.join(os.path.dirname(filename),match.group(1)))) + result += [line] if not match else \ + recursiveRead(match.group(1) if match.group(1).startswith('/') else + os.path.normpath(os.path.join(os.path.dirname(filename),match.group(1)))) return result c = recursiveRead(filename) @@ -189,6 +191,7 @@ class Material(): self.parse(part=p, content=c) def write(self,filename='material.config', overwrite=False): + """Writes to material.config""" i = 0 outname = filename while os.path.exists(outname) and not overwrite: From 52c478fff1962c80d7ca6b8d95fa8d028e1d7657 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Jul 2018 11:38:36 +0200 Subject: [PATCH 46/54] keyword for mechanical homogenization changed from type to mech --- examples/SpectralMethod/EshelbyInclusion/material.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/SpectralMethod/EshelbyInclusion/material.config b/examples/SpectralMethod/EshelbyInclusion/material.config index 83298680b..83045938d 100644 --- a/examples/SpectralMethod/EshelbyInclusion/material.config +++ b/examples/SpectralMethod/EshelbyInclusion/material.config @@ -3,7 +3,7 @@ #-------------------# [direct] -type none # isostrain 1 grain +mech none # isostrain 1 grain thermal adiabatic # thermal strain (stress) induced mass transport initialT 300.0 From 29c760b92d35833e5dcac66f1aac46825749f5ba Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Thu, 5 Jul 2018 13:16:14 +0200 Subject: [PATCH 47/54] keyword for material.Config write has changed --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index aead92902..364c0419a 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit aead92902b3a0cf3404be9c552bfec918d7aaffb +Subproject commit 364c0419af30bea38b166dab483465759d455b38 From c800e372cbefe144d6759478c455af8aa64600a4 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 6 Jul 2018 13:07:36 +0200 Subject: [PATCH 48/54] no testing of Abaqus anymore --- PRIVATE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PRIVATE b/PRIVATE index 364c0419a..6c43b54ec 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 364c0419af30bea38b166dab483465759d455b38 +Subproject commit 6c43b54ecd4a3a5b3ec8771514ef2c7c839a31e7 From 2a33dcdd04f914e1d23dc45ee07c05693766a034 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 6 Jul 2018 13:12:16 +0200 Subject: [PATCH 49/54] don't distinguish exp and std anymore --- lib/damask/environment.py | 4 ++-- lib/damask/solver/abaqus.py | 11 ++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/damask/environment.py b/lib/damask/environment.py index 6ec0bff79..17786ab28 100644 --- a/lib/damask/environment.py +++ b/lib/damask/environment.py @@ -29,8 +29,8 @@ class Environment(): def isAvailable(self,software,Nneeded =-1): licensesNeeded = {'abaqus' :5, - 'standard':5, - 'explicit':5} + 'standard':5 + } if Nneeded == -1: Nneeded = licensesNeeded[software] try: cmd = """ ssh mulicense2 "/lm-status | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software diff --git a/lib/damask/solver/abaqus.py b/lib/damask/solver/abaqus.py index 04c626eea..73556dc3c 100644 --- a/lib/damask/solver/abaqus.py +++ b/lib/damask/solver/abaqus.py @@ -6,19 +6,12 @@ import subprocess,re class Abaqus(Solver): - def __init__(self,version='',solver=''): # example version string: 6.12-2, solver: std or exp + def __init__(self,version=''): # example version string: 2017 self.solver='Abaqus' if version =='': version = damask.Environment().options['ABAQUS_VERSION'] else: self.version = version - - if solver.lower() in ['','std','standard']: - self.solver = 'std' - elif solver.lower() in ['exp','explicit']: - self.solver = 'exp' - else: - raise Exception('unknown Abaqus solver %'%solver) def return_run_command(self,model): env=damask.Environment() @@ -32,4 +25,4 @@ class Abaqus(Solver): detectedVersion = process.stdout.readlines()[1].split()[1] if self.version != detectedVersion: raise Exception('found Abaqus version %s, but requested %s'%(detectedVersion,self.version)) - return '%s -job %s -user %s/src/DAMASK_abaqus_%s interactive'%(cmd,model,env.rootDir(),self.solver) + return '%s -job %s -user %s/src/DAMASK_abaqus_std interactive'%(cmd,model,env.rootDir()) From ce32372f1cd9bd1bbf1817f39c35f0744a6fd3e6 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Fri, 6 Jul 2018 13:18:55 +0200 Subject: [PATCH 50/54] more cleaning of old commercial FEM solver files --- .gitlab-ci.yml | 11 +- PRIVATE | 2 +- lib/MarcInclude/concom2011 | 205 ----------------- lib/MarcInclude/concom2012 | 206 ----------------- lib/MarcInclude/concom2013 | 217 ------------------ lib/MarcInclude/concom2013.1 | 224 ------------------- lib/MarcInclude/concom2014 | 411 ---------------------------------- lib/MarcInclude/concom2014.2 | 412 ---------------------------------- lib/MarcInclude/concom2015 | 416 ----------------------------------- lib/MarcInclude/creeps2011 | 28 --- lib/MarcInclude/creeps2012 | 28 --- lib/MarcInclude/creeps2013 | 28 --- lib/MarcInclude/creeps2013.1 | 31 --- lib/MarcInclude/creeps2014 | 63 ------ lib/MarcInclude/creeps2014.2 | 63 ------ lib/MarcInclude/creeps2015 | 63 ------ lib/damask/solver/abaqus.py | 2 +- src/DAMASK_abaqus_exp.f | 298 ------------------------- 18 files changed, 3 insertions(+), 2705 deletions(-) delete mode 100644 lib/MarcInclude/concom2011 delete mode 100644 lib/MarcInclude/concom2012 delete mode 100644 lib/MarcInclude/concom2013 delete mode 100644 lib/MarcInclude/concom2013.1 delete mode 100644 lib/MarcInclude/concom2014 delete mode 100644 lib/MarcInclude/concom2014.2 delete mode 100644 lib/MarcInclude/concom2015 delete mode 100644 lib/MarcInclude/creeps2011 delete mode 100644 lib/MarcInclude/creeps2012 delete mode 100644 lib/MarcInclude/creeps2013 delete mode 100644 lib/MarcInclude/creeps2013.1 delete mode 100644 lib/MarcInclude/creeps2014 delete mode 100644 lib/MarcInclude/creeps2014.2 delete mode 100644 lib/MarcInclude/creeps2015 delete mode 100644 src/DAMASK_abaqus_exp.f diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 829020e0f..78e94ced1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -424,20 +424,11 @@ SpectralRuntime: - release ################################################################################################### -AbaqusExp: - stage: createDocumentation - script: - - module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen - - $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus_exp - except: - - master - - release - AbaqusStd: stage: createDocumentation script: - module load $IntelCompiler $MPICH_Intel $PETSc_MPICH_Intel $Doxygen - - $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus_std + - $DAMASKROOT/PRIVATE/documenting/runDoxygen.sh $DAMASKROOT abaqus except: - master - release diff --git a/PRIVATE b/PRIVATE index 6c43b54ec..1581e8e53 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 6c43b54ecd4a3a5b3ec8771514ef2c7c839a31e7 +Subproject commit 1581e8e53910725bac354f5e6f5af1a6914a0a59 diff --git a/lib/MarcInclude/concom2011 b/lib/MarcInclude/concom2011 deleted file mode 100644 index c6eb4c7f7..000000000 --- a/lib/MarcInclude/concom2011 +++ /dev/null @@ -1,205 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry -integer(pInt) num_concom -parameter(num_concom=232) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva(60), idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry -! -! comments of variables: -! -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! -! -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method -! = 2 - Maxwell stress tensor -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! -!*********************************************************************** diff --git a/lib/MarcInclude/concom2012 b/lib/MarcInclude/concom2012 deleted file mode 100644 index 5f3983b38..000000000 --- a/lib/MarcInclude/concom2012 +++ /dev/null @@ -1,206 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0 -integer(pInt) num_concom -parameter(num_concom=233) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva(60), idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0 -! -! comments of variables: -! -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! -! -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method -! = 2 - Maxwell stress tensor -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! ioffsz0 = 1 if composite are used with reference position.ne.0 -! -!*********************************************************************** diff --git a/lib/MarcInclude/concom2013 b/lib/MarcInclude/concom2013 deleted file mode 100644 index 4b4e567d4..000000000 --- a/lib/MarcInclude/concom2013 +++ /dev/null @@ -1,217 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton -dimension :: ideva(60) -integer(pInt) num_concom -parameter(num_concom=237) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton -! -! comments of variables: -! -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! 55 print information related to viscoelasticity calculations -! 56 print out detailed information for element coloring for multithreading -! -! -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! iharmt = 1 global flag if a coupled analysis contains an harmonic pass -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method based on finite difference for the force computation -! = 2 - Maxwell stress tensor -! = 3 - Virtual work method based on local derivative for the force computation -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! ioffsz0 = 1 if composite are used with reference position.ne.0 -! icomplt = 1 global flag if a coupled analysis contains an complex pass -! mesh_dual = 1 two independent meshes are used in magnetodynamic/thermal/structural -! one for magnetodynamic and the other for the remaining passes -! iactrp = 1 in an analysis with global remeshing, include inactive -! rigid bodies on post file -! mgnewton = 1 Use full Newton Raphson iteration for magnetostatic pass -! -!*********************************************************************** diff --git a/lib/MarcInclude/concom2013.1 b/lib/MarcInclude/concom2013.1 deleted file mode 100644 index 2072929ab..000000000 --- a/lib/MarcInclude/concom2013.1 +++ /dev/null @@ -1,224 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens -dimension :: ideva(60) -integer(pInt) num_concom -parameter(num_concom=238) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens -! -! comments of variables: -! -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! 55 print information related to viscoelasticity calculations -! 56 print out detailed information for element coloring for multithreading -! 57 print out extra overheads due to multi-threading. -! These overhead includes (i) time and (ii) memory. -! The memory report will be summed over all the children. -! -! -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! iharmt = 1 global flag if a coupled analysis contains an harmonic pass -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method based on finite difference for the force computation -! = 2 - Maxwell stress tensor -! = 3 - Virtual work method based on local derivative for the force computation -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! ioffsz0 = 1 if composite are used with reference position.ne.0 -! icomplt = 1 global flag if a coupled analysis contains an complex pass -! mesh_dual = 1 two independent meshes are used in magnetodynamic/thermal/structural -! one for magnetodynamic and the other for the remaining passes -! iactrp = 1 in an analysis with global remeshing, include inactive -! rigid bodies on post file -! mgnewton = 1 Use full Newton Raphson iteration for magnetostatic pass -! -! iusedens > 0 if mass density is used in the analysis (dynamics, mass dependent loading) -! -!*********************************************************************** -!$omp threadprivate(/marc_concom/) -!! diff --git a/lib/MarcInclude/concom2014 b/lib/MarcInclude/concom2014 deleted file mode 100644 index 5fa1d7cca..000000000 --- a/lib/MarcInclude/concom2014 +++ /dev/null @@ -1,411 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,& - iaem -dimension :: ideva(60) -integer(pInt) num_concom -parameter(num_concom=240) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,& - iaem -! -! comments of variables: -! -! iacous Control flag for acoustic analysis. Input data. -! iacous=1 modal acoustic analysis. -! iacous=2 harmonic acoustic-structural analysis. -! iasmbl Control flag to indicate that operator matrix should be -! recalculated. -! iautth Control flag for AUTO THERM option. -! ibear Control flag for bearing analysis. Input data. -! icompl Control variable to indicate that a complex analysis is -! being performed. Either a Harmonic analysis with damping, -! or a harmonic electro-magnetic analysis. Input data. -! iconj Flag for EBE conjugate gradient solver (=solver 1, retired) -! Also used for VKI iterative solver. -! icreep Control flag for creep analysis. Input data. -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! 55 print information related to viscoelasticity calculations -! 56 print out detailed information for element coloring for multithreading -! 57 print out extra overheads due to multi-threading. -! These overhead includes (i) time and (ii) memory. -! The memory report will be summed over all the children. -! -! -! 58 debug output for ELSTO usage -! -! idyn Control flag for dynamics. Input data. -! 1 = eigenvalue extraction and / or modal superposition -! 2 = Newmark Beta and Single Step Houbolt (ssh with idynme=1) -! 3 = Houbolt -! 4 = Central difference -! 5 = Newer central difference -! idynt Copy of idyn at begining of increment -! ielas Control flag for ELASTIC analysis. Input data. -! Set by user or automatically turned on by Fourier option. -! Implies that each load case is treated separately. -! In Adaptive meshing analysis , forces re-analysis until -! convergence obtained. -! Also seriously misused to indicate no convergence. -! = 1 elastic option with fourier analysis -! = 2 elastic option without fourier analysis -! =-1 no convergence in recycles or max # increments reached -! Set to 1 if ELASTIC or SUBSTRUC parameter cards are used, -! or if fourier option is used. -! Then set to 2 if not fourier analysis. -! ielcma Control flag for electromagnetic analysis. Input data. -! ielcma = 1 Harmonic formulation -! ielcma = 2 Transient formulation -! ielect Control flag for electrostatic option. Input data. -! iform Control flag indicating that contact will be performed. -! ifour Control flag for Fourier analysis. -! 0 = Odd and even terms. -! 1 = symmetric (cosine) terms -! 2 = antisymmetric (sine) terms. -! iharm Control flag to indicate that a harmonic analysis will -! be performed. May change between passes. -! ihcps Control flag for coupled thermal - stress analysis. -! iheat Control flag for heat transfer analysis. Input data. -! iheatt Permanent control flag for heat transfer analysis. -! Note in coupled analysis iheatt will remain as one, -! but iheat will be zero in stress pass. -! ihresp Control flag to indicate to perform a harmonic subincrement. -! ijoule Control flag for Joule heating. -! ilem Control flag to determin which vector is to be transformed. -! Control flag to see where one is: -! ilem = 1 - elem.f -! ilem = 2 - initst.f -! ilem = 3 - pressr.f -! ilem = 3 - fstif.f -! ilem = 4 - jflux.f -! ilem = 4 - strass.f -! ilem = 5 - mass.f -! ilem = 5 - osolty.f -! ilnmom Control flag for soil - pore pressure calculation. Input data. -! ilnmom = 0 - perform only pore pressure calculation. -! = 1 - couples pore pressure - displacement analysis -! iloren Control flag for DeLorenzi J-Integral evaluation. Input data. -! inc Increment number. -! incext Control flag indicating that currently working on a -! subincrement. -! Could be due to harmonics , damping component (bearing), -! stiffness component (bearing), auto therm creep or -! old viscoplaticity -! incsub Sub-increment number. -! ipass Control flag for which part of coupled analysis. -! ipass = -1 - reset to base values -! ipass = 0 - do nothing -! ipass = 1 - stress part -! ipass = 2 - heat transfer part -! iplres Flag indicating that either second matrix is stored. -! dynamic analysis - mass matrix -! heat transfer - specific heat matrix -! buckle - initial stress stiffness -! ipois Control flag indicating Poisson type analysis -! ipois = 1 for heat transfer -! = 1 for heat transfer part of coupled -! = 1 for bearing -! = 1 for electrostatic -! = 1 for magnetostatic -! ipoist Permanent copy of ipois. In coupled analysis , ipois = 0 -! in stress portion, yet ipoist will still =1. -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis - -! ismall control flag to indicate small displacement analysis. input data. -! ismall = 0 - large disp included. -! ismall = 1 - small displacement. -! the flag is changing between passes. -! ismalt permanent copy of ismall . in heat transfer portion of -! coupled analysis ismall =0 , but ismalt remains the same. -! isoil control flag indicating that soil / pore pressure -! calculation . input data. -! ispect control flag for response spectrum calculation. input data. -! ispnow control flag to indicate to perform a spectrum response -! calculation now. -! istore store stresses flag. -! istore = 0 in elem.f and if first pass of creep -! convergence checking in ogetst.f -! or harmonic analysis or thruc.f if not -! converged. -! iswep control flag for eigenvalue analysis. -! iswep=1 - go do extraction process -! ithcrp control flag for auto therm creep option. input data. -! itherm control flag for either temperature dependent material -! properties and/or thermal loads. -! iupblg control flag for follower force option. input data. -! iupdat control flag for update lagrange option for current element. -! jacflg control flag for lanczos iteration method. input data. -! jel control flag indicating that total load applied in -! increment, ignore previous solution. -! jel = 1 in increment 0 -! = 1 if elastic or fourier -! = 1 in subincrements with elastic and adaptive -! jparks control flag for j integral by parks method. input data. -! largst control flag for finite strain plasticity. input data. -! lfond control variable that indicates if doing elastic -! foundation or film calculation. influences whether -! this is volumetric or surface integration. -! loadup control flag that indicates that nonlinearity occurred -! during previous increment. -! loaduq control flag that indicates that nonlinearity occurred. -! lodcor control flag for switching on the residual load correction. -! notice in input stage lodcor=0 means no loadcor, -! after omarc lodcor=1 means no loadcor -! lovl control flag for determining which "overlay" is to -! be called from ellib. -! lovl = 1 omarc -! = 2 oaread -! = 3 opress -! = 4 oasemb -! = 5 osolty -! = 6 ogetst -! = 7 oscinc -! = 8 odynam -! = 9 opmesh -! = 10 omesh2 -! = 11 osetz -! = 12 oass -! = 13 oincdt -! = 14 oasmas -! = 15 ofluas -! = 16 ofluso -! = 17 oshtra -! = 18 ocass -! = 19 osoltc -! = 20 orezon -! = 21 otest -! = 22 oeigen -! lsub control variable to determine which part of element -! assembly function is being done. -! lsub = 1 - no longer used -! = 2 - beta* -! = 3 - cons* -! = 4 - ldef* -! = 5 - posw* -! = 6 - theta* -! = 7 - tmarx* -! = 8 - geom* -! magnet control flag for magnetostatic analysis. input data. -! ncycle cycle number. accumulated in osolty.f -! note first time through oasemb.f , ncycle = 0. -! newtnt control flag for permanent copy of newton. -! newton iteration type. input data. -! newton : = 1 full newton raphson -! 2 modified newton raphson -! 3 newton raphson with strain correct. -! 4 direct substitution -! 5 direct substitution followed by n.r. -! 6 direct substitution with line search -! 7 full newton raphson with secant initial stress -! 8 secant method -! 9 full newton raphson with line search -! noshr control flag for calculation interlaminar shears for -! elements 22,45, and 75. input data. -!ees -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! iharmt = 1 global flag if a coupled analysis contains an harmonic pass -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method based on finite difference for the force computation -! = 2 - Maxwell stress tensor -! = 3 - Virtual work method based on local derivative for the force computation -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! ioffsz0 = 1 if composite are used with reference position.ne.0 -! icomplt = 1 global flag if a coupled analysis contains an complex pass -! mesh_dual = 1 two independent meshes are used in magnetodynamic/thermal/structural -! one for magnetodynamic and the other for the remaining passes -! iactrp = 1 in an analysis with global remeshing, include inactive -! rigid bodies on post file -! mgnewton = 1 Use full Newton Raphson iteration for magnetostatic pass -! -! iusedens > 0 if mass density is used in the analysis (dynamics, mass dependent loading) -! igsigd0 = 1 set varselem(igsigd) to zero in next oasemb -! iaem = 1 if marc is called from aem (0 - off - default) -! -! -!*********************************************************************** -!$omp threadprivate(/marc_concom/) -!! diff --git a/lib/MarcInclude/concom2014.2 b/lib/MarcInclude/concom2014.2 deleted file mode 100644 index bae1824c1..000000000 --- a/lib/MarcInclude/concom2014.2 +++ /dev/null @@ -1,412 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,& - iaem, icosim -dimension :: ideva(60) -integer(pInt) num_concom -parameter(num_concom=241) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,& - iaem, icosim -! -! comments of variables: -! -! iacous Control flag for acoustic analysis. Input data. -! iacous=1 modal acoustic analysis. -! iacous=2 harmonic acoustic-structural analysis. -! iasmbl Control flag to indicate that operator matrix should be -! recalculated. -! iautth Control flag for AUTO THERM option. -! ibear Control flag for bearing analysis. Input data. -! icompl Control variable to indicate that a complex analysis is -! being performed. Either a Harmonic analysis with damping, -! or a harmonic electro-magnetic analysis. Input data. -! iconj Flag for EBE conjugate gradient solver (=solver 1, retired) -! Also used for VKI iterative solver. -! icreep Control flag for creep analysis. Input data. -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! 55 print information related to viscoelasticity calculations -! 56 print out detailed information for element coloring for multithreading -! 57 print out extra overheads due to multi-threading. -! These overhead includes (i) time and (ii) memory. -! The memory report will be summed over all the children. -! -! -! 58 debug output for ELSTO usage -! -! idyn Control flag for dynamics. Input data. -! 1 = eigenvalue extraction and / or modal superposition -! 2 = Newmark Beta and Single Step Houbolt (ssh with idynme=1) -! 3 = Houbolt -! 4 = Central difference -! 5 = Newer central difference -! idynt Copy of idyn at begining of increment -! ielas Control flag for ELASTIC analysis. Input data. -! Set by user or automatically turned on by Fourier option. -! Implies that each load case is treated separately. -! In Adaptive meshing analysis , forces re-analysis until -! convergence obtained. -! Also seriously misused to indicate no convergence. -! = 1 elastic option with fourier analysis -! = 2 elastic option without fourier analysis -! =-1 no convergence in recycles or max # increments reached -! Set to 1 if ELASTIC or SUBSTRUC parameter cards are used, -! or if fourier option is used. -! Then set to 2 if not fourier analysis. -! ielcma Control flag for electromagnetic analysis. Input data. -! ielcma = 1 Harmonic formulation -! ielcma = 2 Transient formulation -! ielect Control flag for electrostatic option. Input data. -! iform Control flag indicating that contact will be performed. -! ifour Control flag for Fourier analysis. -! 0 = Odd and even terms. -! 1 = symmetric (cosine) terms -! 2 = antisymmetric (sine) terms. -! iharm Control flag to indicate that a harmonic analysis will -! be performed. May change between passes. -! ihcps Control flag for coupled thermal - stress analysis. -! iheat Control flag for heat transfer analysis. Input data. -! iheatt Permanent control flag for heat transfer analysis. -! Note in coupled analysis iheatt will remain as one, -! but iheat will be zero in stress pass. -! ihresp Control flag to indicate to perform a harmonic subincrement. -! ijoule Control flag for Joule heating. -! ilem Control flag to determin which vector is to be transformed. -! Control flag to see where one is: -! ilem = 1 - elem.f -! ilem = 2 - initst.f -! ilem = 3 - pressr.f -! ilem = 3 - fstif.f -! ilem = 4 - jflux.f -! ilem = 4 - strass.f -! ilem = 5 - mass.f -! ilem = 5 - osolty.f -! ilnmom Control flag for soil - pore pressure calculation. Input data. -! ilnmom = 0 - perform only pore pressure calculation. -! = 1 - couples pore pressure - displacement analysis -! iloren Control flag for DeLorenzi J-Integral evaluation. Input data. -! inc Increment number. -! incext Control flag indicating that currently working on a -! subincrement. -! Could be due to harmonics , damping component (bearing), -! stiffness component (bearing), auto therm creep or -! old viscoplaticity -! incsub Sub-increment number. -! ipass Control flag for which part of coupled analysis. -! ipass = -1 - reset to base values -! ipass = 0 - do nothing -! ipass = 1 - stress part -! ipass = 2 - heat transfer part -! iplres Flag indicating that either second matrix is stored. -! dynamic analysis - mass matrix -! heat transfer - specific heat matrix -! buckle - initial stress stiffness -! ipois Control flag indicating Poisson type analysis -! ipois = 1 for heat transfer -! = 1 for heat transfer part of coupled -! = 1 for bearing -! = 1 for electrostatic -! = 1 for magnetostatic -! ipoist Permanent copy of ipois. In coupled analysis , ipois = 0 -! in stress portion, yet ipoist will still =1. -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis - -! ismall control flag to indicate small displacement analysis. input data. -! ismall = 0 - large disp included. -! ismall = 1 - small displacement. -! the flag is changing between passes. -! ismalt permanent copy of ismall . in heat transfer portion of -! coupled analysis ismall =0 , but ismalt remains the same. -! isoil control flag indicating that soil / pore pressure -! calculation . input data. -! ispect control flag for response spectrum calculation. input data. -! ispnow control flag to indicate to perform a spectrum response -! calculation now. -! istore store stresses flag. -! istore = 0 in elem.f and if first pass of creep -! convergence checking in ogetst.f -! or harmonic analysis or thruc.f if not -! converged. -! iswep control flag for eigenvalue analysis. -! iswep=1 - go do extraction process -! ithcrp control flag for auto therm creep option. input data. -! itherm control flag for either temperature dependent material -! properties and/or thermal loads. -! iupblg control flag for follower force option. input data. -! iupdat control flag for update lagrange option for current element. -! jacflg control flag for lanczos iteration method. input data. -! jel control flag indicating that total load applied in -! increment, ignore previous solution. -! jel = 1 in increment 0 -! = 1 if elastic or fourier -! = 1 in subincrements with elastic and adaptive -! jparks control flag for j integral by parks method. input data. -! largst control flag for finite strain plasticity. input data. -! lfond control variable that indicates if doing elastic -! foundation or film calculation. influences whether -! this is volumetric or surface integration. -! loadup control flag that indicates that nonlinearity occurred -! during previous increment. -! loaduq control flag that indicates that nonlinearity occurred. -! lodcor control flag for switching on the residual load correction. -! notice in input stage lodcor=0 means no loadcor, -! after omarc lodcor=1 means no loadcor -! lovl control flag for determining which "overlay" is to -! be called from ellib. -! lovl = 1 omarc -! = 2 oaread -! = 3 opress -! = 4 oasemb -! = 5 osolty -! = 6 ogetst -! = 7 oscinc -! = 8 odynam -! = 9 opmesh -! = 10 omesh2 -! = 11 osetz -! = 12 oass -! = 13 oincdt -! = 14 oasmas -! = 15 ofluas -! = 16 ofluso -! = 17 oshtra -! = 18 ocass -! = 19 osoltc -! = 20 orezon -! = 21 otest -! = 22 oeigen -! lsub control variable to determine which part of element -! assembly function is being done. -! lsub = 1 - no longer used -! = 2 - beta* -! = 3 - cons* -! = 4 - ldef* -! = 5 - posw* -! = 6 - theta* -! = 7 - tmarx* -! = 8 - geom* -! magnet control flag for magnetostatic analysis. input data. -! ncycle cycle number. accumulated in osolty.f -! note first time through oasemb.f , ncycle = 0. -! newtnt control flag for permanent copy of newton. -! newton iteration type. input data. -! newton : = 1 full newton raphson -! 2 modified newton raphson -! 3 newton raphson with strain correct. -! 4 direct substitution -! 5 direct substitution followed by n.r. -! 6 direct substitution with line search -! 7 full newton raphson with secant initial stress -! 8 secant method -! 9 full newton raphson with line search -! noshr control flag for calculation interlaminar shears for -! elements 22,45, and 75. input data. -!ees -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! iharmt = 1 global flag if a coupled analysis contains an harmonic pass -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method based on finite difference for the force computation -! = 2 - Maxwell stress tensor -! = 3 - Virtual work method based on local derivative for the force computation -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! ioffsz0 = 1 if composite are used with reference position.ne.0 -! icomplt = 1 global flag if a coupled analysis contains an complex pass -! mesh_dual = 1 two independent meshes are used in magnetodynamic/thermal/structural -! one for magnetodynamic and the other for the remaining passes -! iactrp = 1 in an analysis with global remeshing, include inactive -! rigid bodies on post file -! mgnewton = 1 Use full Newton Raphson iteration for magnetostatic pass -! -! iusedens > 0 if mass density is used in the analysis (dynamics, mass dependent loading) -! igsigd0 = 1 set varselem(igsigd) to zero in next oasemb -! iaem = 1 if marc is called from aem (0 - off - default) -! icosim = 1 if marc is used in co-simulation software (ADAMS-MARC) -! -! -!*********************************************************************** -!$omp threadprivate(/marc_concom/) -!! diff --git a/lib/MarcInclude/concom2015 b/lib/MarcInclude/concom2015 deleted file mode 100644 index a664f01eb..000000000 --- a/lib/MarcInclude/concom2015 +++ /dev/null @@ -1,416 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: concom.cmn -! -! MSC.Marc include file -! -integer(pInt) & - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen , idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush, istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout, igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,& - iaem, icosim, inodels, nlharm, iampini -dimension :: ideva(60) -integer(pInt) num_concom -parameter(num_concom=244) -common/marc_concom/& - iacous, iasmbl, iautth, ibear, icompl, iconj, icreep, ideva, idyn, idynt,& - ielas, ielcma, ielect, iform, ifour, iharm, ihcps, iheat, iheatt, ihresp,& - ijoule, ilem, ilnmom, iloren, inc, incext, incsub, ipass, iplres, ipois,& - ipoist, irpflo, ismall, ismalt, isoil, ispect, ispnow, istore, iswep, ithcrp,& - itherm, iupblg, iupdat, jacflg, jel, jparks, largst, lfond, loadup, loaduq,& - lodcor, lovl, lsub, magnet, ncycle, newtnt, newton, noshr, linear, ivscpl,& - icrpim, iradrt, ipshft, itshr, iangin, iupmdr, iconjf, jincfl, jpermg, jhour,& - isolvr, jritz, jtable, jshell, jdoubl, jform, jcentr, imini, kautth, iautof,& - ibukty, iassum, icnstd, icnstt, kmakmas, imethvp, iradrte, iradrtp, iupdate, iupdatp,& - ncycnt, marmen, idynme, ihavca, ispf, kmini, imixex, largtt, kdoela, iautofg,& - ipshftp, idntrc, ipore, jtablm, jtablc, isnecma, itrnspo, imsdif, jtrnspo, mcnear,& - imech, imecht, ielcmat, ielectt, magnett, imsdift, noplas, jtabls, jactch, jtablth,& - kgmsto , jpzo, ifricsh, iremkin, iremfor, ishearp, jspf, machining, jlshell, icompsol,& - iupblgfo, jcondir, nstcrp, nactive, ipassref, nstspnt, ibeart, icheckmpc, noline, icuring,& - ishrink, ioffsflg, isetoff, ioffsetm,iharmt, inc_incdat, iautspc, ibrake, icbush , istream_input,& - iprsinp, ivlsinp, ifirst_time,ipin_m, jgnstr_glb, imarc_return,iqvcinp, nqvceid, istpnx, imicro1,& - iaxisymm, jbreakglue,iglstif, jfastasm,iwear, iwearcf, imixmeth, ielcmadyn, idinout,igena_meth,& - magf_meth, non_assumed, iredoboudry, ioffsz0,icomplt, mesh_dual, iactrp, mgnewton, iusedens,igsigd0,& - iaem, icosim, inodels, nlharm, iampini -! -! comments of variables: -! -! iacous Control flag for acoustic analysis. Input data. -! iacous=1 modal acoustic analysis. -! iacous=2 harmonic acoustic-structural analysis. -! iasmbl Control flag to indicate that operator matrix should be -! recalculated. -! iautth Control flag for AUTO THERM option. -! ibear Control flag for bearing analysis. Input data. -! icompl Control variable to indicate that a complex analysis is -! being performed. Either a Harmonic analysis with damping, -! or a harmonic electro-magnetic analysis. Input data. -! iconj Flag for EBE conjugate gradient solver (=solver 1, retired) -! Also used for VKI iterative solver. -! icreep Control flag for creep analysis. Input data. -! ideva(60) - debug print out flag -! 1 print element stiffness matrices, mass matrix -! 2 output matrices used in tying -! 3 force the solution of a nonpositive definite matrix -! 4 print info of connections to each node -! 5 info of gap convergence, internal heat generated, contact -! touching and separation -! 6 nodal value array during rezoning -! 7 tying info in CONRAD GAP option, fluid element numbers in -! CHANNEL option -! 8 output incremental displacements in local coord. system -! 9 latent heat output -! 10 stress-strain in local coord. system -! 11 additional info on interlaminar stress -! 12 output right hand side and solution vector -! 13 info of CPU resources used and memory available on NT -! 14 info of mesh adaption process, 2D outline information -! info of penetration checking for remeshing -! save .fem files after afmesh3d meshing -! 15 surface energy balance flag -! 16 print info regarding pyrolysis -! 17 print info of "streamline topology" -! 18 print mesh data changes after remeshing -! 19 print material flow stress data read in from *.mat file -! if unit flag is on, print out flow stress after conversion -! 20 print information on table input -! 21 print out information regarding kinematic boundary conditions -! 22 print out information regarding dist loads, point loads, film -! and foundations -! 23 print out information about automatic domain decomposition -! 24 print out iteration information in SuperForm status report file -! 25 print out information for ablation -! 26 print out information for films - Table input -! 27 print out the tying forces -! 28 print out for CASI solver, convection, -! 29 DDM single file debug printout -! 30 print out cavity debug info -! 31 print out welding related info -! 32 prints categorized DDM memory usage -! 33 print out the cutting info regarding machining feature -! 34 print out the list of quantities which can be defined via a table -! and for each quantity the supported independent variables -! 35 print out detailed coupling region info -! 36 print out solver debug info level 1 (Least Detailed) -! 37 print out solver debug info level 1 (Medium Detailed) -! 38 print out solver debug info level 1 (Very Detailed) -! 39 print detailed memory allocation info -! 40 print out marc-adams debug info -! 41 output rezone mapping post file for debugging -! 42 output post file after calling oprofos() for debugging -! 43 debug printout for vcct -! 44 debug printout for progressive failure -! 45 print out automatically generated midside node coordinates (arecrd) -! 46 print out message about routine and location, where the ibort is raised (ibort_inc) -! 47 print out summary message of element variables on a -! group-basis after all the automatic changes have been -! made (em_ellibp) -! 48 Automatically generate check results based on max and min vals. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the generate_check_results script from /marc/tools -! 49 Automatically generate check results based on the real calculated values -! at the sppecified check result locations. -! These vals are stored in the checkr file, which is inserted -! into the *dat file by the update_check_results script from /marc/tools -! 50 generate a file containing the resistance or capacity matrix; -! this file can be used to compare results with a reference file -! 51 print out detailed information for segment-to-segment contact -! 52 print out detailed relative displacement information -! for uniaxial sliding contact -! 53 print out detailed sliding direction information for -! uniaxial sliding contact -! 54 print out detailed information for edges attached to a curve -! 55 print information related to viscoelasticity calculations -! 56 print out detailed information for element coloring for multithreading -! 57 print out extra overheads due to multi-threading. -! These overhead includes (i) time and (ii) memory. -! The memory report will be summed over all the children. -! -! -! 58 debug output for ELSTO usage -! -! idyn Control flag for dynamics. Input data. -! 1 = eigenvalue extraction and / or modal superposition -! 2 = Newmark Beta and Single Step Houbolt (ssh with idynme=1) -! 3 = Houbolt -! 4 = Central difference -! 5 = Newer central difference -! idynt Copy of idyn at begining of increment -! ielas Control flag for ELASTIC analysis. Input data. -! Set by user or automatically turned on by Fourier option. -! Implies that each load case is treated separately. -! In Adaptive meshing analysis , forces re-analysis until -! convergence obtained. -! Also seriously misused to indicate no convergence. -! = 1 elastic option with fourier analysis -! = 2 elastic option without fourier analysis -! =-1 no convergence in recycles or max # increments reached -! Set to 1 if ELASTIC or SUBSTRUC parameter cards are used, -! or if fourier option is used. -! Then set to 2 if not fourier analysis. -! ielcma Control flag for electromagnetic analysis. Input data. -! ielcma = 1 Harmonic formulation -! ielcma = 2 Transient formulation -! ielect Control flag for electrostatic option. Input data. -! iform Control flag indicating that contact will be performed. -! ifour Control flag for Fourier analysis. -! 0 = Odd and even terms. -! 1 = symmetric (cosine) terms -! 2 = antisymmetric (sine) terms. -! iharm Control flag to indicate that a harmonic analysis will -! be performed. May change between passes. -! ihcps Control flag for coupled thermal - stress analysis. -! iheat Control flag for heat transfer analysis. Input data. -! iheatt Permanent control flag for heat transfer analysis. -! Note in coupled analysis iheatt will remain as one, -! but iheat will be zero in stress pass. -! ihresp Control flag to indicate to perform a harmonic subincrement. -! ijoule Control flag for Joule heating. -! ilem Control flag to determin which vector is to be transformed. -! Control flag to see where one is: -! ilem = 1 - elem.f -! ilem = 2 - initst.f -! ilem = 3 - pressr.f -! ilem = 3 - fstif.f -! ilem = 4 - jflux.f -! ilem = 4 - strass.f -! ilem = 5 - mass.f -! ilem = 5 - osolty.f -! ilnmom Control flag for soil - pore pressure calculation. Input data. -! ilnmom = 0 - perform only pore pressure calculation. -! = 1 - couples pore pressure - displacement analysis -! iloren Control flag for DeLorenzi J-Integral evaluation. Input data. -! inc Increment number. -! incext Control flag indicating that currently working on a -! subincrement. -! Could be due to harmonics , damping component (bearing), -! stiffness component (bearing), auto therm creep or -! old viscoplaticity -! incsub Sub-increment number. -! ipass Control flag for which part of coupled analysis. -! ipass = -1 - reset to base values -! ipass = 0 - do nothing -! ipass = 1 - stress part -! ipass = 2 - heat transfer part -! iplres Flag indicating that either second matrix is stored. -! dynamic analysis - mass matrix -! heat transfer - specific heat matrix -! buckle - initial stress stiffness -! ipois Control flag indicating Poisson type analysis -! ipois = 1 for heat transfer -! = 1 for heat transfer part of coupled -! = 1 for bearing -! = 1 for electrostatic -! = 1 for magnetostatic -! ipoist Permanent copy of ipois. In coupled analysis , ipois = 0 -! in stress portion, yet ipoist will still =1. -! irpflo global flag for rigid plastic flow analysis -! = 1 eularian formulation -! = 2 regular formulation; rigid material present in the analysis - -! ismall control flag to indicate small displacement analysis. input data. -! ismall = 0 - large disp included. -! ismall = 1 - small displacement. -! the flag is changing between passes. -! ismalt permanent copy of ismall . in heat transfer portion of -! coupled analysis ismall =0 , but ismalt remains the same. -! isoil control flag indicating that soil / pore pressure -! calculation . input data. -! ispect control flag for response spectrum calculation. input data. -! ispnow control flag to indicate to perform a spectrum response -! calculation now. -! istore store stresses flag. -! istore = 0 in elem.f and if first pass of creep -! convergence checking in ogetst.f -! or harmonic analysis or thruc.f if not -! converged. -! iswep control flag for eigenvalue analysis. -! iswep=1 - go do extraction process -! ithcrp control flag for auto therm creep option. input data. -! itherm control flag for either temperature dependent material -! properties and/or thermal loads. -! iupblg control flag for follower force option. input data. -! iupdat control flag for update lagrange option for current element. -! jacflg control flag for lanczos iteration method. input data. -! jel control flag indicating that total load applied in -! increment, ignore previous solution. -! jel = 1 in increment 0 -! = 1 if elastic or fourier -! = 1 in subincrements with elastic and adaptive -! jparks control flag for j integral by parks method. input data. -! largst control flag for finite strain plasticity. input data. -! lfond control variable that indicates if doing elastic -! foundation or film calculation. influences whether -! this is volumetric or surface integration. -! loadup control flag that indicates that nonlinearity occurred -! during previous increment. -! loaduq control flag that indicates that nonlinearity occurred. -! lodcor control flag for switching on the residual load correction. -! notice in input stage lodcor=0 means no loadcor, -! after omarc lodcor=1 means no loadcor -! lovl control flag for determining which "overlay" is to -! be called from ellib. -! lovl = 1 omarc -! = 2 oaread -! = 3 opress -! = 4 oasemb -! = 5 osolty -! = 6 ogetst -! = 7 oscinc -! = 8 odynam -! = 9 opmesh -! = 10 omesh2 -! = 11 osetz -! = 12 oass -! = 13 oincdt -! = 14 oasmas -! = 15 ofluas -! = 16 ofluso -! = 17 oshtra -! = 18 ocass -! = 19 osoltc -! = 20 orezon -! = 21 otest -! = 22 oeigen -! lsub control variable to determine which part of element -! assembly function is being done. -! lsub = 1 - no longer used -! = 2 - beta* -! = 3 - cons* -! = 4 - ldef* -! = 5 - posw* -! = 6 - theta* -! = 7 - tmarx* -! = 8 - geom* -! magnet control flag for magnetostatic analysis. input data. -! ncycle cycle number. accumulated in osolty.f -! note first time through oasemb.f , ncycle = 0. -! newtnt control flag for permanent copy of newton. -! newton iteration type. input data. -! newton : = 1 full newton raphson -! 2 modified newton raphson -! 3 newton raphson with strain correct. -! 4 direct substitution -! 5 direct substitution followed by n.r. -! 6 direct substitution with line search -! 7 full newton raphson with secant initial stress -! 8 secant method -! 9 full newton raphson with line search -! noshr control flag for calculation interlaminar shears for -! elements 22,45, and 75. input data. -!ees -! -! jactch = 1 or 2 if elements are activated or deactivated -! = 3 if elements are adaptively remeshed or rezoned -! = 0 normally / reset to 0 when assembly is done -! ifricsh = 0 call to fricsh in otest not needed -! = 1 call to fricsh (nodal friction) in otest needed -! iremkin = 0 remove deactivated kinematic boundary conditions -! immediately - only in new input format (this is default) -! = 1 remove deactivated kinematic boundary conditions -! gradually - only in new input format -! iremfor = 0 remove force boundary conditions immediately - -! only in new input format (this is default) -! = 1 remove force boundary conditions gradually - -! only in new input format (this is default) -! ishearp set to 1 if shear panel elements are present in the model -! -! jspf = 0 not in spf loadcase -! > 0 in spf loadcase (jspf=1 during first increment) -! machining = 1 if the metal cutting feature is used, for memory allocation purpose -! = 0 (default) if no metal cutting feature required -! -! jlshell = 1 if there is a shell element in the mesh -! icompsol = 1 if there is a composite solid element in the mesh -! iupblgfo = 1 if follower force for point loads -! jcondir = 1 if contact priority option is used -! nstcrp = 0 (default) steady state creep flag (undocumented feature. -! if not 0, turns off special ncycle = 0 code in radial.f) -! nactive = number of active passes, if =1 then it's not a coupled analysis -! ipassref = reference ipass, if not in a multiphysics pass ipass=ipassref -! icheckmpc = value of mpc-check parameter option -! noline = set to 1 in osolty if no line seacrh should be done in ogetst -! icuring = set to 1 if the curing is included for the heat transfer analysis. -! ishrink = set to 1 if shrinkage strain is included for mechancial analysis. -! ioffsflg = 1 for small displacement beam/shell offsets -! = 2 for large displacement beam/shell offsets -! isetoff = 0 - do not apply beam/shell offsets -! = 1 - apply beam/shell offsets -! ioffsetm = min. value of offset flag -! iharmt = 1 global flag if a coupled analysis contains an harmonic pass -! inc_incdat = flag to record increment number of a new loadcase in incdat.f -! iautspc = flag for AutoSPC option -! ibrake = brake squeal in this increment -! icbush = set to 1 if cbush elements present in model -! istream_input = set to 1 for streaming input calling Marc as library -! iprsinp = set to 1 if pressure input, introduced so other variables -! such as h could be a function of pressure -! ivlsinp = set to 1 if velocity input, introduced so other variables -! such as h could be a function of velocity -! ipin_m = # of beam element with PIN flag -! jgnstr_glb = global control over pre or fast integrated composite shells -! imarc_return = Marc return flag for streaming input control -! iqvcimp = if non-zero, then the number of QVECT boundary conditions -! nqvceid = number of QVECT boundary conditions, where emisivity/absorbtion id entered -! istpnx = 1 if to stop at end of increment -! imicro1 = 1 if micro1 interface is used -! iaxisymm = set to 1 if axisymmetric analysis -! jbreakglue = set to 1 if breaking glued option is used -! iglstif = 1 if ddm and global stiffness matrix formed (sgi solver 6 or solver9) -! jfastasm = 1 do fast assembly using SuperForm code -! iwear = set to 1 if wear model, set to 2 if wear model and coordinates updated -! iwearcf = set to 1 to store nodal coefficient of friction for wear calculation -! imixmeth = set=1 then use nonlinear mixture material - allocate memory -! ielcmadyn = flag for magnetodynamics -! 0 - electromagnetics using newmark beta -! 1 - transient magnetics using backward euler -! idinout = flag to control if inside out elements should be deactivated -! igena_meth = 0 - generalized alpha parameters depend on whether or not contact -! is flagged (dynamic,7) -! 10 - generalized alpha parameters are optimized for a contact -! analysis (dynamic,8) -! 11 - generalized alpha parameters are optimized for an analysis -! without contact (dynamic,8) -! magf_meth = - Method to compute force in magnetostatic - structural -! = 1 - Virtual work method based on finite difference for the force computation -! = 2 - Maxwell stress tensor -! = 3 - Virtual work method based on local derivative for the force computation -! non_assumed = 1 no assumed strain formulation (forced) -! iredoboudry set to 1 if contact boundary needs to be recalculated -! ioffsz0 = 1 if composite are used with reference position.ne.0 -! icomplt = 1 global flag if a coupled analysis contains an complex pass -! mesh_dual = 1 two independent meshes are used in magnetodynamic/thermal/structural -! one for magnetodynamic and the other for the remaining passes -! iactrp = 1 in an analysis with global remeshing, include inactive -! rigid bodies on post file -! mgnewton = 1 Use full Newton Raphson iteration for magnetostatic pass -! -! iusedens > 0 if mass density is used in the analysis (dynamics, mass dependent loading) -! igsigd0 = 1 set varselem(igsigd) to zero in next oasemb -! iaem = 1 if marc is called from aem (0 - off - default) -! icosim = 1 if marc is used in co-simulation software (ADAMS-MARC) -! inodels = 1 nodal integration elements 239/240/241 present -! nlharm = 0 harmonic subincrements are linear -! = 1 harmonic subincrements are nonlinear -! iampini = 0 amplitude of previous harmonic subinc is initial estimate (default) -! = 1 zero amplitude is initial estimate -! -!*********************************************************************** -!$omp threadprivate(/marc_concom/) -!! diff --git a/lib/MarcInclude/creeps2011 b/lib/MarcInclude/creeps2011 deleted file mode 100644 index 56cca4975..000000000 --- a/lib/MarcInclude/creeps2011 +++ /dev/null @@ -1,28 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept -integer(pInt) icptim,icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=40) -parameter(num_creepsi=18) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept(33),icptim,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** diff --git a/lib/MarcInclude/creeps2012 b/lib/MarcInclude/creeps2012 deleted file mode 100644 index 56cca4975..000000000 --- a/lib/MarcInclude/creeps2012 +++ /dev/null @@ -1,28 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept -integer(pInt) icptim,icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=40) -parameter(num_creepsi=18) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept(33),icptim,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** diff --git a/lib/MarcInclude/creeps2013 b/lib/MarcInclude/creeps2013 deleted file mode 100644 index 56cca4975..000000000 --- a/lib/MarcInclude/creeps2013 +++ /dev/null @@ -1,28 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept -integer(pInt) icptim,icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=40) -parameter(num_creepsi=18) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,creept(33),icptim,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** diff --git a/lib/MarcInclude/creeps2013.1 b/lib/MarcInclude/creeps2013.1 deleted file mode 100644 index cc2581ae6..000000000 --- a/lib/MarcInclude/creeps2013.1 +++ /dev/null @@ -1,31 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b -integer(pInt) icptim,icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=7) -parameter(num_creepsi=18) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,icptim,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** -!$omp threadprivate(/marc_creeps/) -!$omp threadprivate(/marc_creeps2/) -!! diff --git a/lib/MarcInclude/creeps2014 b/lib/MarcInclude/creeps2014 deleted file mode 100644 index e9bf51f71..000000000 --- a/lib/MarcInclude/creeps2014 +++ /dev/null @@ -1,63 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b -integer(pInt) icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=7) -parameter(num_creepsi=17) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! cptim Total time at begining of increment. -! timinc Incremental time for this step. -! icfte Local copy number of slopes of creep strain rate function -! versus temperature. Is -1 if exponent law used. -! icfst Local copy number of slopes of creep strain rate function -! versus equivalent stress. Is -1 if exponent law used. -! icfeq Local copy number of slopes of creep strain rate function -! versus equivalent strain. Is -1 if exponent law used. -! icftm Local copy number of slopes of creep strain rate function -! versus time. Is -1 if exponent law used. -! icetem Element number that needs to be checked for creep convergence -! or, if negative, the number of elements that need to -! be checked. In the latter case the elements to check -! are stored in ielcp. -! mcreep Maximum nuber of iterations for explicit creep. -! jcreep Counter of number of iterations for explicit creep -! procedure. jcreep must be .le. mcreep -! icpa Pointer to constant in creep strain rate expression. -! icftmp Pointer to temperature dependent creep strain rate data. -! icfstr Pointer to equivalent stress dependent creep strain rate data. -! icfqcp Pointer to equivalent creep strain dependent creep strain -! rate data. -! icfcpm Pointer to equivalent creep strain rate dependent -! creep strain rate data. -! icrppr Permanent copy of icreep -! icrcha Control flag for creep convergence checking , if set to -! 1 then testing on absolute change in stress and creep -! strain, not relative testing. Input data. -! icpb Pointer to storage of material id cross reference numbers. -! iicpmt -! iicpa Pointer to constant in creep strain rate expression -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** -!!$omp threadprivate(/marc_creeps/) -!!$omp threadprivate(/marc_creeps2/) -!! diff --git a/lib/MarcInclude/creeps2014.2 b/lib/MarcInclude/creeps2014.2 deleted file mode 100644 index e9bf51f71..000000000 --- a/lib/MarcInclude/creeps2014.2 +++ /dev/null @@ -1,63 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b -integer(pInt) icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=7) -parameter(num_creepsi=17) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! cptim Total time at begining of increment. -! timinc Incremental time for this step. -! icfte Local copy number of slopes of creep strain rate function -! versus temperature. Is -1 if exponent law used. -! icfst Local copy number of slopes of creep strain rate function -! versus equivalent stress. Is -1 if exponent law used. -! icfeq Local copy number of slopes of creep strain rate function -! versus equivalent strain. Is -1 if exponent law used. -! icftm Local copy number of slopes of creep strain rate function -! versus time. Is -1 if exponent law used. -! icetem Element number that needs to be checked for creep convergence -! or, if negative, the number of elements that need to -! be checked. In the latter case the elements to check -! are stored in ielcp. -! mcreep Maximum nuber of iterations for explicit creep. -! jcreep Counter of number of iterations for explicit creep -! procedure. jcreep must be .le. mcreep -! icpa Pointer to constant in creep strain rate expression. -! icftmp Pointer to temperature dependent creep strain rate data. -! icfstr Pointer to equivalent stress dependent creep strain rate data. -! icfqcp Pointer to equivalent creep strain dependent creep strain -! rate data. -! icfcpm Pointer to equivalent creep strain rate dependent -! creep strain rate data. -! icrppr Permanent copy of icreep -! icrcha Control flag for creep convergence checking , if set to -! 1 then testing on absolute change in stress and creep -! strain, not relative testing. Input data. -! icpb Pointer to storage of material id cross reference numbers. -! iicpmt -! iicpa Pointer to constant in creep strain rate expression -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** -!!$omp threadprivate(/marc_creeps/) -!!$omp threadprivate(/marc_creeps2/) -!! diff --git a/lib/MarcInclude/creeps2015 b/lib/MarcInclude/creeps2015 deleted file mode 100644 index e9bf51f71..000000000 --- a/lib/MarcInclude/creeps2015 +++ /dev/null @@ -1,63 +0,0 @@ -! common block definition file taken from respective MSC.Marc release and reformated to free format -!*********************************************************************** -! -! File: creeps.cmn -! -! MSC.Marc include file -! -real(pReal) cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b -integer(pInt) icfte,icfst,icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,& - icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -real(pReal) time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -integer(pInt) num_creepsr,num_creepsi,num_creeps2r -parameter(num_creepsr=7) -parameter(num_creepsi=17) -parameter(num_creeps2r=4) -common/marc_creeps/cptim,timinc,timinc_p,timinc_s,timincm,timinc_a,timinc_b,icfte,icfst,& - icfeq,icftm,icetem,mcreep,jcreep,icpa,icftmp,icfstr,icfqcp,icfcpm,icrppr,icrcha,icpb,iicpmt,iicpa -common/marc_creeps2/time_beg_lcase,time_beg_inc,fractol,time_beg_pst -! -! cptim Total time at begining of increment. -! timinc Incremental time for this step. -! icfte Local copy number of slopes of creep strain rate function -! versus temperature. Is -1 if exponent law used. -! icfst Local copy number of slopes of creep strain rate function -! versus equivalent stress. Is -1 if exponent law used. -! icfeq Local copy number of slopes of creep strain rate function -! versus equivalent strain. Is -1 if exponent law used. -! icftm Local copy number of slopes of creep strain rate function -! versus time. Is -1 if exponent law used. -! icetem Element number that needs to be checked for creep convergence -! or, if negative, the number of elements that need to -! be checked. In the latter case the elements to check -! are stored in ielcp. -! mcreep Maximum nuber of iterations for explicit creep. -! jcreep Counter of number of iterations for explicit creep -! procedure. jcreep must be .le. mcreep -! icpa Pointer to constant in creep strain rate expression. -! icftmp Pointer to temperature dependent creep strain rate data. -! icfstr Pointer to equivalent stress dependent creep strain rate data. -! icfqcp Pointer to equivalent creep strain dependent creep strain -! rate data. -! icfcpm Pointer to equivalent creep strain rate dependent -! creep strain rate data. -! icrppr Permanent copy of icreep -! icrcha Control flag for creep convergence checking , if set to -! 1 then testing on absolute change in stress and creep -! strain, not relative testing. Input data. -! icpb Pointer to storage of material id cross reference numbers. -! iicpmt -! iicpa Pointer to constant in creep strain rate expression -! -! time_beg_lcase time at the beginning of the current load case -! time_beg_inc time at the beginning of the current increment -! fractol fraction of loadcase or increment time when we -! consider it to be finished -! time_beg_pst time corresponding to first increment to be -! read in from thermal post file for auto step -! -!*********************************************************************** -!!$omp threadprivate(/marc_creeps/) -!!$omp threadprivate(/marc_creeps2/) -!! diff --git a/lib/damask/solver/abaqus.py b/lib/damask/solver/abaqus.py index 73556dc3c..bf8691533 100644 --- a/lib/damask/solver/abaqus.py +++ b/lib/damask/solver/abaqus.py @@ -25,4 +25,4 @@ class Abaqus(Solver): detectedVersion = process.stdout.readlines()[1].split()[1] if self.version != detectedVersion: raise Exception('found Abaqus version %s, but requested %s'%(detectedVersion,self.version)) - return '%s -job %s -user %s/src/DAMASK_abaqus_std interactive'%(cmd,model,env.rootDir()) + return '%s -job %s -user %s/src/DAMASK_abaqus interactive'%(cmd,model,env.rootDir()) diff --git a/src/DAMASK_abaqus_exp.f b/src/DAMASK_abaqus_exp.f deleted file mode 100644 index 147754553..000000000 --- a/src/DAMASK_abaqus_exp.f +++ /dev/null @@ -1,298 +0,0 @@ -!-------------------------------------------------------------------------------------------------- -!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH -!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH -!> @author Koen Janssens, Paul Scherrer Institut -!> @author Arun Prakash, Fraunhofer IWM -!> @brief interfaces DAMASK with Abaqus/Explicit -!> @details put the included file abaqus_v6.env in either your home or model directory, -!> it is a minimum Abaqus environment file containing all changes necessary to use the -!> DAMASK subroutine (see Abaqus documentation for more information on the use of abaqus_v6.env) -!-------------------------------------------------------------------------------------------------- - -#ifndef INT -#define INT 4 -#endif - -#ifndef FLOAT -#define FLOAT 8 -#endif - -#define Abaqus - -#include "prec.f90" - -module DAMASK_interface - -implicit none -character(len=4), dimension(2), parameter :: INPUTFILEEXTENSION = ['.pes','.inp'] -character(len=4), parameter :: LOGFILEEXTENSION = '.log' - -contains - -!-------------------------------------------------------------------------------------------------- -!> @brief just reporting -!-------------------------------------------------------------------------------------------------- -subroutine DAMASK_interface_init - integer, dimension(8) :: & - dateAndTime ! type default integer - call date_and_time(values = dateAndTime) - write(6,'(/,a)') ' <<<+- DAMASK_abaqus_exp -+>>>' - write(6,'(/,a)') ' Roters et al., Computational Materials Science, 2018' - write(6,'(/,a)') ' Version: '//DAMASKVERSION - write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',& - dateAndTime(2),'/',& - dateAndTime(1) - write(6,'(a,2(i2.2,a),i2.2)') ' Time: ',dateAndTime(5),':',& - dateAndTime(6),':',& - dateAndTime(7) - write(6,'(/,a)') ' <<<+- DAMASK_interface init -+>>>' -#include "compilation_info.f90" - -end subroutine DAMASK_interface_init - - - -!-------------------------------------------------------------------------------------------------- -!> @brief using Abaqus/Explicit function to get working directory name -!-------------------------------------------------------------------------------------------------- -character(1024) function getSolverWorkingDirectoryName() - - implicit none - integer :: lenOutDir - - getSolverWorkingDirectoryName='' - call vgetOutDir(getSolverWorkingDirectoryName, lenOutDir) - getSolverWorkingDirectoryName=trim(getSolverWorkingDirectoryName)//'/' - -end function getSolverWorkingDirectoryName - - -!-------------------------------------------------------------------------------------------------- -!> @brief using Abaqus/Explicit function to get solver job name -!-------------------------------------------------------------------------------------------------- -character(1024) function getSolverJobName() - - implicit none - integer :: lenJobName - - getSolverJobName='' - call vGetJobName(getSolverJobName, lenJobName) - -end function getSolverJobName - -end module DAMASK_interface - -#include "commercialFEM_fileList.f90" - -subroutine vumat(nBlock, nDir, nshr, nStateV, nFieldV, nProps, lAnneal, & - stepTime, totalTime, dt, cmName, coordMp, charLength, & - props, density, strainInc, relSpinInc, & - tempOld, stretchOld, defgradOld, fieldOld, & - stressOld, stateOld, enerInternOld, enerInelasOld, & - tempNew, stretchNew, defgradNew, fieldNew, & - stressNew, stateNew, enerInternNew, enerInelasNew) - use prec, only: & - pReal, & - pInt -!$ use numerics, only: & -!$ DAMASK_NumThreadsInt - use FEsolving, only: & - symmetricSolver, & - terminallyIll - use math, only: & - invnrmMandel - use debug, only: & - debug_info, & - debug_reset, & - debug_levelBasic, & - debug_level, & - debug_abaqus - use mesh, only: & - mesh_unitlength, & - mesh_FEasCP, & - mesh_ipCoordinates - use CPFEM, only: & - CPFEM_general, & - CPFEM_init_done, & - CPFEM_initAll, & - CPFEM_CALCRESULTS, & - CPFEM_AGERESULTS, & - cycleCounter, & - theTime, & - outdatedByNewInc, & - outdatedFFN1 - use homogenization, only: & - materialpoint_sizeResults, & - materialpoint_results - - implicit none - integer(pInt), intent(in) :: & - nDir, & !< number of direct components in a symmetric tensor - nshr, & !< number of indirect components in a symmetric tensor - nStateV, & !< number of user-defined state variables that are associated with this material type - nFieldV, & !< number of user-defined external field variables - nprops, & !< user-specified number of user-defined material properties - lAnneal !< indicating whether the routine is being called during an annealing process - integer(pInt), dimension(*), intent(in) :: & - nBlock !< 1: No of Materialpoints in this call, 2: No of Materialpoint (IP) - !< 3: No of layer, 4: No of secPoint, 5+: element numbers - character(len=80), intent(in) :: & - cmname !< uses-specified material name, left justified - real(pReal), dimension(nprops), intent(in) :: & - props !< user-supplied material properties - real(pReal), intent(in) :: & - stepTime, & !< value of time since the step began - totalTime, & !< value of total time - dt !< time increment size - real(pReal), dimension(nblock(1)), intent(in) :: & - density, & !< current density at material points in the midstep configuration - charLength, & !< characteristic element length - enerInternOld, & !< internal energy per unit mass at each material point at the beginning of the increment - enerInelasOld, & !< dissipated inelastic energy per unit mass at each material point at the beginning of the increment - tempOld, & !< temperature at each material point at the beginning of the increment - tempNew !< temperature at each material point at the end of the increment (Temperature calculated in ABAQUS boundary conditions) - real(pReal), dimension(nblock(1),*), intent(in) :: & - coordMp !< material point coordinates - real(pReal), dimension(nblock(1),ndir+nshr), intent(in) :: & - strainInc, & !< strain increment tensor at each material point - stretchOld, & !< stretch tensor U at each material point - stretchNew, & !< stretch tensor U at each material point - stressOld !< stress tensor at each material point - real(pReal), dimension(nblock(1),nshr), intent(in) :: & - relSpinInc !< incremental relative rotation vector - real(pReal), dimension(nblock(1),nstatev), intent(in) :: & - stateOld !< state variables at each material point at the beginning of the increment - real(pReal), dimension(nblock(1),nfieldv), intent(in) :: & - fieldOld, & !< user-defined field variables - fieldNew !< user-defined field variables - real(pReal), dimension(nblock(1),ndir+2*nshr), intent(in) :: & - defgradOld, & - defgradNew - real(pReal), dimension(nblock(1)), intent(out) :: & - enerInternNew, & !< internal energy per unit mass at each material point at the end of the increment - enerInelasNew !< dissipated inelastic energy per unit mass at each material point at the end of the increment - real(pReal), dimension(nblock(1),ndir+nshr), intent(out) :: & - stressNew !< stress tensor at each material point at the end of the increment - real(pReal), dimension(nblock(1),nstatev), intent(out) :: & - stateNew !< state variables at each material point at the end of the increment - - real(pReal), dimension(3) :: coordinates - real(pReal), dimension(3,3) :: defgrd0,defgrd1 - real(pReal), dimension(6) :: stress - real(pReal), dimension(6,6) :: ddsdde - real(pReal) :: temp, timeInc, stresspower - integer(pInt) :: computationMode, n, i, cp_en - -#ifdef _OPENMP - integer :: defaultNumThreadsInt !< default value set by Abaqus - include "omp_lib.h" - - defaultNumThreadsInt = omp_get_num_threads() ! remember number of threads set by Marc - call omp_set_num_threads(DAMASK_NumThreadsInt) ! set number of threads for parallel execution set by DAMASK_NUM_THREADS -#endif - - computationMode = CPFEM_CALCRESULTS ! always calculate - do n = 1,nblock(1) ! loop over vector of IPs - temp = tempOld(n) ! temp is intent(in) - if ( .not. CPFEM_init_done ) then - call CPFEM_initAll(nBlock(4_pInt+n),nBlock(2)) - outdatedByNewInc = .false. - - if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then - write(6,'(i8,1x,i2,1x,a)') nBlock(4_pInt+n),nBlock(2),'first call special case..!'; flush(6) - endif - else if (theTime < totalTime) then ! reached convergence - outdatedByNewInc = .true. - - if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then - write (6,'(i8,1x,i2,1x,a)') nBlock(4_pInt+n),nBlock(2),'lastIncConverged + outdated'; flush(6) - endif - - endif - outdatedFFN1 = .false. - terminallyIll = .false. - cycleCounter = 1_pInt - if ( outdatedByNewInc ) then - outdatedByNewInc = .false. - call debug_info() ! first after new inc reports debugging - call debug_reset() ! resets debugging - computationMode = ior(computationMode, CPFEM_AGERESULTS) ! age results - endif - - theTime = totalTime ! record current starting time - if (iand(debug_level(debug_abaqus),debug_levelBasic) /= 0) then - write(6,'(a,i8,i2,a)') '(',nBlock(4_pInt+n),nBlock(2),')'; flush(6) - write(6,'(a,l1)') 'Aging Results: ', iand(computationMode, CPFEM_AGERESULTS) /= 0_pInt - endif - defgrd0 = 0.0_pReal - defgrd1 = 0.0_pReal - timeInc = dt - - ! ABAQUS explicit: deformation gradient as vector 11, 22, 33, 12, 23, 31, 21, 32, 13 - ! ABAQUS explicit: deformation gradient as vector 11, 22, 33, 12, 21 - - forall (i=1:ndir) - defgrd0(i,i) = defgradOld(n,i) - defgrd1(i,i) = defgradNew(n,i) - end forall - if (nshr == 1) then - defgrd0(1,2) = defgradOld(n,4) - defgrd1(1,2) = defgradNew(n,4) - defgrd0(2,1) = defgradOld(n,5) - defgrd1(2,1) = defgradNew(n,5) - else - defgrd0(1,2) = defgradOld(n,4) - defgrd1(1,2) = defgradNew(n,4) - defgrd0(1,3) = defgradOld(n,9) - defgrd1(1,3) = defgradNew(n,9) - defgrd0(2,1) = defgradOld(n,7) - defgrd1(2,1) = defgradNew(n,7) - defgrd0(2,3) = defgradOld(n,5) - defgrd1(2,3) = defgradNew(n,5) - defgrd0(3,1) = defgradOld(n,6) - defgrd1(3,1) = defgradNew(n,6) - defgrd0(3,2) = defgradOld(n,8) - defgrd1(3,2) = defgradNew(n,8) - - endif - cp_en = mesh_FEasCP('elem',nBlock(4_pInt+n)) - mesh_ipCoordinates(1:3,nblock(2),cp_en) = mesh_unitlength * coordMp(n,1:3) - - call CPFEM_general(computationMode,.false.,defgrd0,defgrd1,temp,timeInc,cp_en,nBlock(2),stress,ddsdde) - - ! Mandel: 11, 22, 33, SQRT(2)*12, SQRT(2)*23, SQRT(2)*13 - ! straight: 11, 22, 33, 12, 23, 13 - ! ABAQUS implicit: 11, 22, 33, 12, 13, 23 - ! ABAQUS explicit: 11, 22, 33, 12, 23, 13 - ! ABAQUS explicit: 11, 22, 33, 12 - - stressNew(n,1:ndir+nshr) = stress(1:ndir+nshr)*invnrmMandel(1:ndir+nshr) - stateNew(n,1:min(nstatev,materialpoint_sizeResults)) = & - materialpoint_results(1:min(nstatev,materialpoint_sizeResults),& - nBlock(2),mesh_FEasCP('elem', nBlock(4_pInt+n))) - - stresspower = 0.5_pReal*sum((stressOld(n,1:ndir)+stressNew(n,1:ndir))*straininc(n,1:ndir))+& - sum((stressOld(n,ndir+1:ndir+nshr)+stressNew(n,ndir+1:ndir+nshr))*straininc(n,ndir+1:ndir+nshr)) - enerInternNew(n) = enerInternOld(n) + stresspower / density(n) ! Internal energy per unit mass - enerInelasNew(n) = enerInternNew(n) ! Dissipated inelastic energy per unit mass(Temporary output) - - enddo -!$ call omp_set_num_threads(defaultNumThreadsInt) ! reset number of threads to stored default value - -end subroutine vumat - - -!-------------------------------------------------------------------------------------------------- -!> @brief calls the exit function of Abaqus/Explicit -!-------------------------------------------------------------------------------------------------- -subroutine quit(mpie_error) - use prec, only: & - pInt - - implicit none - integer(pInt) :: mpie_error - - flush(6) - call xplb_exit - -end subroutine quit From 12b1c67263f23863f57b03fe7b02c12df48c50ab Mon Sep 17 00:00:00 2001 From: Test User Date: Fri, 6 Jul 2018 21:19:49 +0200 Subject: [PATCH 51/54] [skip ci] updated version information after successful test of v2.0.2-208-g798a9720 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 43532a7e5..a21707b59 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.2-184-gcb71e940 +v2.0.2-208-g798a9720 From d6a0f2574d703ebdc98eb3be01a0cd4adc6e8296 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 7 Jul 2018 11:36:15 +0200 Subject: [PATCH 52/54] adjusted test to leaner Abaqus wrapper without exp --- PRIVATE | 2 +- installation/mods_Abaqus/abaqus_v6_debug.env | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PRIVATE b/PRIVATE index 1581e8e53..10b35c4dd 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 1581e8e53910725bac354f5e6f5af1a6914a0a59 +Subproject commit 10b35c4dd607afecf312783e5d9279e1d1d743f3 diff --git a/installation/mods_Abaqus/abaqus_v6_debug.env b/installation/mods_Abaqus/abaqus_v6_debug.env index 76d90b7f7..de5189a52 100644 --- a/installation/mods_Abaqus/abaqus_v6_debug.env +++ b/installation/mods_Abaqus/abaqus_v6_debug.env @@ -31,7 +31,8 @@ fortCmd = "ifort" # -real-size 64 -DFLOAT=8 assume size of real to be 8 bytes, matches our definition of pReal # -integer-size 32 -DINT=4 assume size of integer to be 4 bytes, matches our definition of pInt -#-fopenmp crashes in config.f90 since presence of default string is not recognized# +# 'check pointers' does not work + compile_fortran = (fortCmd + " -c -fPIC -auto -shared-intel " + "-I%I -free -O0 -fpp " + "-ftz -diag-disable 5268 " + From 4e3cc75c1a57adcd99dc8ddf8ff4d1526a98d01d Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 7 Jul 2018 12:31:37 +0200 Subject: [PATCH 53/54] forgot rename --- src/{DAMASK_abaqus_std.f => DAMASK_abaqus.f} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{DAMASK_abaqus_std.f => DAMASK_abaqus.f} (100%) diff --git a/src/DAMASK_abaqus_std.f b/src/DAMASK_abaqus.f similarity index 100% rename from src/DAMASK_abaqus_std.f rename to src/DAMASK_abaqus.f From 5295b49ab312a655489e99da60d024eb24ed5977 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 7 Jul 2018 12:32:57 +0200 Subject: [PATCH 54/54] deallocate statements not needed not clear why global variables need check (should be allocated only once) local variables are deallocated when they go out of scope --- src/mesh.f90 | 44 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/src/mesh.f90 b/src/mesh.f90 index d5930490a..5606b656b 100644 --- a/src/mesh.f90 +++ b/src/mesh.f90 @@ -528,25 +528,6 @@ subroutine mesh_init(ip,el) write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" - if (allocated(mesh_mapFEtoCPelem)) deallocate(mesh_mapFEtoCPelem) - if (allocated(mesh_mapFEtoCPnode)) deallocate(mesh_mapFEtoCPnode) - if (allocated(mesh_node0)) deallocate(mesh_node0) - if (allocated(mesh_node)) deallocate(mesh_node) - if (allocated(mesh_element)) deallocate(mesh_element) - if (allocated(mesh_cell)) deallocate(mesh_cell) - if (allocated(mesh_cellnode)) deallocate(mesh_cellnode) - if (allocated(mesh_cellnodeParent)) deallocate(mesh_cellnodeParent) - if (allocated(mesh_ipCoordinates)) deallocate(mesh_ipCoordinates) - if (allocated(mesh_ipArea)) deallocate(mesh_ipArea) - if (allocated(mesh_ipAreaNormal)) deallocate(mesh_ipAreaNormal) - if (allocated(mesh_sharedElem)) deallocate(mesh_sharedElem) - if (allocated(mesh_ipNeighborhood)) deallocate(mesh_ipNeighborhood) - if (allocated(mesh_ipVolume)) deallocate(mesh_ipVolume) - if (allocated(mesh_nodeTwins)) deallocate(mesh_nodeTwins) - if (allocated(FE_nodesAtIP)) deallocate(FE_nodesAtIP) - if (allocated(FE_ipNeighbor)) deallocate(FE_ipNeighbor) - if (allocated(FE_cellnodeParentnodeWeights)) deallocate(FE_cellnodeParentnodeWeights) - if (allocated(FE_subNodeOnIPFace)) deallocate(FE_subNodeOnIPFace) call mesh_build_FEdata ! get properties of the different types of elements mesh_unitlength = numerics_unitlength ! set physical extent of a length unit in mesh @@ -673,11 +654,9 @@ subroutine mesh_init(ip,el) call IO_error(602_pInt,ext_msg='IP') ! selected element does not have requested IP FEsolving_execElem = [ 1_pInt,mesh_NcpElems ] ! parallel loop bounds set to comprise all DAMASK elements - if (allocated(FEsolving_execIP)) deallocate(FEsolving_execIP) allocate(FEsolving_execIP(2_pInt,mesh_NcpElems)); FEsolving_execIP = 1_pInt ! parallel loop bounds set to comprise from first IP... forall (j = 1_pInt:mesh_NcpElems) FEsolving_execIP(2,j) = FE_Nips(FE_geomtype(mesh_element(2,j))) ! ...up to own IP count for each element - if (allocated(calcMode)) deallocate(calcMode) allocate(calcMode(mesh_maxNips,mesh_NcpElems)) calcMode = .false. ! pretend to have collected what first call is asking (F = I) calcMode(ip,mesh_FEasCP('elem',el)) = .true. ! first ip,el needs to be already pingponged to "calc" @@ -803,9 +782,6 @@ subroutine mesh_build_cellconnectivity mesh_cellnodeParent(2,n) = cellnodeParent(2,n) endforall - deallocate(matchingNode2cellnode) - deallocate(cellnodeParent) - end subroutine mesh_build_cellconnectivity @@ -1390,8 +1366,6 @@ subroutine mesh_spectral_build_elements(fileUnit) mesh_maxValStateVar(2) = max(mesh_maxValStateVar(2),mesh_element(4,e)) enddo - deallocate(microstructures) - deallocate(mesh_microGlobal) if (e /= mesh_NcpElems) call IO_error(880_pInt,e) end subroutine mesh_spectral_build_elements @@ -3097,8 +3071,6 @@ subroutine mesh_build_sharedElems enddo enddo - deallocate(node_seen) - end subroutine mesh_build_sharedElems @@ -3300,12 +3272,12 @@ subroutine mesh_tell_statistics if (mesh_maxValStateVar(2) < 1_pInt) call IO_error(error_ID=180_pInt) ! no microstructure specified allocate (mesh_HomogMicro(mesh_maxValStateVar(1),mesh_maxValStateVar(2))); mesh_HomogMicro = 0_pInt -do e = 1_pInt,mesh_NcpElems - if (mesh_element(3,e) < 1_pInt) call IO_error(error_ID=170_pInt,el=e) ! no homogenization specified - if (mesh_element(4,e) < 1_pInt) call IO_error(error_ID=180_pInt,el=e) ! no microstructure specified - mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) = & - mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) + 1_pInt ! count combinations of homogenization and microstructure -enddo + do e = 1_pInt,mesh_NcpElems + if (mesh_element(3,e) < 1_pInt) call IO_error(error_ID=170_pInt,el=e) ! no homogenization specified + if (mesh_element(4,e) < 1_pInt) call IO_error(error_ID=180_pInt,el=e) ! no microstructure specified + mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) = & + mesh_HomogMicro(mesh_element(3,e),mesh_element(4,e)) + 1_pInt ! count combinations of homogenization and microstructure + enddo !$OMP CRITICAL (write2out) if (iand(myDebug,debug_levelBasic) /= 0_pInt) then write(6,'(/,a,/)') ' Input Parser: STATISTICS' @@ -3408,8 +3380,6 @@ enddo endif !$OMP END CRITICAL (write2out) - deallocate(mesh_HomogMicro) - end subroutine mesh_tell_statistics @@ -3559,8 +3529,6 @@ checkCandidateFaceTwins: do dir = 1_pInt,3_pInt endif enddo checkCandidate -deallocate(element_seen) - end subroutine mesh_faceMatch