From a8c17a6d12a3d3b58a174a700fd16f9cc36074c4 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Thu, 7 Mar 2024 15:35:30 -0600 Subject: [PATCH] CMakeLists.txt, w3iorsmd.F90: troubleshooting --- model/src/CMakeLists.txt | 14 ++++++++------ model/src/w3iorsmd.F90 | 14 +++++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/model/src/CMakeLists.txt b/model/src/CMakeLists.txt index 7dd7d82a2..df5f9d94b 100644 --- a/model/src/CMakeLists.txt +++ b/model/src/CMakeLists.txt @@ -48,7 +48,9 @@ target_include_directories(ww3_lib # Set compiler flags. if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$") set(compile_flags -no-fma -ip -g -traceback -i4 -real-size 32 -fp-model precise - -assume byterecl -fno-alias -fno-fnalias) + -assume byterecl -fno-alias -fno-fnalias -fpp -save-temps) +# set(compile_flags -no-fma -ip -g -traceback -i4 -real-size 32 -fp-model precise +# -assume byterecl -fno-alias -fno-fnalias) # -sox only works on Linux if(LINUX) list(APPEND compile_flags -sox) @@ -70,7 +72,7 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$") set(compile_flags -g -fno-second-underscore -ffree-line-length-none) set(compile_flags_release -O3) set(compile_flags_debug -Wall -fcheck=all -ffpe-trap=invalid,zero,overflow -frecursive -fbacktrace) - + if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) target_compile_options(ww3_lib PUBLIC -fallow-argument-mismatch) endif() @@ -79,7 +81,7 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "PGI") set(compile_flags -g -i4 -r4 -Kieee) set(compile_flags_release -O3) set(compile_flags_debug -O0 -Mbounds -Mchkfpstk -Mchkstk -Mdalign -Mdclchk -Mdepchk -Miomutex -Ktrap=fp -Mrecursive -traceback) - + if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) target_compile_options(ww3_lib PUBLIC -fallow-argument-mismatch -fallow-invalid-boz) endif() @@ -131,13 +133,13 @@ if(MULTI_ESMF) if (NOT TARGET esmf) find_package(ESMF MODULE REQUIRED) endif() - + target_sources(ww3_lib PRIVATE wmesmfmd.F90) target_link_libraries(ww3_lib PUBLIC esmf) set_target_properties(ww3_lib PROPERTIES OUTPUT_NAME "ww3_multi_esmf") # Don't build executables when building WW3 ESMF library set(programs "") -endif() +endif() set_property(SOURCE w3initmd.F90 APPEND @@ -211,7 +213,7 @@ install( install(FILES ${CMAKE_BINARY_DIR}/switch DESTINATION ${CMAKE_INSTALL_PREFIX}) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod DESTINATION ${CMAKE_INSTALL_PREFIX}) - + export(EXPORT WW3Exports NAMESPACE WW3:: diff --git a/model/src/w3iorsmd.F90 b/model/src/w3iorsmd.F90 index 05f7e9163..1c745d129 100644 --- a/model/src/w3iorsmd.F90 +++ b/model/src/w3iorsmd.F90 @@ -404,6 +404,8 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) IGRD = 1 END IF ! + WRITE(*,*) 'TESTING... LPDLIB=',LPDLIB + ! CALL W3SETO ( IGRD, NDSE, NDST ) CALL W3SETG ( IGRD, NDSE, NDST ) CALL W3SETW ( IGRD, NDSE, NDST ) @@ -650,15 +652,21 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT ) ! ! I/O server version writing of spectra ( !/MPI ) ! + WRITE (*,*) 'GOT HERE!!! -BMPI- LPDLIB=',LPDLIB #ifdef W3_MPI - ELSE - ! - IF (LPDLIB) THEN + WRITE (*,*) 'GOT HERE!!! -AMPI- LPDLIB=',LPDLIB +!!!MTM ELSE + ! + WRITE (*,*) 'BEFORE LPDLIB IF. LPDLIB=',LPDLIB + IF (LPDLIB) THEN + WRITE (*,*) 'INSIDE LPDLIB IF. LPDLIB=',LPDLIB #endif #ifdef W3_TIMINGS CALL PRINT_MY_TIME("Before UNST_PDLIB_WRITE_TO_FILE") #endif #ifdef W3_PDLIB + WRITE (*,*) 'INNER W3_PDLIB. LPDLIB=',LPDLIB + WRITE (*,*) 'IN: IAPROC=',IAPROC CALL UNST_PDLIB_WRITE_TO_FILE(NDSR) #endif #ifdef W3_TIMINGS