Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
ifort compiler adjustment
Browse files Browse the repository at this point in the history
    - makefile with libraries in correct order
    - small errors corrected

Signed-off-by: Guillaume Ducrozet <guillaume.ducrozet@ec-nantes.fr>
  • Loading branch information
gducrozet committed Dec 18, 2014
1 parent 639907c commit 4f1f09b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 26 deletions.
14 changes: 8 additions & 6 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
LOCDIR =.

SRCDIR =$(LOCDIR)/sources/HOS/
SRCDIR2=$(LOCDIR)/sources/utilities/
OBJDIR =$(LOCDIR)/obj/
LIBDIR=/usr/local/lib/
BINDIR=$(LOCDIR)/bin/
SRCDIR = $(LOCDIR)/sources/HOS/
SRCDIR2 = $(LOCDIR)/sources/utilities/
OBJDIR = $(LOCDIR)/obj/
LIBDIR = /usr/local/lib/
BINDIR = $(LOCDIR)/bin/
LINKLIB = $(LIBDIR)libfftw3.a $(LIBDIR)liblapack.a $(LIBDIR)librefblas.a
## ifort compiler
#FC=ifort
##
Expand Down Expand Up @@ -73,7 +74,7 @@ Objlink = $(addprefix $(OBJDIR), $(addsuffix .o, $(module))) $(addprefix $(OBJDI

# rule to link the program
$(BINDIR)$(nomcode): $(SRCDIR)$(nomcode:%=%.f90) $(Objlink) $(OBJDIR).depend
$(FC) $(FFLAGS2) -o $(BINDIR)$(nomcode) $(SRCDIR)$(nomcode:%=%.f90) $(Objlink) $(LIBDIR)libfftw3.a $(LIBDIR)librefblas.a $(LIBDIR)liblapack.a
$(FC) $(FFLAGS2) -o $(BINDIR)$(nomcode) $(SRCDIR)$(nomcode:%=%.f90) $(Objlink) $(LINKLIB)

# now comes a meta-rule for compiling any "f90" source file.
$(OBJDIR)%.o: $(SRCDIR)%.f90 $(OBJDIR).depend
Expand All @@ -93,6 +94,7 @@ clean:
depend $(OBJDIR).depend:
@if test -d bin; then echo "bin/ exists"; else mkdir bin; fi
@if test -d obj; then echo "obj/ exists"; else mkdir obj; fi
@if test -d bin/Results; then echo "exists"; else mkdir bin/Results; fi
rm -f $(OBJDIR).depend
makedepf90 -b $(OBJDIR) $(SRCS) > $(OBJDIR).depend

Expand Down
16 changes: 8 additions & 8 deletions makefile_test_W_DYue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
LOCDIR =.

OBJDIR=$(LOCDIR)/obj/
#LIBDIR=$(LOCDIR)/lib/
LIBDIR=/usr/local/lib/
BINDIR=$(LOCDIR)/bin/
SRCDIR =$(LOCDIR)/sources/HOS/
SRCDIR2=$(LOCDIR)/sources/utilities/
SRCDIR3=$(LOCDIR)/sources/Benchmark/
OBJDIR = $(LOCDIR)/obj/
LIBDIR = /usr/local/lib/
BINDIR = $(LOCDIR)/bin/
SRCDIR = $(LOCDIR)/sources/HOS/
SRCDIR2 = $(LOCDIR)/sources/utilities/
SRCDIR3 = $(LOCDIR)/sources/Benchmark/
LINKLIB = $(LIBDIR)libfftw3.a $(LIBDIR)liblapack.a $(LIBDIR)librefblas.a
## ifort compiler
#FC=ifort
##
Expand Down Expand Up @@ -68,7 +68,7 @@ Objlink = $(addprefix $(OBJDIR), $(addsuffix .o, $(module))) $(addprefix $(OBJDI

# rule to link the program
$(BINDIR)$(nomcode): $(SRCDIR3)$(nomcode:%=%.f90) $(Objlink) $(OBJDIR).depend2
$(FC) $(FFLAGS2) -o $(BINDIR)$(nomcode) $(SRCDIR3)$(nomcode:%=%.f90) $(Objlink) $(LIBDIR)libfftw3.a $(LIBDIR)librefblas.a $(LIBDIR)liblapack.a
$(FC) $(FFLAGS2) -o $(BINDIR)$(nomcode) $(SRCDIR3)$(nomcode:%=%.f90) $(Objlink) $(LINKLIB)

# now comes a meta-rule for compiling any "f90" source file.
$(OBJDIR)%.o: $(SRCDIR)%.f90 $(OBJDIR).depend2
Expand Down
2 changes: 1 addition & 1 deletion sources/Benchmark/check_W_DYue.f90
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ program check_W_DYue
REAL(RP) :: pioxlen, k2, spatial_ref, thkh, angle
REAL(RP) :: dely, pioylen
INTEGER :: Mo2, part
INTEGER :: i1, i2, j, ideep, Nd1o2, err_x, err_y, err_xy, index
INTEGER :: i1, i2, j, ideep, Nd1o2, err_x, err_y, err_xy
!
! Adaptive Time Step Runge Kutta scheme
TYPE(RK_parameters) :: RK_param
Expand Down
6 changes: 3 additions & 3 deletions sources/HOS/HOS-ocean.f90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ program HOS_ocean
INTEGER :: i1, i2, j, iCPUtime, jj
REAL(RP) :: energy(4)
!
REAL(RP) :: time, t_i, t_f, time_cur, t_tot, time_next, t_i_indiv, t_f_indiv
REAL(RP) :: t_i, t_f, time_cur, t_tot, time_next, t_i_indiv, t_f_indiv
REAL(RP) :: dt_out, dt_rk4, dt, h_rk, h_loc, dt_lin
INTEGER :: n_rk, n_rk_tot, n_error, n_er_tot
INTEGER :: n_hour, n_min, n_sec
Expand Down Expand Up @@ -393,7 +393,7 @@ program HOS_ocean
WRITE(*,*) dt_out, dt_rk4, dt_lin
!
! Initial solution
CALL initiate(time, eta, phis, RK_param)
CALL initiate(time_cur, eta, phis, RK_param)
!
! keeping only n1c and n2c modes
CALL space_2_fourier(eta, a_eta)
Expand Down Expand Up @@ -441,7 +441,7 @@ program HOS_ocean
!
! Output files
!
CALL init_output(i_3d=i_3d, i_a=i_a_3d, i_vol=1, i_disp=0, i_2D=i_2d, i_max=0, i_prob=i_prob, i_sw=i_sw)
CALL init_output(i_3d=i_3d, i_a=i_a_3d, i_vol=1, i_2D=i_2d, i_max=0, i_prob=i_prob, i_sw=i_sw)
!
! Analytical integration of the linear part
! Evaluates the modal amplitudes (FT)
Expand Down
4 changes: 2 additions & 2 deletions sources/HOS/output.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ MODULE output
!
!
!
SUBROUTINE init_output(i_3d, i_a, i_vol, i_disp, i_2D, i_max, i_prob, i_sw)
SUBROUTINE init_output(i_3d, i_a, i_vol, i_2D, i_max, i_prob, i_sw)
!
IMPLICIT NONE
!
! Input variables
INTEGER, INTENT(IN) :: i_3d, i_a, i_vol, i_disp, i_2D, i_max, i_prob, i_sw
INTEGER, INTENT(IN) :: i_3d, i_a, i_vol, i_2D, i_max, i_prob, i_sw
! Local variables
INTEGER :: i1, i2
!
Expand Down
13 changes: 7 additions & 6 deletions sources/PostProcessing/makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
LOCDIR =.

SRCDIR =$(LOCDIR)/
SRCDIR2=$(LOCDIR)/../utilities/
OBJDIR =$(LOCDIR)/obj/
LIBDIR=/usr/local/lib/
BINDIR=$(LOCDIR)/bin/
SRCDIR = $(LOCDIR)/
SRCDIR2 = $(LOCDIR)/../utilities/
OBJDIR = $(LOCDIR)/obj/
LIBDIR = /usr/local/lib/
BINDIR = $(LOCDIR)/bin/
LINKLIB = $(LIBDIR)libfftw3.a
## ifort compiler
#FC=ifort
##
Expand Down Expand Up @@ -64,7 +65,7 @@ Objlink = $(addprefix $(OBJDIR), $(addsuffix .o, $(module))) $(addprefix $(OBJDI

# rule to link the program
$(BINDIR)$(nomcode): $(SRCDIR)$(nomcode:%=%.f90) $(Objlink) $(OBJDIR).depend
$(FC) $(FFLAGS2) -o $(BINDIR)$(nomcode) $(SRCDIR)$(nomcode:%=%.f90) $(Objlink) $(LIBDIR)libfftw3.a $(LIBDIR)librefblas.a $(LIBDIR)liblapack.a
$(FC) $(FFLAGS2) -o $(BINDIR)$(nomcode) $(SRCDIR)$(nomcode:%=%.f90) $(Objlink) $(LINKLIB)

# now comes a meta-rule for compiling any "f90" source file.
$(OBJDIR)%.o: $(SRCDIR)%.f90 $(OBJDIR).depend
Expand Down

0 comments on commit 4f1f09b

Please sign in to comment.