Skip to content

Commit

Permalink
C-like bash loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinath Vadlamani committed Dec 12, 2012
1 parent 465a011 commit f53d02e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion openMp/testNestedOmp.f90 → openMp/testNestedOmp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@ program test
real(8) sum

ni=1
nj=100
!nj=100
nj=8

sum=0.d0

!$OMP PARALLEL DEFAULT(SHARED) PRIVATE(j)
!$OMP DO
do i=1,ni
#IFDEF NESTED
write(*,*) "using nesting"
!$OMP PARALLEL DEFAULT(SHARED)
!$OMP DO
#ENDIF
do j=1,nj
call work(sum)
end do
#IFDEF NESTED
!$OMP END DO
!$OMP END PARALLEL
#ENDIF
end do
!$OMP END DO
!$OMP END PARALLEL
Expand Down
5 changes: 5 additions & 0 deletions scripting/loop2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
for i in `seq 1 10`;
do
echo $i
done

0 comments on commit f53d02e

Please sign in to comment.