Skip to content

Commit

Permalink
update makefile to get rid of main.o - not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
cbcoutinho committed Nov 10, 2016
1 parent f03128a commit 11f5378
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ $(OBJ)/lib_array.o: $(FORTRANLIB_SRC)/lib_array.f90
$(OBJ)/misc.o: $(SRC)/misc.f90
$(FF) $(FFLAGS) -J$(OBJ) -c -o $@ $<

$(OBJ)/main.o: $(SRC)/main.f90 $(objects)
$(FF) $(FFLAGS) -I$(RK_OBJ) -I$(OBJ) -c -o $@ $^ $(rk_objects)

$(BIN)/main: $(OBJ)/main.o $(objects) $(rk_objects)
$(BIN)/main: $(SRC)/main.f90 $(objects) $(rk_objects)
$(FF) $(FFLAGS) -I$(RK_OBJ) -I$(OBJ) -o $@ $+ $(FLIBS)

clean:
Expand Down
18 changes: 12 additions & 6 deletions src/test/src/main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ program main
real(wp), dimension(n) :: y0
real(wp), dimension(num_t,n) :: y

open(unit=22, file='raw.out', iostat=ios, status="replace", action="write")
if ( ios /= 0 ) stop "Error opening file 22"

! Set time vector `t`
t0 = 0.0_wp
Expand All @@ -28,24 +26,32 @@ program main
! y0 = [0._wp, 1._wp, 0._wp]
y(1,:) = y0

write(22,*) t0, 0._wp, y0


open(unit=22, file='raw.out', iostat=ios, status="replace", action="write")
if ( ios /= 0 ) stop "Error opening file 22"

write(22,*) t0, 0._wp, y0
call rk_wrapper(n, num_t, t, y, mysub)

close(unit=22, iostat=ios)
if ( ios /= 0 ) stop "Error closing file unit 22"







open(unit=21, file='data.out', iostat=ios, status="replace", action="write")
if ( ios /= 0 ) stop "Error opening file 21"


do ii = 1, num_t
write(21,*) t(ii), y(ii, :)
end do

close(unit=21, iostat=ios)
if ( ios /= 0 ) stop "Error closing file unit 21"

close(unit=22, iostat=ios)
if ( ios /= 0 ) stop "Error closing file unit 22"

end program main

0 comments on commit 11f5378

Please sign in to comment.