Skip to content

Commit

Permalink
Merge branch 'origin/oksanaguba/homme/compy-cmake-file' into next (PR #…
Browse files Browse the repository at this point in the history
…3117)

Adding cmake cache files for compy intel and pgi.
Fixes for cxx building and for a linker for building with cime.

Fixes #3225 .

[bfb] for the machines we run on.
  • Loading branch information
oksanaguba committed Oct 30, 2019
2 parents 9751a57 + 4dd7a25 commit 93b005f
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 4 deletions.
4 changes: 4 additions & 0 deletions cime/config/e3sm/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,10 @@ for mct, etc.
<append DEBUG="FALSE"> -O2 </append>
<append MODEL="gptl"> -DHAVE_SLASHPROC </append>
</CFLAGS>
<CXX_LIBS>
<base>-lstdc++</base>
</CXX_LIBS>
<CXX_LINKER>FORTRAN</CXX_LINKER>
<CONFIG_ARGS>
<base> --host=Linux </base>
</CONFIG_ARGS>
Expand Down
3 changes: 0 additions & 3 deletions components/homme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ ELSE()
FIND_PACKAGE(LAPACK REQUIRED)
ELSE()
SET(HOMME_FIND_BLASLAPACK FALSE)
# Build the blas and lapack provided with homme
ADD_SUBDIRECTORY(libs/blas)
ADD_SUBDIRECTORY(libs/lapack)
ENDIF()
ENDIF()

Expand Down
20 changes: 20 additions & 0 deletions components/homme/cmake/machineFiles/compy-intel.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

SET(CMAKE_C_COMPILER "mpiicc" CACHE STRING "")
SET(CMAKE_CXX_COMPILER "mpiicpc" CACHE STRING "")
SET(CMAKE_Fortran_COMPILER "mpiifort" CACHE STRING "")

SET (WITH_PNETCDF FALSE CACHE FILEPATH "")

SET (NETCDF_DIR "$ENV{NETCDF_ROOT}" CACHE STRING "")

#is there a better way? without this linker does not see C netcdf library
SET (ADD_LINKER_FLAGS "-L/$ENV{NETCDF_ROOT}/lib -lnetcdff -lnetcdf" CACHE STRING "")
SET (ADD_Fortran_FLAGS "-traceback" CACHE STRING "")

SET (USE_MPIEXEC "srun" CACHE STRING "")
SET (USE_MPI_OPTIONS " --mpi=pmi2 --kill-on-bad-exit --cpu_bind=cores" CACHE STRING "")
SET (HOMME_USE_MKL "TRUE" CACHE FILEPATH "") # for Intel
SET (USE_QUEUING FALSE CACHE BOOL "")
# for standalone HOMME builds:
#SET (CPRNC_DIR /lcrc/group/acme/tools/cprnc CACHE FILEPATH "")

20 changes: 20 additions & 0 deletions components/homme/cmake/machineFiles/compy-pgi.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# O. Guba 08/2019
#module purge

SET(CMAKE_C_COMPILER "mpipgcc" CACHE STRING "")
SET(CMAKE_CXX_COMPILER "mpipgcxx" CACHE STRING "")
SET(CMAKE_Fortran_COMPILER "mpipgf90" CACHE STRING "")

SET (WITH_PNETCDF FALSE CACHE FILEPATH "")

SET (NETCDF_DIR "$ENV{NETCDF_ROOT}" CACHE STRING "")

#is there a better way? without this linker does not see C netcdf library
SET (ADD_LINKER_FLAGS "-L/$ENV{MKLROOT}/lib/intel64 -L/$ENV{NETCDF_ROOT}/lib -lnetcdff -lnetcdf -lmkl_rt" CACHE STRING "")
SET (ADD_Fortran_FLAGS "-traceback" CACHE STRING "")

SET (USE_MPIEXEC "srun" CACHE STRING "")
SET (USE_MPI_OPTIONS "--mpi=pmi2 --kill-on-bad-exit --cpu_bind=cores" CACHE STRING "")
SET (USE_QUEUING FALSE CACHE BOOL "")
# for standalone HOMME builds:
#SET (CPRNC_DIR /lcrc/group/acme/tools/cprnc CACHE FILEPATH "")
20 changes: 20 additions & 0 deletions components/homme/cmake/machineFiles/compy.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# O. Guba 08/2019
#module purge

SET(CMAKE_C_COMPILER "mpipgcc" CACHE STRING "")
SET(CMAKE_CXX_COMPILER "mpipgcxx" CACHE STRING "")
SET(CMAKE_Fortran_COMPILER "mpipgf90" CACHE STRING "")

SET (WITH_PNETCDF FALSE CACHE FILEPATH "")

SET (NETCDF_DIR "$ENV{NETCDF_ROOT}" CACHE STRING "")

#is there a better way? without this linker does not see C netcdf library
SET (ADD_LINKER_FLAGS "-L/$ENV{MKLROOT}/lib/intel64 -L/$ENV{NETCDF_ROOT}/lib -lnetcdff -lnetcdf -lmkl_rt" CACHE STRING "")
SET (ADD_Fortran_FLAGS "-traceback" CACHE STRING "")

SET (USE_MPIEXEC "srun" CACHE STRING "")
SET (USE_MPI_OPTIONS "--mpi=pmi2 --kill-on-bad-exit --cpu_bind=cores" CACHE STRING "")
SET (USE_QUEUING FALSE CACHE BOOL "")
# for standalone HOMME builds:
#SET (CPRNC_DIR /lcrc/group/acme/tools/cprnc CACHE FILEPATH "")
1 change: 0 additions & 1 deletion components/homme/src/share/mesh_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,6 @@ subroutine mesh_init_sfc_from_centroids(nelem, face_numbers, centroids, h, sfcid
! find_next_factorable for a smaller ne2.
ne2 = 2**ceiling(log(real(ne))/log(2d0))
ne2sq = ne2*ne2
print *,'ne,ne2',ne,ne2

o = sfcmap_init(ne2, sfcmap)
allocate(inds(2,nelem))
Expand Down

0 comments on commit 93b005f

Please sign in to comment.