Skip to content

Commit

Permalink
Merge pull request #1279 from jvgeiger/fix/compiling_lis_rapid_cray
Browse files Browse the repository at this point in the history
Fix compiling LIS/RAPID with Cray compilers
  • Loading branch information
cmclaug2 authored Feb 22, 2023
2 parents 491a9ec + 60764f1 commit 59e8a58
Show file tree
Hide file tree
Showing 4 changed files with 737 additions and 701 deletions.
4 changes: 3 additions & 1 deletion env/discover/lisf_7_intel_2021.4.0_petsc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ proc ModulesHelp { } {
puts stderr "\t\tLIS_CRTM_PROF"
puts stderr "\t\tLIS_CMEM"
puts stderr "\t\tLIS_LAPACK"
puts stderr "\t\tLIS_PETSC"
puts stderr "\t\tLDT_ARCH"
puts stderr "\t\tLDT_FC"
puts stderr "\t\tLDT_CC"
Expand Down Expand Up @@ -120,7 +121,7 @@ setenv LIS_CRTM $def_lis_crtm
setenv LIS_CRTM_PROF $def_lis_crtm_prof
setenv LIS_CMEM $def_lis_cmem
setenv LIS_LAPACK $def_lis_lapack
setenv LIS_PETSc $def_lis_petsc
setenv LIS_PETSC $def_lis_petsc

setenv LDT_ARCH linux_ifc
setenv LDT_FC mpiifort
Expand Down Expand Up @@ -164,4 +165,5 @@ prepend-path LD_LIBRARY_PATH "$def_lis_hdf5/lib"
prepend-path LD_LIBRARY_PATH "$def_lis_libesmf"
prepend-path LD_LIBRARY_PATH "$def_lis_netcdf/lib"
prepend-path LD_LIBRARY_PATH "$def_lis_eccodes/lib"
prepend-path LD_LIBRARY_PATH "$def_lis_petsc/lib"
prepend-path PATH "$def_lis_netcdf/bin:$def_lis_eccodes/bin"
34 changes: 34 additions & 0 deletions lis/LICENSES/RAPID_License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Component name: RAPID router

Contributing organization/individuals: Jet Propulsion Laboratory, Pasadena, CA.

POC: Cedric H. David; Jet Propulsion Laboratory, ph: 818.354.4416

License:

From https://github.com/c-h-david/rapid/master/LICENSE commit 3508728c6c4e08fa31949bd4f035bf07dfbce752.

Copyright (c) 2007-2021, Cedric H. David

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* The name Cedric H. David may not be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL CEDRIC H. DAVID BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 changes: 7 additions & 7 deletions lis/arch/Config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,8 @@
}

if($use_petsc == 1) {
if(defined($ENV{LIS_PETSc})){
$sys_petsc_path = $ENV{LIS_PETSc};
if(defined($ENV{LIS_PETSC})){
$sys_petsc_path = $ENV{LIS_PETSC};
$inc = "/include/";
$lib = "/lib/";
$inc_petsc=$sys_petsc_path.$inc;
Expand All @@ -867,7 +867,7 @@
else {
print "--------------ERROR---------------------\n";
print "Please specify the PETSc path using\n";
print "the LIS_PETsc variable.\n";
print "the LIS_PETSC variable.\n";
print "Configuration exiting ....\n";
print "--------------ERROR---------------------\n";
exit 1;
Expand Down Expand Up @@ -1069,8 +1069,8 @@
}

if($use_petsc == 1){
$fflags = $fflags." -I\$(INC_PETSc)";
$ldflags = $ldflags." -L\$(LIB_PETSc) -Wl,-rpath,\$(LIB_PETSc) -lpetsc -lm";
$fflags = $fflags." -I\$(INC_PETSC)";
$ldflags = $ldflags." -L\$(LIB_PETSC) -lpetsc -lm";
}

if($use_esmf_trace == 1){
Expand Down Expand Up @@ -1159,8 +1159,8 @@
printf conf_file "%s%s\n","INC_CMEM = $inc_cmem";
printf conf_file "%s%s\n","LIB_CMEM = $lib_cmem";
printf conf_file "%s%s\n","LIB_LAPACK = $lib_lapack";
printf conf_file "%s%s\n","INC_PETSc = $inc_petsc";
printf conf_file "%s%s\n","LIB_PETSc = $lib_petsc";
printf conf_file "%s%s\n","INC_PETSC = $inc_petsc";
printf conf_file "%s%s\n","LIB_PETSC = $lib_petsc";
printf conf_file "%s%s\n","CFLAGS = $cflags";
printf conf_file "%s%s\n","FFLAGS77 = $fflags77";
printf conf_file "%s%s\n","FFLAGS = $fflags";
Expand Down
Loading

0 comments on commit 59e8a58

Please sign in to comment.