Building Spack Baselibs: Difference between revisions

From GEOS-5
Jump to navigation Jump to search
Initial commit
 
Add some steps
Line 2: Line 2:


== Get Spack ==
== Get Spack ==
$ git clone https://github.com/spack/spack.git
$ cd spack
$ git checkout features/use-module-interface


== Set up spack config directory ==
== Set up spack config directory ==


Look here: https://github.com/mathomp4/parcel-spack-config
== Commands used in testing ==
$ spack install libelf%gcc@8.2.0
$ spack install hdf
$ spack install hdf5
$ spack install netcdf-fortran
I then edited the esmf package:
<syntaxhighlight lang="diff">
diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py
index ce60c4b1f..107dcd3c6 100644
--- a/var/spack/repos/builtin/packages/esmf/package.py
+++ b/var/spack/repos/builtin/packages/esmf/package.py
@@ -17,6 +17,7 @@ class Esmf(MakefilePackage):
    homepage = "https://www.earthsystemcog.org/projects/esmf/"
    url      = "http://www.earthsystemmodeling.org/esmf_releases/non_public/ESMF_7_0_1/esmf_7_0_1_src.tar.gz"
+    version('8.0.0b14', '9750fc781e785f877c1dd3cc4f88898989eb01fb9ba06df04afb1ad2e0b36e3a')
    version('7.0.1', 'd3316ea79b032b8fb0cd40e5868a0261')
    variant('mpi',    default=True,  description='Build with MPI support')
@@ -52,14 +53,15 @@ class Esmf(MakefilePackage):
    # Allow different directories for creation and
    # installation of dynamic libraries on OSX:
-    patch('darwin_dylib_install_name.patch', when='platform=darwin')
+    #patch('darwin_dylib_install_name.patch', when='platform=darwin')
+    patch('darwin_dylib_install_name.8.0.0b14.patch', when='platform=darwin')
    # Make script from mvapich2.patch executable
-    @run_before('build')
-    @when('@:7.0.99')
-    def chmod_scripts(self):
-        chmod = which('chmod')
-        chmod('+x', 'scripts/libs.mvapich2f90')
+    #@run_before('build')
+    #@when('@:7.0.99')
+    #def chmod_scripts(self):
+        #chmod = which('chmod')
+        #chmod('+x', 'scripts/libs.mvapich2f90')


    def url_for_version(self, version):
        return "http://www.earthsystemmodeling.org/esmf_releases/non_public/ESMF_{0}/esmf_{0}_src.tar.gz".format(version.underscored)
</syntaxhighlight>


[[Category:Baselibs]]
[[Category:Baselibs]]
[[Category:SI Team]]
[[Category:SI Team]]

Revision as of 13:27, 2 January 2019

Get Spack

$ git clone https://github.com/spack/spack.git
$ cd spack
$ git checkout features/use-module-interface

Set up spack config directory

Look here: https://github.com/mathomp4/parcel-spack-config

Commands used in testing

$ spack install libelf%gcc@8.2.0
$ spack install hdf
$ spack install hdf5
$ spack install netcdf-fortran

I then edited the esmf package:

diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py
index ce60c4b1f..107dcd3c6 100644
--- a/var/spack/repos/builtin/packages/esmf/package.py
+++ b/var/spack/repos/builtin/packages/esmf/package.py
@@ -17,6 +17,7 @@ class Esmf(MakefilePackage):
     homepage = "https://www.earthsystemcog.org/projects/esmf/"
     url      = "http://www.earthsystemmodeling.org/esmf_releases/non_public/ESMF_7_0_1/esmf_7_0_1_src.tar.gz"

+    version('8.0.0b14', '9750fc781e785f877c1dd3cc4f88898989eb01fb9ba06df04afb1ad2e0b36e3a')
     version('7.0.1', 'd3316ea79b032b8fb0cd40e5868a0261')

     variant('mpi',     default=True,  description='Build with MPI support')
@@ -52,14 +53,15 @@ class Esmf(MakefilePackage):

     # Allow different directories for creation and
     # installation of dynamic libraries on OSX:
-    patch('darwin_dylib_install_name.patch', when='platform=darwin')
+    #patch('darwin_dylib_install_name.patch', when='platform=darwin')
+    patch('darwin_dylib_install_name.8.0.0b14.patch', when='platform=darwin')

     # Make script from mvapich2.patch executable
-    @run_before('build')
-    @when('@:7.0.99')
-    def chmod_scripts(self):
-        chmod = which('chmod')
-        chmod('+x', 'scripts/libs.mvapich2f90')
+    #@run_before('build')
+    #@when('@:7.0.99')
+    #def chmod_scripts(self):
+        #chmod = which('chmod')
+        #chmod('+x', 'scripts/libs.mvapich2f90')

     def url_for_version(self, version):
         return "http://www.earthsystemmodeling.org/esmf_releases/non_public/ESMF_{0}/esmf_{0}_src.tar.gz".format(version.underscored)