From c47b99bf7d1b0796adc6da9ddeac70e73c2200af Mon Sep 17 00:00:00 2001 From: tTh Date: Sun, 7 May 2023 23:46:45 +0200 Subject: [PATCH] moving a module --- RandomStuff/Makefile | 6 +----- RandomStuff/essai.f90 | 21 --------------------- RandomStuff/mathstuff2.f90 | 33 --------------------------------- 3 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 RandomStuff/essai.f90 delete mode 100644 RandomStuff/mathstuff2.f90 diff --git a/RandomStuff/Makefile b/RandomStuff/Makefile index 654d286..f2e0f63 100644 --- a/RandomStuff/Makefile +++ b/RandomStuff/Makefile @@ -4,17 +4,13 @@ GFOPT = -Wall -Wextra -g -time -all: essai displaykinds +all: displaykinds # ----------------------------------------------------- -mathstuff2.o: mathstuff2.f90 Makefile - gfortran $(GFOPT) -c $< # ----------------------------------------------------- -essai: essai.f90 Makefile mathstuff2.o - gfortran $(GFOPT) $< mathstuff2.o -o $@ displaykinds: displaykinds.f90 Makefile gfortran $(GFOPT) $< -o $@ diff --git a/RandomStuff/essai.f90 b/RandomStuff/essai.f90 deleted file mode 100644 index a520c3e..0000000 --- a/RandomStuff/essai.f90 +++ /dev/null @@ -1,21 +0,0 @@ -program essai - - use mathstuff2 - implicit none - - integer :: foo, bar - real :: quux - double precision :: somme - - write(0, *) "----------------- essai -------------------" - - call init_random_seed() ! in module 'mathstuff' - somme = 0.0 - do foo=1, 500 - quux = rand() + rand() - somme = somme + quux - bar = mod(irand(), 7) - print *, foo, quux, somme/foo, bar - enddo - -end program diff --git a/RandomStuff/mathstuff2.f90 b/RandomStuff/mathstuff2.f90 deleted file mode 100644 index 9ce2575..0000000 --- a/RandomStuff/mathstuff2.f90 +++ /dev/null @@ -1,33 +0,0 @@ -module mathstuff2 - -! XXX This module was a copy of mathstuff.f90 fromthe BloubWorld -! XXX wil be moved in an other place some day... - - implicit none - contains - - ! ---------------------------------------------------------------- - ! really quick'n'dirty hack - ! not really tested yet... - - subroutine init_random_seed() - - integer, dimension(3) :: tarray - integer :: t3, foo - real :: dummy - call itime(tarray) - t3 = 3600*tarray(1) + 60*tarray(2) + tarray(3) - ! write(0, '(A,3I3,A,I6)') "sranding: ", tarray, " --> ", t3 - call srand(t3) - - ! after initializing the random generator engine, - ! you MUST use it for initializing the initializer - do foo=1, tarray(1)+5 - dummy = rand() - enddo - - end subroutine - - ! ---------------------------------------------------------------- -end module mathstuff2 -