ATS Installation Error on Mac

225 views
Skip to first unread message

saubhagya...@gmail.com

unread,
Dec 16, 2020, 3:08:46 PM12/16/20
to Amanzi-ATS Users
Hello ATS developers, 

I am having some trouble to build the latest ATS on Mac. Below are the details/versions of the environment:

Mac: Catalina 10.15.7
mpicc: open-mpi/4.0.5/lib -lmpi
gcc: MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.27)

Attached are output from the terminal window, and two other relevant log files. Problem appears to be due to incompatibility between the compiler and mpi. I think my environment does satisfy all the prerequisites otherwise. Any guidance here will be appreciated.

Thank you
Saubhagya

terminal.log
CMakeError.log
CMakeOutput.log

Coon, Ethan

unread,
Dec 16, 2020, 3:13:05 PM12/16/20
to saubhagya...@gmail.com, Amanzi-ATS Users

--with-mpi should just be /usr/local, not the full path to mpicc.  We use this directory to search for and find not just mpicc but also mpifort and mpicxx.

 

On Catalina, you’ll need a few more options thanks to very new compilers being the default.  Also include:

 

--with-fort-flags="-fallow-argument-mismatch" --with-c-flags="-Wno-error-implicit-function-declaration"

 

 

Ethan

 

-- 

-------------------------------------------------------------------------

Ethan Coon

Research Scientist

Oak Ridge National Laboratory

 

865-241-1296

https://www.ornl.gov/staff-profile/ethan-t-coon

-------------------------------------------------------------------------

 

--
You received this message because you are subscribed to the Google Groups "Amanzi-ATS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-users/d360bfbc-cd2a-4bf9-a2e6-85cb9eb0aa32n%40googlegroups.com.

saubhagya...@gmail.com

unread,
Dec 16, 2020, 3:20:29 PM12/16/20
to Amanzi-ATS Users
Thanks Ethan. Changes suggested by you worked and the building process is underway. 

Regards
Saubhagya

Alex Hamm

unread,
Feb 24, 2021, 7:51:02 AM2/24/21
to Amanzi-ATS Users
Hey Ethan, 

I saw this post just now while trying to install ATS 1.0 and ran into the same issue as Saubhagya.
I'm on Ubuntu 18.04 but I attached the same log files. 
I made sure that /usr/bin has all the mpicc, mpicxx and mpifort. What is it missing?

Thanks a lot in advance!

Best, 
Alexandra 
CMakeOutput.log
terminal.log
CMakeError.log

canns...@gmail.com

unread,
Feb 24, 2021, 10:59:47 AM2/24/21
to Amanzi-ATS Users
Hi Alexandra,

I'm not a developer, just a user. But I wanted to help. I had similar issues in the near past. 

I think your issue might be due to your mpi path in your .bashrc/.bash_profile. As Ethan mentioned in his above reply, it doesn't want the full path, which is I guess in your case /usr/bin. I see that you defined that full path in your terminal.log (next to --with-mpi=). Try using /usr only. I also use Ubuntu and this worked fine for me. For Mac, I believe it should be /usr/local (and the full path is /usr/local/bin).

Please forgive any misinformation and Ethan, correct me if I'm wrong!
Hope it helps.

Best,
Cansu

24 Şubat 2021 Çarşamba tarihinde saat 06:51:02 UTC-6 itibarıyla alexh...@googlemail.com şunları yazdı:

Alex Hamm

unread,
Feb 24, 2021, 11:41:38 AM2/24/21
to Amanzi-ATS Users
Hey Cansu, 

thanks so much for your suggestion! Unfortunately, it didn't solve my problem. But only using /usr also generated this output:


CMake Error at CMakeLists.txt:122 (message):
  Missing a compiler type for MPI applications -- exiting.

=======
-- Configuring incomplete, errors occurred!
See also "/home/alex/ats/amanzi_tpls-build-master-Debug/CMakeFiles/CMakeOutput.log".
See also "/home/alex/ats/amanzi_tpls-build-master-Debug/CMakeFiles/CMakeError.log".
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /usr/bin/mpicc
CMAKE_CXX_COMPILER= /usr/bin/mpicxx
CMAKE_Fortran_COMPILER= /usr/bin/mpif90

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    MPI_PREFIX


CMake Generate step failed.  Build files cannot be regenerated correctly.
Amanzi Bootstrap ERROR: Failed to configure TPL build
=======

Not sure how to interpret that though.
Anyways, thanks a lot for the reply :)

Best, 
Alexandra 

Coon, Ethan

unread,
Feb 24, 2021, 12:46:46 PM2/24/21
to Alex Hamm, Amanzi-ATS Users

Cansu is right, thanks for stepping in with that – “/usr” looks right.

 

Can you completely remove your TPLS build directory, it looks like (from the “configure will be re-run”) that it isn’t a clean build, so I suspect things are getting confused by your previous attempts.

Alex Hamm

unread,
Feb 24, 2021, 4:22:22 PM2/24/21
to Amanzi-ATS Users
Hey Ethan, Cansu,  

yes!! Indeed, removing the TPLS directories worked made it work. It finished the amanzi configuration, but then crashed in the second step at 97% because it can't find the VisualizationDomainSet.hh (and .cc I guess) files. I manually added them to ats/repos/amanzi/src/state, as this is where I found them in the github repository. But it still threw some error, wasn't happy with that file.

Error without the files in the repos directory (both continue until it says 'Failed to build Amanzi, but I guess the error originates in this file?):

[ 97%] Building CXX object src/physics/ats/src/pks/mpc/CMakeFiles/ats_mpc.dir/weak_mpc_semi_coupled.cc.o
/home/alex/ats/repos/amanzi/src/physics/ats/src/executables/coordinator.cc:32:10: fatal error: VisualizationDomainSet.hh: No such file or directory
 #include "VisualizationDomainSet.hh"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Error with files in the repos directory:

[ 96%] Building CXX object src/physics/ats/src/pks/mpc/CMakeFiles/ats_mpc.dir/mpc_coupled_cells.cc.o
In file included from /home/alex/ats/repos/amanzi/src/physics/ats/src/executables/coordinator.cc:32:0:
/home/alex/ats/repos/amanzi/src/state/VisualizationDomainSet.hh:54:16: error: ‘virtual void Amanzi::VisualizationDomainSet::WriteVector(const Epetra_MultiVector&, const std::vector<std::__cxx11::basic_string<char> >&) const’ marked ‘override’, but does not override
   virtual void WriteVector(const Epetra_MultiVector& vec, const std::vector<std::string>& names ) const override;

Thanks for the help!
Best, 
Alexandra 

Coon, Ethan

unread,
Feb 24, 2021, 5:08:46 PM2/24/21
to Alex Hamm, Amanzi-ATS Users

Are you building ATS master with Amanzi version 1.0?  That is what it sounds like to me.  Coordinator.cc from ATS version 1.0 should not refer to VisualizationDomainSet (that file is new as of a few days ago, long after version 1.0).

 

When you call bootstrap, are you passing an --ats_branch=master option?  You should either use no ats_branch option at all (this would be preferred), or --ats_branch=ats-1.0.

 

Note you can check which branch you are on manually with:

 

cd $AMANZI_SRC_DIR

git branch

cd src/physics/ats

git branch

 

both should report version 1.0 (or master if that is what you want), but not a mix of the two.

 

I have to admit, I’m not entirely sure how bootstrap and git submodules are currently interacting, so this may be a bootstrap bug/logic error on our part.

Alex Hamm

unread,
Feb 25, 2021, 7:40:18 AM2/25/21
to Amanzi-ATS Users
Hey Ethan, 

thanks for the hint, you were right, I was actually on the master branch, but intended to install 1.0. However, both git branch commands that you mentioned reported 'master', so it should have been consistent. Anyways, I started building 1.0 now and had to fix the paths to silo and hypre so far, which are working on the master branch, but not in 1.0. Amanzi configuration was completed afterwards, but then crashed at 52% in the second step starting with this error:

 [ 52%] Building CXX object src/physics/ats/src/pks/CMakeFiles/ats_pks.dir/pk_bdf_default.cc.o
/home/alex/ats/repos/amanzi/src/physics/ats/src/constitutive_relations/generic_evaluators/SubgridAggregateEvaluator.cc: In member function ‘virtual void Amanzi::Relations::SubgridAggregateEvaluator::EvaluateField_(const Teuchos::Ptr<Amanzi::State>&, const Teuchos::Ptr<Amanzi::CompositeVector>&)’:
/home/alex/ats/repos/amanzi/src/physics/ats/src/constitutive_relations/generic_evaluators/SubgridAggregateEvaluator.cc:57:15: error: ‘starts_with’ is not a member of ‘Amanzi::Keys’
     if (Keys::starts_with(source_domain_, "surface_")) {


As far as I understand, the 'starts_with' function is not being recognized? But I wouldn't really know where to change anything at this point. 
Thanks!
Best, 
Alexandra 

Ahmad

unread,
Feb 25, 2021, 9:08:55 AM2/25/21
to Alex Hamm, Amanzi-ATS Users
Hi Alex,

It seems to me like there is some inconsistency between the amanzi and ats branches that you are building. If you are building ats-1.0 (https://github.com/amanzi/ats/tree/ats-1.0/src/constitutive_relations/generic_evaluators) then there is no SubgridAggregateEvaluator.cc, unless I am missing something.

Can you please check and send the exact commit number by using "git log" in $AMANZI_SRC_DIR and $ATS_SRC_DIR to make sure things are consistent.

-Ahmad 



Coon, Ethan

unread,
Feb 25, 2021, 10:25:25 AM2/25/21
to Alex Hamm, Amanzi-ATS Users

Keys::starts_with() is in master Amanzi Keys.hh, but not in 1.0 Amanzi Keys.hh.

 

Somehow you have a mix of branches and previously installed code.  I’d suggest you start from scratch.  Leave TPLs if they seem to have built correctly, but remove all of your AMANZI_SRC_DIR, AMANZI_BUILD_DIR, and AMANZI_DIR, re-clone Amanzi, and rerun bootstrap.  Make sure you clone the branch of Amanzi you want to use, and don’t clone ATS.  Let bootstrap do that for you, and make sure you don’t pass any arguments of the form “—branch_ats=…”.  This should result in the ATS being cloned to be the right one by default. 

 

./bootstrap.sh --mpi=/usr --branch=amanzi-1.0 --tpl-config-file=/path/to/your/AMANZI_TPLS_DIR/cmake/share/amanzi-config.cmake  (+ any –debug, --disable-structured, --enable/disable-geochemistry, or other options you need)

Reply all
Reply to author
Forward
0 new messages