Closed samoliverowens closed 3 years ago
@samoliverowens Did you do a test run with any of the example simulations?
@samoliverowens Did you do a test run with any of the example simulations?
Not yet, I'll try now.
@samoliverowens Did you do a test run with any of the example simulations?
Not yet, I'll try now.
I'm having trouble building on my mac - @dmey I feel you might be able to help. Running cmake -LA ../..
gives the following error:
CMake Error in /Users/samowens/u-dales-testing/u-dales/build/release/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_Fortran" includes non-existent path
"/usr/local/Cellar/open-mpi/4.0.1_2/lib"
This path indeed doesn't exist, it should be /usr/local/Cellar/open-mpi/4.0.5/lib
. How do I get it to look for this instead?
(I usually run everything on my linux machine or the HPC but I thought I'd just run the example simulations on my laptop)
@samoliverowens great to try on macOS! I don't have one at hand but it looks like you may have different versions of openMP installed with brew -- can you do a search brew search open-mpi
@samoliverowens great to try on macOS! I don't have one at hand but it looks like you may have different versions of openMP installed with brew -- can you do a search
brew search open-mpi
I just get open-mpi
. I have had this before and it was to do with the fortran compiler I think...
I just checked on the CI (https://travis-ci.com/github/uDALES/u-dales/jobs/432399341#L153) and it looks like brew is using version 4.0.3 on macOS 10.14.6. I would suggest trying to do brew cleanup
and maybe remove and reinstall open-mpi/gfortran/gcc -- We can otherwise specify this in CMake but given that this is due to brew it may make more sense to solve this at the source.
I just checked on the CI (https://travis-ci.com/github/uDALES/u-dales/jobs/432399341#L153) and it looks like brew is using version 4.0.3 on macOS 10.14.6. I would suggest trying to do
brew cleanup
and maybe remove and reinstall open-mpi/gfortran/gcc -- We can otherwise specify this in CMake but given that this is due to brew it may make more sense to solve this at the source.
I've already done that - it's weird because it finds the correct version for MPI_Fortran_COMPILER_INCLUDE_DIRS
. I'll post the whole error message in case that's helpful.
-- The Fortran compiler identification is GNU 10.2.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/local/bin/gfortran - skipped
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 - yes
CMake Error in /Users/samowens/u-dales-testing/u-dales/build/release/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_Fortran" includes non-existent path
"/usr/local/Cellar/open-mpi/4.0.1_2/lib"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error in /Users/samowens/u-dales-testing/u-dales/build/release/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_Fortran" includes non-existent path
"/usr/local/Cellar/open-mpi/4.0.1_2/lib"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error in /Users/samowens/u-dales-testing/u-dales/build/release/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_Fortran" includes non-existent path
"/usr/local/Cellar/open-mpi/4.0.1_2/lib"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error at /usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/FindMPI.cmake:1213 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/FindMPI.cmake:1239 (_MPI_try_staged_settings)
/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/FindMPI.cmake:1529 (_MPI_check_lang_works)
CMakeLists.txt:33 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/samowens/u-dales-testing/u-dales/build/release/CMakeFiles/CMakeOutput.log".
See also "/Users/samowens/u-dales-testing/u-dales/build/release/CMakeFiles/CMakeError.log".
-- Cache values
CMAKE_ADDR2LINE:FILEPATH=CMAKE_ADDR2LINE-NOTFOUND
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
CMAKE_EXECUTABLE_FORMAT:STRING=MACHO
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_Fortran_COMPILER:FILEPATH=/usr/local/bin/gfortran
CMAKE_Fortran_COMPILER_AR:FILEPATH=/usr/local/bin/gcc-ar-9
CMAKE_Fortran_COMPILER_RANLIB:FILEPATH=/usr/local/bin/gcc-ranlib-9
CMAKE_Fortran_FLAGS:STRING=
CMAKE_Fortran_FLAGS_DEBUG:STRING=-g
CMAKE_Fortran_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG -Os
CMAKE_Fortran_FLAGS_RELEASE:STRING=-O3 -DNDEBUG -O3
CMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool
CMAKE_INSTALL_PREFIX:PATH=/usr/local
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_OSX_ARCHITECTURES:STRING=
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=
CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
GIT_EXECUTABLE:FILEPATH=/usr/bin/git
MPIEXEC_EXECUTABLE:FILEPATH=/usr/local/bin/mpiexec
MPIEXEC_MAX_NUMPROCS:STRING=2
MPIEXEC_NUMPROC_FLAG:STRING=-n
MPIEXEC_POSTFLAGS:STRING=
MPIEXEC_PREFLAGS:STRING=
MPI_Fortran_ADDITIONAL_INCLUDE_DIRS:STRING=/usr/local/Cellar/open-mpi/4.0.1_2/lib
MPI_Fortran_COMPILER:FILEPATH=/usr/local/bin/mpif90
MPI_Fortran_COMPILER_INCLUDE_DIRS:STRING=/usr/local/Cellar/open-mpi/4.0.5/include;/usr/local/Cellar/open-mpi/4.0.5/lib
MPI_Fortran_COMPILE_DEFINITIONS:STRING=
MPI_Fortran_COMPILE_OPTIONS:STRING=
MPI_Fortran_F77_HEADER_DIR:PATH=/usr/local/Cellar/open-mpi/4.0.1_2/include
MPI_Fortran_LIB_NAMES:STRING=mpi_usempif08;mpi_usempi_ignore_tkr;mpi_mpifh;mpi
MPI_Fortran_LINK_FLAGS:STRING=-Wl,-flat_namespace -Wl,-commons,use_dylibs -L/usr/local/Cellar/libevent/2.1.11_1/lib
MPI_Fortran_MODULE_DIR:PATH=/usr/local/Cellar/open-mpi/4.0.1_2/include
MPI_mpi_LIBRARY:FILEPATH=/usr/local/Cellar/open-mpi/4.0.1_2/lib/libmpi.dylib
MPI_mpi_mpifh_LIBRARY:FILEPATH=/usr/local/Cellar/open-mpi/4.0.1_2/lib/libmpi_mpifh.dylib
MPI_mpi_usempi_ignore_tkr_LIBRARY:FILEPATH=/usr/local/Cellar/open-mpi/4.0.1_2/lib/libmpi_usempi_ignore_tkr.dylib
MPI_mpi_usempif08_LIBRARY:FILEPATH=/usr/local/Cellar/open-mpi/4.0.1_2/lib/libmpi_usempif08.dylib
NETCDF_F90_INCLUDE_DIR:PATH=/usr/local/include
NETCDF_F90_LIBRARY:FILEPATH=/usr/local/lib/libnetcdff.dylib
NETCDF_INCLUDE_DIR:PATH=/usr/local/include
NETCDF_LIBRARY:FILEPATH=/usr/local/lib/libnetcdf.dylib
SKIP_UPDATE_EXTERNAL_PROJECTS:STRING=OFF```
Have you tried removing the build/release
folder to make sure it creates everything from scratch? This fixed some issues for me in the past..
Have you tried removing the
build/release
folder to make sure it creates everything from scratch? This fixed some issues for me in the past..
Ahh that worked! Now I can build, but I get this error:
make[2]: *** No rule to make target `external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-build/src/libfishpack_static.a', needed by `u-dales'. Stop.
Does it download and build fishpack-cmake? if you use make -j1
it may be easier to read the logs as things don't get interleaved. you should get something like:
Scanning dependencies of target fishpack-cmake-project
[ 1%] Creating directories for 'fishpack-cmake-project'
[ 3%] Performing download step (git clone) for 'fishpack-cmake-project'
Cloning into 'fishpack-cmake-project'...
Branch 'dmey/cray-support' set up to track remote branch 'dmey/cray-support' from 'origin'.
Switched to a new branch 'dmey/cray-support'
[ 5%] No patch step for 'fishpack-cmake-project'
[ 7%] Performing update step for 'fishpack-cmake-project'
Current branch dmey/cray-support is up to date.
[ 9%] Performing configure step for 'fishpack-cmake-project'
-- The Fortran compiler identification is GNU 7.5.0
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95 -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/u-dales/build/release/external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-build
[ 11%] Performing build step for 'fishpack-cmake-project'
Scanning dependencies of target objlib
[ 4%] Building Fortran object src/CMakeFiles/objlib.dir/blktri.f.o
If not please send me the full log and I can have a look
Does it download and build fishpack-cmake? if you use
make -j1
it may be easier to read the logs as things don't get interleaved. you should get something like:Scanning dependencies of target fishpack-cmake-project [ 1%] Creating directories for 'fishpack-cmake-project' [ 3%] Performing download step (git clone) for 'fishpack-cmake-project' Cloning into 'fishpack-cmake-project'... Branch 'dmey/cray-support' set up to track remote branch 'dmey/cray-support' from 'origin'. Switched to a new branch 'dmey/cray-support' [ 5%] No patch step for 'fishpack-cmake-project' [ 7%] Performing update step for 'fishpack-cmake-project' Current branch dmey/cray-support is up to date. [ 9%] Performing configure step for 'fishpack-cmake-project' -- The Fortran compiler identification is GNU 7.5.0 -- Check for working Fortran compiler: /usr/bin/f95 -- Check for working Fortran compiler: /usr/bin/f95 -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether /usr/bin/f95 supports Fortran 90 -- Checking whether /usr/bin/f95 supports Fortran 90 -- yes -- Configuring done -- Generating done -- Build files have been written to: /tmp/u-dales/build/release/external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-build [ 11%] Performing build step for 'fishpack-cmake-project' Scanning dependencies of target objlib [ 4%] Building Fortran object src/CMakeFiles/objlib.dir/blktri.f.o
If not please send me the full log and I can have a look
Yes my initial log is very similar:
[ 1%] Creating directories for 'fishpack-cmake-project'
[ 3%] Performing download step (git clone) for 'fishpack-cmake-project'
Cloning into 'fishpack-cmake-project'...
Branch 'dmey/cray-support' set up to track remote branch 'dmey/cray-support' from 'origin'.
Switched to a new branch 'dmey/cray-support'
[ 5%] Performing update step for 'fishpack-cmake-project'
[ 7%] No patch step for 'fishpack-cmake-project'
[ 9%] Performing configure step for 'fishpack-cmake-project'
-- The Fortran compiler identification is GNU 10.2.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/local/bin/gfortran - skipped
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 - yes
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/samowens/u-dales-testing/u-dales/build/release/external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-build
[ 11%] Performing build step for 'fishpack-cmake-project'
Scanning dependencies of target objlib
[ 4%] Building Fortran object src/CMakeFiles/objlib.dir/blktri.f.o
Everything appears to work fine until
...
[ 90%] Building Fortran object CMakeFiles/u-dales.dir/src/scalsource.f90.o
[ 92%] Building Fortran object CMakeFiles/u-dales.dir/src/tstep.f90.o
[ 94%] Building Fortran object CMakeFiles/u-dales.dir/src/wf_gr.f90.o
[ 96%] Building Fortran object CMakeFiles/u-dales.dir/src/wf_uno.f90.o
[ 98%] Building Fortran object CMakeFiles/u-dales.dir/src/wfmneutral.f90.o
make[2]: *** No rule to make target `external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-build/src/libfishpack_static.a', needed by `u-dales'. Stop.
[100%] Built target u-dales
Does external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-build/src/libfishpack_static.a
exist? Can you also delete the folder and do
cmake -LA ../.. > config.log
VERBOSE=1 make > build.log
cd external && tree . > tree.log
and send me those files -- drag and drop in here/email...
Here are the files produced by those commands:
Also, here's the result of VERBOSE=1 make -i > build.log
:
build.log doesn't actually contain all that was output to the terminal - is that alright?
@samoliverowens sorry my bad, forgot to include stderror... Use &>
instead of just >
i.e. --
cmake -LA ../.. &> config.log
VERBOSE=1 make &> build.log
cd external && tree . &> tree.log
just remove folder and rerun again and no need to run the other make without VEBOSE=1
...
@samoliverowens sorry my bad, forgot to include stderror... Use
&>
instead of just>
i.e. --cmake -LA ../.. &> config.log VERBOSE=1 make &> build.log cd external && tree . &> tree.log
just remove folder and rerun again and no need to run the other make without
VEBOSE=1
...
Ok here are the new files: config.log build.log tree.log
@samoliverowens the error is to with the fishpack library --
Error: Type mismatch in argument 'cbp' at (1); passed REAL(8) to COMPLEX(8)
make[5]: *** [src/CMakeFiles/objlib.dir/blktri.f.o] Error 1
make[4]: *** [src/CMakeFiles/objlib.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-stamp/fishpack-cmake-project-build] Error 2
make[1]: *** [external/CMakeFiles/fishpack-cmake-project.dir/all] Error 2
make: *** [all] Error 2
Given that this is a legacy library, I would be more inclined to limit the supported version of uDALES to GCC versions< 10 as it may take some time to get at the bottom of this... I am going to submit a PR for that, in the meantime can you please install GFortran 9 with brew install gcc@9
and either unlink GFortran 10 or specify GFortran 9 at configure with the FC
flag. e.g. FC=gfortran-9 cmake ..
@samoliverowens the error is to with the fishpack library --
Error: Type mismatch in argument 'cbp' at (1); passed REAL(8) to COMPLEX(8) make[5]: *** [src/CMakeFiles/objlib.dir/blktri.f.o] Error 1 make[4]: *** [src/CMakeFiles/objlib.dir/all] Error 2 make[3]: *** [all] Error 2 make[2]: *** [external/fishpack-cmake-project-prefix/src/fishpack-cmake-project-stamp/fishpack-cmake-project-build] Error 2 make[1]: *** [external/CMakeFiles/fishpack-cmake-project.dir/all] Error 2 make: *** [all] Error 2
Given that this is a legacy library, I would be more inclined to limit the supported version of uDALES to GCC versions< 10 as it may take some time to get at the bottom of this... I am going to submit a PR for that, in the meantime can you please install GFortran 9 with
brew install gcc@9
and either unlink GFortran 10 or specify GFortran 9 at configure with theFC
flag. e.g.FC=gfortran-9 cmake ..
Ok that's got it, thanks! Will now try to run the example sims.
I have re-run the preprocessing routines after solving issue #56 through commit 065eb8a9018b13f1465495e02a9a546fc6d1b2f0, and put the affected files in this branch.