10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2025-01-02 17:45:41 +01:00

Codelet OK

This commit is contained in:
Anthony Scemama 2017-07-11 21:05:56 +02:00
parent 9c233e0362
commit 057238ede8
10 changed files with 40 additions and 24 deletions

View File

@ -1,7 +1,12 @@
IRPF90= ../bin/irpf90 -d # make | ninja
IRPF90FLAGS= -I input/ ##############
# Make | Ninja
BUILD_SYSTEM= make BUILD_SYSTEM= ninja
#######
IRPF90= ../bin/irpf90
IRPF90FLAGS= -I input --codelet=v:100
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
@ -10,8 +15,8 @@ SRC =
OBJ = OBJ =
# Compiler ! Will be overwriten by the ENV one if avalaible. # Compiler ! Will be overwriten by the ENV one if avalaible.
FC ?= gfortran-6 FC =ifort
FCFLAGS ?= -O2 FCFLAGS ?= -O2
CC ?= gcc CC ?= gcc
CFLAGS ?= -O2 CFLAGS ?= -O2
@ -33,17 +38,18 @@ CXXFLAGS ?= -O2
# | | I _________ # | | I _________
# | | I c(` ')o # | | I c(` ')o
# | l I \. ,/ # | l I \. ,/
# _/j L l\_! _// # _/j L l\_! _// \\_
#Misc #Misc
AR ?= AR ?=
RANLIB ?= RANLIB ?=
# Variable need by IRPF90 # Variable need by IRPF90
ifeq ($(BUILD_SYSTEM),ninja) BUILD_SYSTEM_stripped=$(strip $(BUILD_SYSTEM))
ifeq ($(BUILD_SYSTEM_stripped),ninja)
BUILD_FILE=IRPF90_temp/build.ninja BUILD_FILE=IRPF90_temp/build.ninja
IRPF90FLAGS += -j IRPF90FLAGS += -j
else ifeq ($(BUILD_SYSTEM),make) else ifeq ($(BUILD_SYSTEM_stripped),make)
BUILD_FILE=IRPF90_temp/build.make BUILD_FILE=IRPF90_temp/build.make
BUILD_SYSTEM += -j BUILD_SYSTEM += -j
else else
@ -60,7 +66,7 @@ ARCH = $(addprefix $(CURDIR)/,IRPF90_temp/irpf90.a)
all: $(EXE) all: $(EXE)
define run define run
$(BUILD_SYSTEM) -C $(dir $(BUILD_FILE) ) -f $(notdir $(BUILD_FILE) ) $(1) $(BUILD_SYSTEM_stripped) -C $(dir $(BUILD_FILE) ) -f $(notdir $(BUILD_FILE) ) $(1)
endef endef
#We allow for the user to ask for 'relative' path #We allow for the user to ask for 'relative' path

View File

@ -1,6 +1,6 @@
program irp_example2 program irp_example2
print *, "Example 2" print *, "Example 2"
print *, 't = ', t print *, 'v = ', v
IRP_WRITE t IRP_WRITE t

View File

@ -27,5 +27,5 @@ END_PROVIDER
INTEGER function fu(x,y) INTEGER function fu(x,y)
INTEGER, INTENT(in) :: x,y INTEGER, INTENT(in) :: x,y
fu = int(x+y+1+3) fu = x+y+1
END FUNCTION END FUNCTION

View File

@ -413,9 +413,13 @@ def run(d_module, ninja):
l_irp_sup_o += ["irp_locks.irp.o"] l_irp_sup_o += ["irp_locks.irp.o"]
l_irp_sup_s += ["irp_locks.irp.F90"] l_irp_sup_s += ["irp_locks.irp.F90"]
if command_line.do_profile or command_line.do_codelet:
l_irp_sup_o += ["irp_rdtsc.o"]
l_irp_sup_s += ["irp_rdtsc.c"]
if command_line.do_profile: if command_line.do_profile:
l_irp_sup_o += ["irp_profile.irp.o", "irp_rdtsc.o"] l_irp_sup_o += ["irp_profile.irp.o"]
l_irp_sup_s += ["irp_profile.irp.F90", "irp_rdtsc.c"] l_irp_sup_s += ["irp_profile.irp.F90"]
l_irp_sup_o = map(dress, l_irp_sup_o) l_irp_sup_o = map(dress, l_irp_sup_o)
l_irp_sup_s = map(dress, l_irp_sup_s) l_irp_sup_s = map(dress, l_irp_sup_s)

View File

@ -294,7 +294,7 @@ class Irpy_comm_world(object):
from util import lazy_write_file from util import lazy_write_file
from util import ashes_env from util import ashes_env
str_ = ashes_env.render('irp_stack.F90', { str_ = ashes_env.render('irp_stack.f90', {
'do_debug': command_line.do_debug, 'do_debug': command_line.do_debug,
'do_openmp': command_line.do_openmp, 'do_openmp': command_line.do_openmp,
'do_memory': command_line.do_memory 'do_memory': command_line.do_memory
@ -318,6 +318,6 @@ class Irpy_comm_world(object):
from util import lazy_write_file from util import lazy_write_file
from util import ashes_env from util import ashes_env
str_ = ashes_env.render('irp_lock.F90', {'entity': sorted(self.d_entity)}) str_ = ashes_env.render('irp_lock.f90', {'entity': sorted(self.d_entity)})
filename = os.path.join(irpf90_t.irpdir, 'irp_locks.irp.F90') filename = os.path.join(irpf90_t.irpdir, 'irp_locks.irp.F90')
lazy_write_file(filename, str_) lazy_write_file(filename, str_)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,12 @@
# make | ninja
##############
BUILD_SYSTEM= {BUILD_SYSTEM}
#######
IRPF90= irpf90 IRPF90= irpf90
IRPF90FLAGS= {irpf90_flags} IRPF90FLAGS= {irpf90_flags}
# Make | Ninja
BUILD_SYSTEM= {BUILD_SYSTEM}
.EXPORT_ALL_VARIABLES: .EXPORT_ALL_VARIABLES:
@ -33,17 +38,18 @@ CXXFLAGS ?= {CXXFLAGS}
# | | I _________ # | | I _________
# | | I c(` ')o # | | I c(` ')o
# | l I \. ,/ # | l I \. ,/
# _/j L l\_! _// # _/j L l\_! _// \\_
#Misc #Misc
AR ?= {ar} AR ?= {ar}
RANLIB ?= {ranlib} RANLIB ?= {ranlib}
# Variable need by IRPF90 # Variable need by IRPF90
ifeq ($(BUILD_SYSTEM),ninja) BUILD_SYSTEM_stripped=$(strip $(BUILD_SYSTEM))
ifeq ($(BUILD_SYSTEM_stripped),ninja)
BUILD_FILE=IRPF90_temp/build.ninja BUILD_FILE=IRPF90_temp/build.ninja
IRPF90FLAGS += -j IRPF90FLAGS += -j
else ifeq ($(BUILD_SYSTEM),make) else ifeq ($(BUILD_SYSTEM_stripped),make)
BUILD_FILE=IRPF90_temp/build.make BUILD_FILE=IRPF90_temp/build.make
BUILD_SYSTEM += -j BUILD_SYSTEM += -j
else else
@ -60,7 +66,7 @@ ARCH = $(addprefix $(CURDIR)/,IRPF90_temp/irpf90.a)
all: $(EXE) all: $(EXE)
define run define run
$(BUILD_SYSTEM) -C $(dir $(BUILD_FILE) ) -f $(notdir $(BUILD_FILE) ) $(1) $(BUILD_SYSTEM_stripped) -C $(dir $(BUILD_FILE) ) -f $(notdir $(BUILD_FILE) ) $(1)
endef endef
#We allow for the user to ask for 'relative' path #We allow for the user to ask for 'relative' path

View File

@ -59,12 +59,12 @@ SUBROUTINE reader_{name}(irp_num)
END DO END DO
{#group_entity} {#group_entity}
OPEN(UNIT=irp_iunit,file='irpf90_{name}_'//trim(irp_num),FORM='FORMATTED',STATUS='UNKNOWN',ACTION='WRITE') OPEN(UNIT=irp_iunit,file='irpf90_{name}_'//trim(irp_num),FORM='FORMATTED',STATUS='OLD',ACTION='READ')
READ(irp_iunit,*) {name}{dim} READ(irp_iunit,*) {name}{dim}
CLOSE(irp_iunit) CLOSE(irp_iunit)
{/group_entity} {/group_entity}
CALL touch_{name} CALL touch_{same_as}
{?do_debug} CALL irp_leave(irp_here) {/do_debug} {?do_debug} CALL irp_leave(irp_here) {/do_debug}
END SUBROUTINE reader_{name} END SUBROUTINE reader_{name}