Error building TPLs for ATS 1.0 on Mac

208 views
Skip to first unread message

pshu...@gmail.com

unread,
Aug 18, 2020, 4:36:00 PM8/18/20
to Amanzi-ATS Users
Hi all,

I have encountered the following error while buidling ATS on my Mac. 

[ 30%] Performing build step for 'seacas'
CMake Error at /Users/shua784/Dropbox/github/ats/amanzi_tpls-build-master-Release/seacas/seacas-timestamps/seacas-build-Release.cmake:49 (message):
  Command failed: 2

   '/Library/Developer/CommandLineTools/usr/bin/make'

  See also

    /Users/shua784/Dropbox/github/ats/amanzi_tpls-build-master-Release/seacas/seacas-timestamps/seacas-build-*.log


make[2]: *** [seacas/seacas-timestamps/seacas-build] Error 1
make[1]: *** [CMakeFiles/seacas.dir/all] Error 2
make: *** [all] Error 2
Amanzi Bootstrap ERROR: Failed to build TPLs

I have attached the log files here. 

Any idea?

Thanks,
Pin

seacas-build-out.log
seacas-build-err.log

Coon, Ethan

unread,
Aug 18, 2020, 5:02:21 PM8/18/20
to pshu...@gmail.com, Amanzi-ATS Users

I assume this is a Catalina mac using gfortran version 10.X?

 

We have just fixed this in the last few days on Amanzi’s master, but gnu 10.X compilers broke a lot of fortran TPLs.  Some have gotten fixed by upstream developers, some we’ve had to patch, and some we’ve had to work around.  We may backport this onto 1.0 (David, thoughts?), but it hasn’t been done yet.

 

In the meantime, you can either work on master, or turn your compilers back to gfortran version 9. 

 

To turn your compilers back to gfortran 9, assuming you use homebrew:

 

$> brew install gcc@9

 

Then, you may have to either build openmpi from source, or use our “tools” mpi build from bootstrap.

 

To do this, set the compiler options to bootstrap (e.g. –with-c-compiler, --with-fort-compiler, --with-cxx-compler) to `which gcc-9`, `which g++-9`, `which gfortran-9` respectively, and pass the --tools-mpi=openmpi flag to bootstrap to get it to build MPI for you. (Do not provide the –mpi-dir option).

 

To work with master, just add the flag --with-fort-flags="-fallow-argument-mismatch" to your bootstrap line (in addition to cloning a current master branch instead of downloading the release version).  This is probably what I would suggest…

 

 

Ethan

--
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/5b33d2be-5ed6-45fa-a609-0836b5a28ddcn%40googlegroups.com.

pshu...@gmail.com

unread,
Aug 19, 2020, 12:46:30 PM8/19/20
to Amanzi-ATS Users
Hi Ethan,

Yes, I am using Catalina with gfortran version of 11.0.3.

The second approach worked well for me. I was able to get a working ATS installed by adding the flag:

--with-fort-flags="-fallow-argument-mismatch"

I also tried the first approach, but it failed while building Amanzi (I have attached screen output). 

Also, is the compiled ATS (with the flag "--with-fort-flags" added) considered a "normal" ATS version in terms of the functionality? Just curious. 

Thanks,
Pin
out.log

Coon, Ethan

unread,
Aug 19, 2020, 2:46:42 PM8/19/20
to pshu...@gmail.com, Amanzi-ATS Users

Sure, the flags don’t have any effect on physics or functionality.  The main difference is being on the “master” branch means that there may be some new functionality or code relative to the last release.  The “master” branch is just more volatile and faster changing than a release, and has code that has been less hammered on so may be more buggy.  But modulo changes in the framework, we shouldn’t be introducing bugs into the existing codebase too often.

 

At this point, the main differences between ATS 1.0 and ATS on master branch are related to merging in reactive transport.  Soon there will be some more significant changes in input spec related to linear solvers and some new physics in the surface energy balance which may change answers for existing runs, but currently there should be almost no difference to basic flow runs.

Ylva Sjöberg

unread,
Aug 24, 2020, 3:07:49 PM8/24/20
to Coon, Ethan, Amanzi-ATS Users

Hi Ethan and ATSers,

 

I’m also trying to install ATS 1.0 on my mac and run into something that might be related to Pin’s problem. Following Ethan’s instructions to Pin, I tried installing gcc@9 and setting the compiler options in the bootstrap list pointing to that version, but still it seems like the installation uses the 10.2.0 version:

 

InstalledDir: /Library/Developer/CommandLineTools/usr/bin

-- Identifying /usr/local/bin/gfortran (GNU) version

-- Identifying /usr/local/bin/gfortran (GNU) version -- 10.2.0

-- Checking whether C compiler can compile MPI program

-- Checking whether C compiler can compile MPI program - no

-- Checking whether C++ compiler can compile MPI program

-- Checking whether C++ compiler can compile MPI program - no

-- Checking whether Fortran compiler can compile MPI program

-- Performing Test MPI_Fortran

-- Performing Test MPI_Fortran - Failed

-- Checking whether Fortran compiler can compile MPI program - no

CMake Error at CMakeLists.txt:122 (message):

  Missing a compiler type for MPI applications -- exiting.

 

 

-- Configuring incomplete, errors occurred!

See also "/usr/local/bin/ats/amanzi_tpls-build-master-Release/CMakeFiles/CMakeOutput.log".

See also "/usr/local/bin/ats/amanzi_tpls-build-master-Release/CMakeFiles/CMakeError.log".

Amanzi Bootstrap ERROR: Failed to configure TPL build

 

So, I guess the solution could be adding the --with-fort-flags="-fallow-argument-mismatch" to the bootstrap and downloading the version from the master branch. I just didn’t understand which version I should get?

In the install instruction for ATS 1.0 I only clone the amanzi repo:  git clone -b master http://github.com/amanzi/amanzi $AMANZI_SRC_DIR

But I guess it is the ATS repos that should be from the master branch – how do I do that?

 

I hope this is a very easy one to fix – many thanks for any help!

Ylva

Lipnikov, Konstantin

unread,
Aug 24, 2020, 3:42:08 PM8/24/20
to Ylva Sjöberg, Coon, Ethan, Amanzi-ATS Users

Dear Ylva,


ATS is now a submodule of Amanzi and both can be cloned in one command:

git clone --recursive https://github.com/amanzi/amanzi.git amanzi-ats


--with-fort-flags="-fallow-argument-mismatch" works for gcc 10.2.0, except for Alqumia. A more recent version of this geochemistry interface package is needed for OS X. 


Sincerely,

   Konstantin


 


From: ats-...@googlegroups.com <ats-...@googlegroups.com> on behalf of Ylva Sjöberg <y...@ign.ku.dk>
Sent: Monday, August 24, 2020 1:07:42 PM
To: Coon, Ethan; Amanzi-ATS Users

Subject: Re: [EXTERNAL] Error building TPLs for ATS 1.0 on Mac
 

Hi Ethan and ATSers,

--
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.

canns...@gmail.com

unread,
Jan 6, 2021, 10:30:54 AM1/6/21
to Amanzi-ATS Users
Hi all,

I also had the same problems that Pin and Ylva encountered while trying to build ATS 1.0. I am using macOS Mojave 10.14.6.

[ 23%] Performing build step for 'seacas'
CMake Error at /Users/Cansu/Documents/ATS2/ats/amanzi_tpls-build-master-Release/seacas/seacas-timestamps/seacas-build-Release.cmake:49 (message):
  Command failed: 2

   '/Library/Developer/CommandLineTools/usr/bin/make'

  See also

    /Users/Cansu/Documents/ATS2/ats/amanzi_tpls-build-master-Release/seacas/seacas-timestamps/seacas-build-*.log


make[2]: *** [seacas/seacas-timestamps/seacas-build] Error 1
make[1]: *** [CMakeFiles/seacas.dir/all] Error 2
make: *** [all] Error 2
Amanzi Bootstrap ERROR: Failed to build TPLs

Although I don't have Catalina like others, I tried both methods Ethan suggested: (1) adding the flag --with-fort-flags="-fallow-argument-mismatch" (2) changing back to compiler version 9.

Initially, my default gcc --version was 10.2.0 (Homebrew). I brew installed gcc-9 and ended up with gcc-9 and gcc-10 in usr/local/bin. Then, to use 9 as a default compiler, to my .bash_profile I added:

alias gcc='gcc-9'
alias g++='g++-9'
alias gfortran='gfortran-9'

It did not work with 9 either, got the same seacas error. This whole time I worked with the master branch (git clone --recursive https://github.com/amanzi/amanzi.git amanzi-ats). I am adding the bash_log, bash_profile and seacas-build-error files here.

P.s. I had an error with Silo earlier (the link for the installation is broken) so I had to disable that in the bootstap.

Hope it is an easy problem to solve, thank you very much for your help in advance!

Regards,
Cansu


24 Ağustos 2020 Pazartesi tarihinde saat 14:42:08 UTC-5 itibarıyla Konstantin Lipnikov şunları yazdı:
seacas-build-err.log
Bash_log.rtf
bash_profile.rtf

Coon, Ethan

unread,
Jan 8, 2021, 11:03:01 AM1/8/21
to canns...@gmail.com, Amanzi-ATS Users

Hi Cansu,

 

I think the first method is more robust, and should work since you are on master.  You can see that even with gcc@9 installed, your configure is picking up the homebrew installed mpi, which is built on clang.

 

Can you try to clear everything out and try again by adding --with-fort-flags=”-fallow-argument-mismatch” to your boostrap line?  If that fails, send me the files again.

 

Thanks,

 

Ethan

 

-- 

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

Ethan Coon

Research Scientist

Oak Ridge National Laboratory

 

865-241-1296

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

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

.

canns...@gmail.com

unread,
Jan 8, 2021, 7:50:21 PM1/8/21
to Amanzi-ATS Users
Hi Ethan,

Thanks for your fast reply. I tried all day to compile it with the flag as you and everyone on the internet suggested:

$> . ${AMANZI_SRC_DIR}/build_ATS_generic.sh --with-fort-flags=”-fallow-argument-mismatch”

unfortunately, I got the same Seacas error the whole time. I deleted everything multiple times, started the installation from scratch, tried both gcc versions with the flag (thinking that the flag can only turn errors into warnings when a certain gcc version is used?). But it did not work. For the bash log for this effort please see attached "bash_log2". Seacas log is the same as my above attachment. I don't understand why it doesn't work in my case. 

Finally, I tried the second option (gcc9) again and realized that in my initial trial, I was not able to build the openmpi from source. But this time it seems like somethings were about to work, I successfully built openmpi, run bootstrap (commented out the "export OPENMPI_DIR=/usr/local/bin" part in my bash_profile) but then I got this error: 


$> . ${AMANZI_SRC_DIR}/build_ATS_generic.sh --with-c-compiler=/usr/local/bin/gcc-9 --tools-mpi=openmpi
..
..
-- CMake: Configuring Amanzi Tools build/install
--
-- ------------------------------------------------
-- Identifying /usr/local/bin/gcc (GNU) version
-- Identifying /usr/local/bin/gcc (GNU) version -- 9.3.0
-- Identifying /usr/local/bin/g++ (GNU) version
-- Identifying /usr/local/bin/g++ (GNU) version -- 9.3.0
-- Identifying /usr/local/bin/gfortran (GNU) version
-- Identifying /usr/local/bin/gfortran (GNU) version -- 10.2.0
..
..
..
..
..
-- Up-to-date: /Users/Cansu/Documents/ATS2/ats/install/share/cmake/amanzi-tools-config.cmake
[Fri Jan  8 18:05:41 CST 2021] Tools build complete: new MPI root=/Users/Cansu/Documents/ATS2/ats/install
[Fri Jan  8 18:05:41 CST 2021]   new MPI root=/Users/Cansu/Documents/ATS2/ats/install
[Fri Jan  8 18:05:41 CST 2021]   new C compiler=/Users/Cansu/Documents/ATS2/ats/install/bin/mpicc
[Fri Jan  8 18:05:41 CST 2021] For future Amanzi builds use /Users/Cansu/Documents/ATS2/ats/install/share/cmake/amanzi-tools-config.cmake
[Fri Jan  8 18:05:41 CST 2021] Build with C compiler: /Users/Cansu/Documents/ATS2/ats/install/bin/mpicc
[Fri Jan  8 18:05:41 CST 2021] Build with C++ compiler: /Users/Cansu/Documents/ATS2/ats/install/bin/mpicxx
[Fri Jan  8 18:05:41 CST 2021] Build with Fortran compiler: /Users/Cansu/Documents/ATS2/ats/install/bin/mpif90
[Fri Jan  8 18:05:41 CST 2021] Compiler Check complete
--
------------------------------------------------
--
-- CMake: Configuring Amanzi TPLs build/install.
--
-- ---------------------------------------------
-- Identifying /Users/Cansu/Documents/ATS2/ats/install/bin/mpicc (GNU) version
-- Identifying /Users/Cansu/Documents/ATS2/ats/install/bin/mpicc (GNU) version -- 9.3.0
-- Identifying /Users/Cansu/Documents/ATS2/ats/install/bin/mpicxx (GNU) version
-- Identifying /Users/Cansu/Documents/ATS2/ats/install/bin/mpicxx (GNU) version -- 9.3.0
-- Identifying /Users/Cansu/Documents/ATS2/ats/install/bin/mpif90 (GNU) version
-- Identifying /Users/Cansu/Documents/ATS2/ats/install/bin/mpif90 (GNU) version -- 10.2.0
-- Checking whether C compiler can compile MPI program
-- Checking whether C compiler can compile MPI program - yes
-- Checking whether C++ compiler can compile MPI program
-- Checking whether C++ compiler can compile MPI program - no
-- Checking whether Fortran compiler can compile MPI program
-- Performing Test MPI_Fortran
-- Performing Test MPI_Fortran - Success
-- Checking whether Fortran compiler can compile MPI program - yes
CMake Error at CMakeLists.txt:122 (message):
  Missing a compiler type for MPI applications -- exiting.


-- Configuring incomplete, errors occurred!
See also "/Users/Cansu/Documents/ATS2/ats/amanzi_tpls-build-master-Release/CMakeFiles/CMakeOutput.log".
See also "/Users/Cansu/Documents/ATS2/ats/amanzi_tpls-build-master-Release/CMakeFiles/CMakeError.log".
Amanzi Bootstrap ERROR: Failed to configure TPL build

Let me know if you need additional information. I also added the CMakeError.log.Thank you very much!

Cansu
8 Ocak 2021 Cuma tarihinde saat 10:03:01 UTC-6 itibarıyla Coon, Ethan şunları yazdı:
bash_log2.rtf
cmake_log_error1.rtf
Reply all
Reply to author
Forward
0 new messages