From cig_noreply at geodynamics.org Sun Feb 1 19:30:55 2015 From: cig_noreply at geodynamics.org (cig_noreply at geodynamics.org) Date: Mon, 2 Feb 2015 03:30:55 +0000 (UTC) Subject: [cig-commits] [commit] master: Adding the PIC flag needed to make shared library (bcc4e26) Message-ID: <20150202033055.B37AC1401A9@shell.geodynamics.org> Repository : https://github.com/geodynamics/relax On branch : master Link : https://github.com/geodynamics/relax/compare/570a8ae866a884c414e8ec4b8e41b42244121721...ccb9b49ada03b6c80429c8a8fa8eaf5b6478b2e1 >--------------------------------------------------------------- commit bcc4e2646b0fa172ff85df8402f28be154721a68 Author: sagar masuti Date: Sat Jan 31 12:09:21 2015 +0800 Adding the PIC flag needed to make shared library >--------------------------------------------------------------- bcc4e2646b0fa172ff85df8402f28be154721a68 wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index 8504cad..36ae5eb 100644 --- a/wscript +++ b/wscript @@ -76,7 +76,7 @@ def configure(cnf): # We set the flags here if not cnf.env.CFLAGS: - cnf.env.CFLAGS=['-O3'] + cnf.env.CFLAGS=['-O3', '-fPIC'] if not cnf.env.FCFLAGS: cnf.env.FCFLAGS=['-O3'] @@ -243,7 +243,7 @@ def configure(cnf): # Check for C preprocessor option frag="program main\n INTEGER :: foo\n" + "end program main\n" - cpp_flags=['-cpp','-Mpreprocess'] + cpp_flags=['-cpp','-Mpreprocess','-fpic'] if cnf.options.cpp_flag: cpp_flags=[cnf.options.cpp_flag] found_cpp=False From cig_noreply at geodynamics.org Sun Feb 1 19:30:57 2015 From: cig_noreply at geodynamics.org (cig_noreply at geodynamics.org) Date: Mon, 2 Feb 2015 03:30:57 +0000 (UTC) Subject: [cig-commits] [commit] master: Changes to relaxlite lib (855518e) Message-ID: <20150202033057.BF8021401A9@shell.geodynamics.org> Repository : https://github.com/geodynamics/relax On branch : master Link : https://github.com/geodynamics/relax/compare/570a8ae866a884c414e8ec4b8e41b42244121721...ccb9b49ada03b6c80429c8a8fa8eaf5b6478b2e1 >--------------------------------------------------------------- commit 855518ecf32fdb73f315870e67415c99009dc309 Author: sagar masuti Date: Mon Feb 2 10:56:53 2015 +0800 Changes to relaxlite lib >--------------------------------------------------------------- 855518ecf32fdb73f315870e67415c99009dc309 wscript | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wscript b/wscript index 36ae5eb..d063480 100644 --- a/wscript +++ b/wscript @@ -76,7 +76,7 @@ def configure(cnf): # We set the flags here if not cnf.env.CFLAGS: - cnf.env.CFLAGS=['-O3', '-fPIC'] + cnf.env.CFLAGS=['-O3'] if not cnf.env.FCFLAGS: cnf.env.FCFLAGS=['-O3'] @@ -243,7 +243,7 @@ def configure(cnf): # Check for C preprocessor option frag="program main\n INTEGER :: foo\n" + "end program main\n" - cpp_flags=['-cpp','-Mpreprocess','-fpic'] + cpp_flags=['-cpp','-Mpreprocess'] if cnf.options.cpp_flag: cpp_flags=[cnf.options.cpp_flag] found_cpp=False @@ -281,7 +281,7 @@ def configure(cnf): cnf.write_config_header('config.h') -def relaxlite(ctx) : +def lite(ctx) : ctx.shlib(features='c fc fcprogram', source=['src/relaxlite.f90', 'src/types.f90', @@ -305,14 +305,14 @@ def relaxlite(ctx) : install_path='${PREFIX}/bin', includes=['build'], use=['gmt','proj','openmp','fftw','imkl','cpp','length','papi','stdc++'], - target='relaxlite.so' + target='librelax.so' ) from waflib.Build import BuildContext class miracle(BuildContext): - cmd = 'relaxlite' - fun = 'relaxlite' + cmd = 'lite' + fun = 'lite' def build(bld): if bld.env.CUDA: From cig_noreply at geodynamics.org Sun Feb 1 19:30:59 2015 From: cig_noreply at geodynamics.org (cig_noreply at geodynamics.org) Date: Mon, 2 Feb 2015 03:30:59 +0000 (UTC) Subject: [cig-commits] [commit] master: makes types a include file (34ff521) Message-ID: <20150202033059.D38CB1401A9@shell.geodynamics.org> Repository : https://github.com/geodynamics/relax On branch : master Link : https://github.com/geodynamics/relax/compare/570a8ae866a884c414e8ec4b8e41b42244121721...ccb9b49ada03b6c80429c8a8fa8eaf5b6478b2e1 >--------------------------------------------------------------- commit 34ff5211921a981d6a196bd02840ccd0a7173435 Author: sagar masuti Date: Mon Feb 2 11:21:51 2015 +0800 makes types a include file >--------------------------------------------------------------- 34ff5211921a981d6a196bd02840ccd0a7173435 INSTALL | 7 +++++++ src/curelax.f90 | 1 - src/elastic3d.f90 | 2 +- src/input.f90 | 2 +- src/relax.f90 | 1 - src/relaxlite.f90 | 3 +-- src/types.f90 | 7 +------ wscript | 3 --- 8 files changed, 11 insertions(+), 15 deletions(-) diff --git a/INSTALL b/INSTALL index 6007eb3..7581f98 100644 --- a/INSTALL +++ b/INSTALL @@ -61,6 +61,13 @@ CPPFLAGS="-I/opt/GMT-4.5.7/netcdf/include" LDFLAGS="-L/usr/lib64 -lgdal" ./waf c ./waf build --------- +relax library +--------- +To configure the relax shared library +CFLAGS=-fPIC FCFLAGS=-fPIC ./waf configure --gmt-dir=/usr/local/GMT4.5.8/intel +CFLAGS=-fPIC FCFLAGS=-fPIC ./waf lite + +--------- GPU --------- To build Relax for NVIDIA GPUs on Linux, we need to provide certain command-line options diff --git a/src/curelax.f90 b/src/curelax.f90 index e689857..8dde09d 100644 --- a/src/curelax.f90 +++ b/src/curelax.f90 @@ -190,7 +190,6 @@ !------------------------------------------------------------------------ PROGRAM relax - USE types USE input USE green USE green_space diff --git a/src/elastic3d.f90 b/src/elastic3d.f90 index 454d0c7..30311d8 100644 --- a/src/elastic3d.f90 +++ b/src/elastic3d.f90 @@ -19,12 +19,12 @@ MODULE elastic3d - USE types USE fourier IMPLICIT NONE #include "include.f90" +#include "types.f90" REAL*8, PRIVATE, PARAMETER :: pi = 3.141592653589793115997963468544185161_8 REAL*8, PRIVATE, PARAMETER :: pi2 = 6.28318530717958623199592693708837032318_8 diff --git a/src/input.f90 b/src/input.f90 index 15c08c2..e4dc478 100644 --- a/src/input.f90 +++ b/src/input.f90 @@ -39,9 +39,9 @@ CONTAINS !! @param in !--------------------------------------------------------------------- SUBROUTINE init(in) - USE types USE export USE getopt_m + USE elastic3d TYPE(SIMULATION_STRUCT), INTENT(OUT) :: in diff --git a/src/relax.f90 b/src/relax.f90 index ea6c89d..6bfb6eb 100644 --- a/src/relax.f90 +++ b/src/relax.f90 @@ -190,7 +190,6 @@ !------------------------------------------------------------------------ PROGRAM relax - USE types USE input USE green USE green_space diff --git a/src/relaxlite.f90 b/src/relaxlite.f90 index fb68b29..b7ee595 100644 --- a/src/relaxlite.f90 +++ b/src/relaxlite.f90 @@ -192,8 +192,6 @@ !! - export ductile zones for cylindrical and spherical geometries !------------------------------------------------------------------------ SUBROUTINE relaxlite(in,gps,isverbose) - USE types -! USE input USE green USE green_space USE elastic3d @@ -204,6 +202,7 @@ SUBROUTINE relaxlite(in,gps,isverbose) #include "include.f90" IMPLICIT NONE + TYPE(SIMULATION_STRUCT), INTENT(INOUT) :: in TYPE(MANIFOLD_STRUCT), INTENT(OUT) :: gps(in%npts) LOGICAL, INTENT(IN) :: isverbose diff --git a/src/types.f90 b/src/types.f90 index b733b03..029f43b 100644 --- a/src/types.f90 +++ b/src/types.f90 @@ -17,10 +17,6 @@ ! along with RELAX. If not, see . !----------------------------------------------------------------------- -#include "include.f90" - -MODULE types - USE ISO_C_BINDING TYPE SOURCE_STRUCT SEQUENCE @@ -98,7 +94,7 @@ MODULE types REAL*8, DIMENSION(:), ALLOCATABLE :: s1,s2,s3 END TYPE MANIFOLD_STRUCT - TYPE, PUBLIC :: SIMULATION_STRUCT + TYPE :: SIMULATION_STRUCT ! grid dimension INTEGER :: sx1,sx2,sx3 @@ -228,4 +224,3 @@ MODULE types END TYPE SIMULATION_STRUCT -END MODULE types diff --git a/wscript b/wscript index d063480..cebcf68 100644 --- a/wscript +++ b/wscript @@ -284,7 +284,6 @@ def configure(cnf): def lite(ctx) : ctx.shlib(features='c fc fcprogram', source=['src/relaxlite.f90', - 'src/types.f90', 'src/ctfft.f', 'src/fourier.f90', 'src/green.f90', @@ -318,7 +317,6 @@ def build(bld): if bld.env.CUDA: bld.program(features='c fc fcprogram cxx', source=['src/curelax.f90', - 'src/types.f90', 'src/ctfft.f', 'src/fourier.f90', 'src/green.f90', @@ -346,7 +344,6 @@ def build(bld): else: bld.program(features='c fc fcprogram', source=['src/relax.f90', - 'src/types.f90', 'src/ctfft.f', 'src/fourier.f90', 'src/green.f90', From cig_noreply at geodynamics.org Sun Feb 1 19:31:02 2015 From: cig_noreply at geodynamics.org (cig_noreply at geodynamics.org) Date: Mon, 2 Feb 2015 03:31:02 +0000 (UTC) Subject: [cig-commits] [commit] master: Merge branch 'master' of https://github.com/geodynamics/relax (ccb9b49) Message-ID: <20150202033102.11FD61401A9@shell.geodynamics.org> Repository : https://github.com/geodynamics/relax On branch : master Link : https://github.com/geodynamics/relax/compare/570a8ae866a884c414e8ec4b8e41b42244121721...ccb9b49ada03b6c80429c8a8fa8eaf5b6478b2e1 >--------------------------------------------------------------- commit ccb9b49ada03b6c80429c8a8fa8eaf5b6478b2e1 Merge: 34ff521 570a8ae Author: sagar masuti Date: Mon Feb 2 11:24:09 2015 +0800 Merge branch 'master' of https://github.com/geodynamics/relax >--------------------------------------------------------------- ccb9b49ada03b6c80429c8a8fa8eaf5b6478b2e1 wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)