Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coon, Ethan
ELM_Kernels
Commits
5bd99530
Commit
5bd99530
authored
May 14, 2019
by
Ethan Coon
Browse files
tweaks to makefile system to allow building fortran and cc kernels independently
parent
1cb78687
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
5bd99530
SRCDIR
=
.
OBJECT
=
.
.PHONY
:
cc fortran
default
:
all
all
:
all
:
cc fortran
cc
:
$(MAKE)
-C
cc all
fortran
:
$(MAKE)
-C
fortran all
clean
:
$(MAKE)
-C
cc clean
$(MAKE)
-C
fortran clean
allclean
:
$(MAKE)
-C
cc clean
$(MAKE)
-C
fortran clean
src/cc/Makefile
View file @
5bd99530
...
...
@@ -7,9 +7,9 @@ include $(OBJECT)config/Makefile.config
# Order is important due to .mod file creation
OBJS
=
CanopyHydrology_Interception.cc.o
\
CanopyHydrology_FracWet.cc.o
\
CanopyHydrology_FracH2OSfc.cc.o
OBJS
=
CanopyHydrology_Interception.cc.o
\
CanopyHydrology_FracWet.cc.o
\
CanopyHydrology_FracH2OSfc.cc.o
all
:
$(OBJS)
$(AR)
cr libelm.a
$(OBJS)
...
...
src/config/Makefile.config
View file @
5bd99530
# Available from: git clone https://code.ornl.gov/isp/acme_inputdata
ELM_DATA_LOCATION
= /
home
/
7
hp
/
Downloads
/
acme_inputdata
ELM_DATA_LOCATION
?
= /
home
/
7
hp
/
Downloads
/
acme_inputdata
# assumes you have a working NETCDF. This can easily be the version built by
# ATS as a part of an ATS installation.
NETCDF_ROOT
= ${
AMANZI_TPLS_DIR
}
NETCDF_ROOT
?
= ${
AMANZI_TPLS_DIR
}
# assumes you have a working fortran and c++ compilers with libraries
FC
=
gfortran
...
...
tests/tests_c_f/Makefile
View file @
5bd99530
...
...
@@ -20,7 +20,7 @@ EXEC_TESTS = CanopyHydrology_kern1_single \
default
:
all
all
:
links
library $(TESTS)
all
:
library $(TESTS)
test
:
$(EXEC_TESTS)
python ../compare_to_gold.py
$(TESTS)
...
...
@@ -54,4 +54,4 @@ links:
$(MAKE)
-C
../links links
library
:
$(MAKE)
-C
$(OBJECT)
all
$(MAKE)
-C
$(OBJECT)
fortran
tests/tests_f/CanopyHydrology_kern1_single.F90
View file @
5bd99530
...
...
@@ -93,13 +93,11 @@ program CanopyHydrology_kern1_single
stop
contains
subroutine
err_handle
(
status
)
integer
::
status
print
*
,
'error '
,
status
stop
end
subroutine
err_handle
subroutine
err_handle
(
status
)
use
netcdf
integer
::
status
print
*
,
'error '
,
status
,
nf90_strerror
(
status
)
stop
end
subroutine
err_handle
end
program
tests/tests_f/CanopyHydrology_module.F90
View file @
5bd99530
...
...
@@ -166,13 +166,11 @@ program test_CanopyHydrology_module
stop
contains
subroutine
err_handle
(
status
)
integer
(
i4
)
::
status
print
*
,
'error '
,
status
subroutine
err_handle
(
status
)
use
netcdf
integer
::
status
print
*
,
'error '
,
status
,
nf90_strerror
(
status
)
stop
end
subroutine
err_handle
subroutine
get_forcing_data
(
filename
,
asurfcell
)
...
...
tests/tests_f/Makefile
View file @
5bd99530
...
...
@@ -18,7 +18,7 @@ EXEC_TESTS = CanopyHydrology_kern1_single \
default
:
all
all
:
links
library $(TESTS)
all
:
library $(TESTS)
test
:
$(EXEC_TESTS)
python ../compare_to_gold.py
$(TESTS)
...
...
@@ -52,4 +52,4 @@ links:
$(MAKE)
-C
../links links
library
:
$(MAKE)
-C
$(OBJECT)
all
$(MAKE)
-C
$(OBJECT)
fortran
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment